1 /****************************************************************************
2 ****************************************************************************
4 *** This header was automatically generated from a Linux kernel header
5 *** of the same name, to make information necessary for userspace to
6 *** call into the kernel available to libc. It contains only constants,
7 *** structures, and macros generated from the original header, and thus,
8 *** contains no copyrightable information.
10 *** To edit the content of this header, modify the corresponding
11 *** source file (e.g. under external/kernel-headers/original/) then
12 *** run bionic/libc/kernel/tools/update_all.py
14 *** Any manual change here will be lost the next time this script will
15 *** be run. You've been warned!
17 ****************************************************************************
18 ****************************************************************************/
21 This file was copied from /bionic/libc/kernel/uapi/linux/elf.h of android
22 source tree and has below changes.
24 - Removed included header file linux/types.h, linux/elf-em.h
26 - Replaced __u32 with uint32_t
27 - Replaced __u16 with uint16_t
28 - Replaced __u64 with uint64_t
29 - Replaced __s32 with int32_t
30 - Replaced __s16 with int16_t
31 - Replaced __s64 with int64_t
34 #ifndef _UAPI_LINUX_ELF_H
35 #define _UAPI_LINUX_ELF_H
39 /* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
40 typedef uint32_t Elf32_Addr
;
41 typedef uint16_t Elf32_Half
;
42 typedef uint32_t Elf32_Off
;
43 typedef int32_t Elf32_Sword
;
44 /* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
45 typedef uint32_t Elf32_Word
;
46 typedef uint64_t Elf64_Addr
;
47 typedef uint16_t Elf64_Half
;
48 typedef int16_t Elf64_SHalf
;
49 /* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
50 typedef uint64_t Elf64_Off
;
51 typedef int32_t Elf64_Sword
;
52 typedef uint32_t Elf64_Word
;
53 typedef uint64_t Elf64_Xword
;
54 /* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
55 typedef int64_t Elf64_Sxword
;
59 /* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
64 /* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
66 #define PT_LOOS 0x60000000
67 #define PT_HIOS 0x6fffffff
68 #define PT_LOPROC 0x70000000
69 /* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
70 #define PT_HIPROC 0x7fffffff
71 #define PT_GNU_EH_FRAME 0x6474e550
72 #define PT_GNU_STACK (PT_LOOS + 0x474e551)
73 #define PN_XNUM 0xffff
74 /* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
79 /* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
81 #define ET_LOPROC 0xff00
82 #define ET_HIPROC 0xffff
84 /* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
89 /* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
94 /* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
99 /* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
103 #define DT_SYMBOLIC 16
104 /* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
109 /* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
111 #define DT_TEXTREL 22
113 #define DT_ENCODING 32
114 /* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
115 #define OLD_DT_LOOS 0x60000000
116 #define DT_LOOS 0x6000000d
117 #define DT_HIOS 0x6ffff000
118 #define DT_VALRNGLO 0x6ffffd00
119 /* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
120 #define DT_VALRNGHI 0x6ffffdff
121 #define DT_ADDRRNGLO 0x6ffffe00
122 #define DT_ADDRRNGHI 0x6ffffeff
123 #define DT_VERSYM 0x6ffffff0
124 /* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
125 #define DT_RELACOUNT 0x6ffffff9
126 #define DT_RELCOUNT 0x6ffffffa
127 #define DT_FLAGS_1 0x6ffffffb
128 #define DT_VERDEF 0x6ffffffc
129 /* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
130 #define DT_VERDEFNUM 0x6ffffffd
131 #define DT_VERNEED 0x6ffffffe
132 #define DT_VERNEEDNUM 0x6fffffff
133 #define OLD_DT_HIOS 0x6fffffff
134 /* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
135 #define DT_LOPROC 0x70000000
136 #define DT_HIPROC 0x7fffffff
139 /* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
144 /* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
145 #define STT_SECTION 3
149 /* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
150 #define ELF_ST_BIND(x) ((x) >> 4)
151 #define ELF_ST_TYPE(x) (((unsigned int) x) & 0xf)
152 #define ELF32_ST_BIND(x) ELF_ST_BIND(x)
153 #define ELF32_ST_TYPE(x) ELF_ST_TYPE(x)
154 /* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
155 #define ELF64_ST_BIND(x) ELF_ST_BIND(x)
156 #define ELF64_ST_TYPE(x) ELF_ST_TYPE(x)
157 typedef struct dynamic
{
159 /* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
164 /* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
169 /* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
174 /* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
175 #define ELF32_R_SYM(x) ((x) >> 8)
176 #define ELF32_R_TYPE(x) ((x) & 0xff)
177 #define ELF64_R_SYM(i) ((i) >> 32)
178 #define ELF64_R_TYPE(i) ((i) & 0xffffffff)
179 /* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
180 typedef struct elf32_rel
{
184 /* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
185 typedef struct elf64_rel
{
189 /* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
190 typedef struct elf32_rela
{
193 Elf32_Sword r_addend
;
194 /* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
196 typedef struct elf64_rela
{
199 /* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
200 Elf64_Sxword r_addend
;
202 typedef struct elf32_sym
{
204 /* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
207 unsigned char st_info
;
208 unsigned char st_other
;
209 /* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
212 typedef struct elf64_sym
{
214 /* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
215 unsigned char st_info
;
216 unsigned char st_other
;
219 /* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
223 typedef struct elf32_hdr
{
224 /* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
225 unsigned char e_ident
[EI_NIDENT
];
227 Elf32_Half e_machine
;
228 Elf32_Word e_version
;
229 /* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
234 /* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
236 Elf32_Half e_phentsize
;
238 Elf32_Half e_shentsize
;
239 /* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
241 Elf32_Half e_shstrndx
;
243 typedef struct elf64_hdr
{
244 /* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
245 unsigned char e_ident
[EI_NIDENT
];
247 Elf64_Half e_machine
;
248 Elf64_Word e_version
;
249 /* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
254 /* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
256 Elf64_Half e_phentsize
;
258 Elf64_Half e_shentsize
;
259 /* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
261 Elf64_Half e_shstrndx
;
264 /* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
267 typedef struct elf32_phdr
{
269 /* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
274 /* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
279 /* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
280 typedef struct elf64_phdr
{
284 /* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
287 Elf64_Xword p_filesz
;
289 /* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
293 #define SHT_PROGBITS 1
294 /* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
299 /* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
300 #define SHT_DYNAMIC 6
304 /* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
306 #define SHT_DYNSYM 11
308 #define SHT_LOPROC 0x70000000
309 /* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
310 #define SHT_HIPROC 0x7fffffff
311 #define SHT_LOUSER 0x80000000
312 #define SHT_HIUSER 0xffffffff
313 #define SHF_WRITE 0x1
314 /* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
315 #define SHF_ALLOC 0x2
316 #define SHF_EXECINSTR 0x4
317 #define SHF_MASKPROC 0xf0000000
319 /* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
320 #define SHN_LORESERVE 0xff00
321 #define SHN_LOPROC 0xff00
322 #define SHN_HIPROC 0xff1f
323 #define SHN_ABS 0xfff1
324 /* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
325 #define SHN_COMMON 0xfff2
326 #define SHN_HIRESERVE 0xffff
327 typedef struct elf32_shdr
{
329 /* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
334 /* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
338 Elf32_Word sh_addralign
;
339 /* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
340 Elf32_Word sh_entsize
;
342 typedef struct elf64_shdr
{
344 /* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
346 Elf64_Xword sh_flags
;
349 /* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
353 Elf64_Xword sh_addralign
;
354 /* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
355 Elf64_Xword sh_entsize
;
359 /* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
364 /* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
369 /* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
373 #define ELFMAG "\177ELF"
374 /* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
376 #define ELFCLASSNONE 0
379 /* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
380 #define ELFCLASSNUM 3
381 #define ELFDATANONE 0
382 #define ELFDATA2LSB 1
383 #define ELFDATA2MSB 2
384 /* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
388 #define ELFOSABI_NONE 0
389 /* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
390 #define ELFOSABI_LINUX 3
392 #define ELF_OSABI ELFOSABI_NONE
394 /* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
395 #define NT_PRSTATUS 1
397 #define NT_PRPSINFO 3
398 #define NT_TASKSTRUCT 4
399 /* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
401 #define NT_SIGINFO 0x53494749
402 #define NT_FILE 0x46494c45
403 #define NT_PRXFPREG 0x46e62b7f
404 /* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
405 #define NT_PPC_VMX 0x100
406 #define NT_PPC_SPE 0x101
407 #define NT_PPC_VSX 0x102
408 #define NT_386_TLS 0x200
409 /* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
410 #define NT_386_IOPERM 0x201
411 #define NT_X86_XSTATE 0x202
412 #define NT_S390_HIGH_GPRS 0x300
413 #define NT_S390_TIMER 0x301
414 /* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
415 #define NT_S390_TODCMP 0x302
416 #define NT_S390_TODPREG 0x303
417 #define NT_S390_CTRS 0x304
418 #define NT_S390_PREFIX 0x305
419 /* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
420 #define NT_S390_LAST_BREAK 0x306
421 #define NT_S390_SYSTEM_CALL 0x307
422 #define NT_S390_TDB 0x308
423 #define NT_ARM_VFP 0x400
424 /* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
425 #define NT_ARM_TLS 0x401
426 #define NT_ARM_HW_BREAK 0x402
427 #define NT_ARM_HW_WATCH 0x403
428 #define NT_METAG_CBUF 0x500
429 /* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
430 #define NT_METAG_RPIPE 0x501
431 #define NT_METAG_TLS 0x502
432 typedef struct elf32_note
{
434 /* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
438 typedef struct elf64_note
{
439 /* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
444 /* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */