]>
git.proxmox.com Git - mirror_ubuntu-jammy-kernel.git/blob - include/linux/elf.h
1 /* SPDX-License-Identifier: GPL-2.0 */
6 #include <uapi/linux/elf.h>
8 #ifndef elf_read_implies_exec
9 /* Executables for which elf_read_implies_exec() returns TRUE will
10 have the READ_IMPLIES_EXEC personality flag set automatically.
11 Override in asm/elf.h as needed. */
12 # define elf_read_implies_exec(ex, have_pt_gnu_stack) 0
14 #ifndef SET_PERSONALITY
15 #define SET_PERSONALITY(ex) \
16 set_personality(PER_LINUX | (current->personality & (~PER_MASK)))
19 #ifndef SET_PERSONALITY2
20 #define SET_PERSONALITY2(ex, state) \
24 #if ELF_CLASS == ELFCLASS32
26 extern Elf32_Dyn _DYNAMIC
[];
27 #define elfhdr elf32_hdr
28 #define elf_phdr elf32_phdr
29 #define elf_shdr elf32_shdr
30 #define elf_note elf32_note
31 #define elf_addr_t Elf32_Off
32 #define Elf_Half Elf32_Half
33 #define Elf_Word Elf32_Word
37 extern Elf64_Dyn _DYNAMIC
[];
38 #define elfhdr elf64_hdr
39 #define elf_phdr elf64_phdr
40 #define elf_shdr elf64_shdr
41 #define elf_note elf64_note
42 #define elf_addr_t Elf64_Off
43 #define Elf_Half Elf64_Half
44 #define Elf_Word Elf64_Word
48 /* Optional callbacks to write extra ELF notes. */
50 struct coredump_params
;
52 #ifndef ARCH_HAVE_EXTRA_ELF_NOTES
53 static inline int elf_coredump_extra_notes_size(void) { return 0; }
54 static inline int elf_coredump_extra_notes_write(struct coredump_params
*cprm
) { return 0; }
56 extern int elf_coredump_extra_notes_size(void);
57 extern int elf_coredump_extra_notes_write(struct coredump_params
*cprm
);
59 #endif /* _LINUX_ELF_H */