1
2
3
4
5
6
7
8 #ifndef _LINUX_ELF_FDPIC_H
9 #define _LINUX_ELF_FDPIC_H
10
11 #include <uapi/linux/elf-fdpic.h>
12
13
14
15
16 struct elf_fdpic_params {
17 struct elfhdr hdr;
18 struct elf_phdr *phdrs;
19 struct elf32_fdpic_loadmap *loadmap;
20 unsigned long elfhdr_addr;
21 unsigned long ph_addr;
22 unsigned long map_addr;
23 unsigned long entry_addr;
24 unsigned long stack_size;
25 unsigned long dynamic_addr;
26 unsigned long load_addr;
27 unsigned long flags;
28 #define ELF_FDPIC_FLAG_ARRANGEMENT 0x0000000f
29 #define ELF_FDPIC_FLAG_INDEPENDENT 0x00000000
30 #define ELF_FDPIC_FLAG_HONOURVADDR 0x00000001
31 #define ELF_FDPIC_FLAG_CONSTDISP 0x00000002
32
33 #define ELF_FDPIC_FLAG_CONTIGUOUS 0x00000003
34 #define ELF_FDPIC_FLAG_EXEC_STACK 0x00000010
35 #define ELF_FDPIC_FLAG_NOEXEC_STACK 0x00000020
36 #define ELF_FDPIC_FLAG_EXECUTABLE 0x00000040
37 #define ELF_FDPIC_FLAG_PRESENT 0x80000000
38 };
39
40 #ifdef CONFIG_MMU
41 extern void elf_fdpic_arch_lay_out_mm(struct elf_fdpic_params *exec_params,
42 struct elf_fdpic_params *interp_params,
43 unsigned long *start_stack,
44 unsigned long *start_brk);
45 #endif
46
47 #endif