5 #include <uapi/linux/elf.h>
7 #ifndef elf_read_implies_exec
8 /* Executables for which elf_read_implies_exec() returns TRUE will
9 have the READ_IMPLIES_EXEC personality flag set automatically.
10 Override in asm/elf.h as needed. */
11 # define elf_read_implies_exec(ex, have_pt_gnu_stack) 0
13 #ifndef SET_PERSONALITY
14 #define SET_PERSONALITY(ex) \
15 set_personality(PER_LINUX | (current->personality & (~PER_MASK)))
18 #if ELF_CLASS == ELFCLASS32
20 extern Elf32_Dyn _DYNAMIC [];
21 #define elfhdr elf32_hdr
22 #define elf_phdr elf32_phdr
23 #define elf_shdr elf32_shdr
24 #define elf_note elf32_note
25 #define elf_addr_t Elf32_Off
26 #define Elf_Half Elf32_Half
30 extern Elf64_Dyn _DYNAMIC [];
31 #define elfhdr elf64_hdr
32 #define elf_phdr elf64_phdr
33 #define elf_shdr elf64_shdr
34 #define elf_note elf64_note
35 #define elf_addr_t Elf64_Off
36 #define Elf_Half Elf64_Half
40 /* Optional callbacks to write extra ELF notes. */
42 struct coredump_params;
44 #ifndef ARCH_HAVE_EXTRA_ELF_NOTES
45 static inline int elf_coredump_extra_notes_size(void) { return 0; }
46 static inline int elf_coredump_extra_notes_write(struct coredump_params *cprm) { return 0; }
48 extern int elf_coredump_extra_notes_size(void);
49 extern int elf_coredump_extra_notes_write(struct coredump_params *cprm);
51 #endif /* _LINUX_ELF_H */