ELF: Add ELF program property parsing support
ELF program properties will be needed for detecting whether to enable optional architecture or ABI features for a new ELF process. For now, there are no generic properties that we care about, so do nothing unless CONFIG_ARCH_USE_GNU_PROPERTY=y. Otherwise, the presence of properties using the PT_PROGRAM_PROPERTY phdrs entry (if any), and notify each property to the arch code. For now, the added code is not used. Signed-off-by: Mark Brown <broonie@kernel.org> Signed-off-by: Dave Martin <Dave.Martin@arm.com> Reviewed-by: Kees Cook <keescook@chromium.org> Signed-off-by: Catalin Marinas <catalin.marinas@arm.com>
This commit is contained in:

committed by
Catalin Marinas

parent
db751e309f
commit
00e19ceec8
@@ -17,6 +17,8 @@
|
||||
#include <linux/elfcore-compat.h>
|
||||
#include <linux/time.h>
|
||||
|
||||
#define ELF_COMPAT 1
|
||||
|
||||
/*
|
||||
* Rename the basic ELF layout types to refer to the 32-bit class of files.
|
||||
*/
|
||||
@@ -28,11 +30,13 @@
|
||||
#undef elf_shdr
|
||||
#undef elf_note
|
||||
#undef elf_addr_t
|
||||
#undef ELF_GNU_PROPERTY_ALIGN
|
||||
#define elfhdr elf32_hdr
|
||||
#define elf_phdr elf32_phdr
|
||||
#define elf_shdr elf32_shdr
|
||||
#define elf_note elf32_note
|
||||
#define elf_addr_t Elf32_Addr
|
||||
#define ELF_GNU_PROPERTY_ALIGN ELF32_GNU_PROPERTY_ALIGN
|
||||
|
||||
/*
|
||||
* Some data types as stored in coredump.
|
||||
|
Reference in New Issue
Block a user