5 #ifndef _SYS_ELFCOMMON_H
6 #define _SYS_ELFCOMMON_H
16 #define PT_LOOS 0x60000000
17 #define PT_HIOS 0x6fffffff
18 #define PT_LOPROC 0x70000000
19 #define PT_HIPROC 0x7fffffff
20 #define PT_GNU_EH_FRAME 0x6474e550 /* Extension, eh? */
28 #define ET_LOPROC 0xff00
29 #define ET_HIPROC 0xffff
31 /* ELF machine types */
38 #define EM_486 6 /* Not used in Linux at least */
40 #define EM_MIPS 8 /* R3k, bigendian(?) */
41 #define EM_MIPS_RS4_BE 10 /* R4k BE */
43 #define EM_SPARC32PLUS 18
48 #define EM_SPARCV9 43 /* v9 = SPARC64 */
51 #define EM_IA_64 50 /* Itanic */
55 #define EM_ALPHA 0x9026 /* Interrim Alpha that stuck around */
56 #define EM_CYGNUS_V850 0x9080 /* Old v850 ID used by Cygnus */
57 #define EM_S390_OLD 0xA390 /* Obsolete interrim value for S/390 */
59 /* Dynamic type values */
76 #define DT_SYMBOLIC 16
84 #define DT_LOPROC 0x70000000
85 #define DT_HIPROC 0x7fffffff
87 /* Auxilliary table entries */
88 #define AT_NULL 0 /* end of vector */
89 #define AT_IGNORE 1 /* entry should be ignored */
90 #define AT_EXECFD 2 /* file descriptor of program */
91 #define AT_PHDR 3 /* program headers for program */
92 #define AT_PHENT 4 /* size of program header entry */
93 #define AT_PHNUM 5 /* number of program headers */
94 #define AT_PAGESZ 6 /* system page size */
95 #define AT_BASE 7 /* base address of interpreter */
96 #define AT_FLAGS 8 /* flags */
97 #define AT_ENTRY 9 /* entry point of program */
98 #define AT_NOTELF 10 /* program is not ELF */
99 #define AT_UID 11 /* real uid */
100 #define AT_EUID 12 /* effective uid */
101 #define AT_GID 13 /* real gid */
102 #define AT_EGID 14 /* effective gid */
103 #define AT_PLATFORM 15 /* string identifying CPU for optimizations */
104 #define AT_HWCAP 16 /* arch dependent hints at CPU capabilities */
105 #define AT_CLKTCK 17 /* frequency at which times() increments */
107 #define AT_SECURE 23 /* secure mode boolean */
109 /* Program header permission flags */
114 /* Section header types */
116 #define SHT_PROGBITS 1
121 #define SHT_DYNAMIC 6
126 #define SHT_DYNSYM 11
128 #define SHT_LOPROC 0x70000000
129 #define SHT_HIPROC 0x7fffffff
130 #define SHT_LOUSER 0x80000000
131 #define SHT_HIUSER 0xffffffff
133 /* Section header flags */
134 #define SHF_WRITE 0x1
135 #define SHF_ALLOC 0x2
136 #define SHF_EXECINSTR 0x4
137 #define SHF_MASKPROC 0xf0000000
139 /* Special section numbers */
141 #define SHN_LORESERVE 0xff00
142 #define SHN_LOPROC 0xff00
143 #define SHN_HIPROC 0xff1f
144 #define SHN_ABS 0xfff1
145 #define SHN_COMMON 0xfff2
146 #define SHN_HIRESERVE 0xffff
148 /* Lenght of magic at the start of a file */
151 /* Magic number constants... */
152 #define EI_MAG0 0 /* e_ident[] indexes */
162 #define ELFMAG0 0x7f /* EI_MAG */
166 #define ELFMAG "\177ELF"
169 #define ELFCLASSNONE 0 /* EI_CLASS */
172 #define ELFCLASSNUM 3
174 #define ELFDATANONE 0 /* e_ident[EI_DATA] */
175 #define ELFDATA2LSB 1
176 #define ELFDATA2MSB 2
178 #define EV_NONE 0 /* e_version, EI_VERSION */
182 #define ELFOSABI_NONE 0
183 #define ELFOSABI_LINUX 3
185 #endif /* _SYS_ELFCOMMON_H */