blob: f9f122aab9014aee799bc5ea6a834bac3ae7835e [file] [log] [blame]
Ben Cheng655a7c02013-10-16 16:09:24 -07001/****************************************************************************
2 ****************************************************************************
3 ***
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.
9 ***
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
13 ***
14 *** Any manual change here will be lost the next time this script will
15 *** be run. You've been warned!
16 ***
17 ****************************************************************************
18 ****************************************************************************/
19#ifndef _UAPI_LINUX_ELF_H
20#define _UAPI_LINUX_ELF_H
21#include <linux/types.h>
22#include <linux/elf-em.h>
Ben Cheng655a7c02013-10-16 16:09:24 -070023typedef __u32 Elf32_Addr;
24typedef __u16 Elf32_Half;
25typedef __u32 Elf32_Off;
26typedef __s32 Elf32_Sword;
Ben Cheng655a7c02013-10-16 16:09:24 -070027typedef __u32 Elf32_Word;
28typedef __u64 Elf64_Addr;
29typedef __u16 Elf64_Half;
30typedef __s16 Elf64_SHalf;
Ben Cheng655a7c02013-10-16 16:09:24 -070031typedef __u64 Elf64_Off;
32typedef __s32 Elf64_Sword;
33typedef __u32 Elf64_Word;
34typedef __u64 Elf64_Xword;
Ben Cheng655a7c02013-10-16 16:09:24 -070035typedef __s64 Elf64_Sxword;
36#define PT_NULL 0
37#define PT_LOAD 1
38#define PT_DYNAMIC 2
Ben Cheng655a7c02013-10-16 16:09:24 -070039#define PT_INTERP 3
40#define PT_NOTE 4
41#define PT_SHLIB 5
42#define PT_PHDR 6
Ben Cheng655a7c02013-10-16 16:09:24 -070043#define PT_TLS 7
44#define PT_LOOS 0x60000000
45#define PT_HIOS 0x6fffffff
46#define PT_LOPROC 0x70000000
Ben Cheng655a7c02013-10-16 16:09:24 -070047#define PT_HIPROC 0x7fffffff
48#define PT_GNU_EH_FRAME 0x6474e550
Christopher Ferris8177cdf2020-08-03 11:53:55 -070049#define PT_GNU_PROPERTY 0x6474e553
Ben Cheng655a7c02013-10-16 16:09:24 -070050#define PT_GNU_STACK (PT_LOOS + 0x474e551)
51#define PN_XNUM 0xffff
Ben Cheng655a7c02013-10-16 16:09:24 -070052#define ET_NONE 0
53#define ET_REL 1
54#define ET_EXEC 2
55#define ET_DYN 3
Ben Cheng655a7c02013-10-16 16:09:24 -070056#define ET_CORE 4
57#define ET_LOPROC 0xff00
58#define ET_HIPROC 0xffff
59#define DT_NULL 0
Ben Cheng655a7c02013-10-16 16:09:24 -070060#define DT_NEEDED 1
61#define DT_PLTRELSZ 2
62#define DT_PLTGOT 3
63#define DT_HASH 4
Ben Cheng655a7c02013-10-16 16:09:24 -070064#define DT_STRTAB 5
65#define DT_SYMTAB 6
66#define DT_RELA 7
67#define DT_RELASZ 8
Ben Cheng655a7c02013-10-16 16:09:24 -070068#define DT_RELAENT 9
69#define DT_STRSZ 10
70#define DT_SYMENT 11
71#define DT_INIT 12
Ben Cheng655a7c02013-10-16 16:09:24 -070072#define DT_FINI 13
73#define DT_SONAME 14
74#define DT_RPATH 15
75#define DT_SYMBOLIC 16
Ben Cheng655a7c02013-10-16 16:09:24 -070076#define DT_REL 17
77#define DT_RELSZ 18
78#define DT_RELENT 19
79#define DT_PLTREL 20
Ben Cheng655a7c02013-10-16 16:09:24 -070080#define DT_DEBUG 21
81#define DT_TEXTREL 22
82#define DT_JMPREL 23
83#define DT_ENCODING 32
Ben Cheng655a7c02013-10-16 16:09:24 -070084#define OLD_DT_LOOS 0x60000000
85#define DT_LOOS 0x6000000d
86#define DT_HIOS 0x6ffff000
87#define DT_VALRNGLO 0x6ffffd00
Ben Cheng655a7c02013-10-16 16:09:24 -070088#define DT_VALRNGHI 0x6ffffdff
89#define DT_ADDRRNGLO 0x6ffffe00
90#define DT_ADDRRNGHI 0x6ffffeff
91#define DT_VERSYM 0x6ffffff0
Ben Cheng655a7c02013-10-16 16:09:24 -070092#define DT_RELACOUNT 0x6ffffff9
93#define DT_RELCOUNT 0x6ffffffa
94#define DT_FLAGS_1 0x6ffffffb
95#define DT_VERDEF 0x6ffffffc
Ben Cheng655a7c02013-10-16 16:09:24 -070096#define DT_VERDEFNUM 0x6ffffffd
97#define DT_VERNEED 0x6ffffffe
98#define DT_VERNEEDNUM 0x6fffffff
99#define OLD_DT_HIOS 0x6fffffff
Ben Cheng655a7c02013-10-16 16:09:24 -0700100#define DT_LOPROC 0x70000000
101#define DT_HIPROC 0x7fffffff
102#define STB_LOCAL 0
103#define STB_GLOBAL 1
Ben Cheng655a7c02013-10-16 16:09:24 -0700104#define STB_WEAK 2
105#define STT_NOTYPE 0
106#define STT_OBJECT 1
107#define STT_FUNC 2
Ben Cheng655a7c02013-10-16 16:09:24 -0700108#define STT_SECTION 3
109#define STT_FILE 4
110#define STT_COMMON 5
111#define STT_TLS 6
Ben Cheng655a7c02013-10-16 16:09:24 -0700112#define ELF_ST_BIND(x) ((x) >> 4)
113#define ELF_ST_TYPE(x) (((unsigned int) x) & 0xf)
114#define ELF32_ST_BIND(x) ELF_ST_BIND(x)
115#define ELF32_ST_TYPE(x) ELF_ST_TYPE(x)
Ben Cheng655a7c02013-10-16 16:09:24 -0700116#define ELF64_ST_BIND(x) ELF_ST_BIND(x)
117#define ELF64_ST_TYPE(x) ELF_ST_TYPE(x)
Tao Baod7db5942015-01-28 10:07:51 -0800118typedef struct dynamic {
119 Elf32_Sword d_tag;
Tao Baod7db5942015-01-28 10:07:51 -0800120 union {
121 Elf32_Sword d_val;
122 Elf32_Addr d_ptr;
123 } d_un;
Ben Cheng655a7c02013-10-16 16:09:24 -0700124} Elf32_Dyn;
125typedef struct {
Tao Baod7db5942015-01-28 10:07:51 -0800126 Elf64_Sxword d_tag;
127 union {
Tao Baod7db5942015-01-28 10:07:51 -0800128 Elf64_Xword d_val;
129 Elf64_Addr d_ptr;
130 } d_un;
Ben Cheng655a7c02013-10-16 16:09:24 -0700131} Elf64_Dyn;
Ben Cheng655a7c02013-10-16 16:09:24 -0700132#define ELF32_R_SYM(x) ((x) >> 8)
133#define ELF32_R_TYPE(x) ((x) & 0xff)
134#define ELF64_R_SYM(i) ((i) >> 32)
135#define ELF64_R_TYPE(i) ((i) & 0xffffffff)
Ben Cheng655a7c02013-10-16 16:09:24 -0700136typedef struct elf32_rel {
Tao Baod7db5942015-01-28 10:07:51 -0800137 Elf32_Addr r_offset;
138 Elf32_Word r_info;
Ben Cheng655a7c02013-10-16 16:09:24 -0700139} Elf32_Rel;
Ben Cheng655a7c02013-10-16 16:09:24 -0700140typedef struct elf64_rel {
Tao Baod7db5942015-01-28 10:07:51 -0800141 Elf64_Addr r_offset;
142 Elf64_Xword r_info;
Ben Cheng655a7c02013-10-16 16:09:24 -0700143} Elf64_Rel;
Tao Baod7db5942015-01-28 10:07:51 -0800144typedef struct elf32_rela {
145 Elf32_Addr r_offset;
146 Elf32_Word r_info;
147 Elf32_Sword r_addend;
Ben Cheng655a7c02013-10-16 16:09:24 -0700148} Elf32_Rela;
149typedef struct elf64_rela {
Tao Baod7db5942015-01-28 10:07:51 -0800150 Elf64_Addr r_offset;
151 Elf64_Xword r_info;
Tao Baod7db5942015-01-28 10:07:51 -0800152 Elf64_Sxword r_addend;
Ben Cheng655a7c02013-10-16 16:09:24 -0700153} Elf64_Rela;
Tao Baod7db5942015-01-28 10:07:51 -0800154typedef struct elf32_sym {
155 Elf32_Word st_name;
Tao Baod7db5942015-01-28 10:07:51 -0800156 Elf32_Addr st_value;
157 Elf32_Word st_size;
158 unsigned char st_info;
159 unsigned char st_other;
Tao Baod7db5942015-01-28 10:07:51 -0800160 Elf32_Half st_shndx;
Ben Cheng655a7c02013-10-16 16:09:24 -0700161} Elf32_Sym;
162typedef struct elf64_sym {
Tao Baod7db5942015-01-28 10:07:51 -0800163 Elf64_Word st_name;
Tao Baod7db5942015-01-28 10:07:51 -0800164 unsigned char st_info;
165 unsigned char st_other;
166 Elf64_Half st_shndx;
167 Elf64_Addr st_value;
Tao Baod7db5942015-01-28 10:07:51 -0800168 Elf64_Xword st_size;
Ben Cheng655a7c02013-10-16 16:09:24 -0700169} Elf64_Sym;
170#define EI_NIDENT 16
Tao Baod7db5942015-01-28 10:07:51 -0800171typedef struct elf32_hdr {
Tao Baod7db5942015-01-28 10:07:51 -0800172 unsigned char e_ident[EI_NIDENT];
173 Elf32_Half e_type;
174 Elf32_Half e_machine;
175 Elf32_Word e_version;
Tao Baod7db5942015-01-28 10:07:51 -0800176 Elf32_Addr e_entry;
177 Elf32_Off e_phoff;
178 Elf32_Off e_shoff;
179 Elf32_Word e_flags;
Tao Baod7db5942015-01-28 10:07:51 -0800180 Elf32_Half e_ehsize;
181 Elf32_Half e_phentsize;
182 Elf32_Half e_phnum;
183 Elf32_Half e_shentsize;
Tao Baod7db5942015-01-28 10:07:51 -0800184 Elf32_Half e_shnum;
185 Elf32_Half e_shstrndx;
Ben Cheng655a7c02013-10-16 16:09:24 -0700186} Elf32_Ehdr;
187typedef struct elf64_hdr {
Tao Baod7db5942015-01-28 10:07:51 -0800188 unsigned char e_ident[EI_NIDENT];
189 Elf64_Half e_type;
190 Elf64_Half e_machine;
191 Elf64_Word e_version;
Tao Baod7db5942015-01-28 10:07:51 -0800192 Elf64_Addr e_entry;
193 Elf64_Off e_phoff;
194 Elf64_Off e_shoff;
195 Elf64_Word e_flags;
Tao Baod7db5942015-01-28 10:07:51 -0800196 Elf64_Half e_ehsize;
197 Elf64_Half e_phentsize;
198 Elf64_Half e_phnum;
199 Elf64_Half e_shentsize;
Tao Baod7db5942015-01-28 10:07:51 -0800200 Elf64_Half e_shnum;
201 Elf64_Half e_shstrndx;
Ben Cheng655a7c02013-10-16 16:09:24 -0700202} Elf64_Ehdr;
203#define PF_R 0x4
Ben Cheng655a7c02013-10-16 16:09:24 -0700204#define PF_W 0x2
205#define PF_X 0x1
Tao Baod7db5942015-01-28 10:07:51 -0800206typedef struct elf32_phdr {
207 Elf32_Word p_type;
Tao Baod7db5942015-01-28 10:07:51 -0800208 Elf32_Off p_offset;
209 Elf32_Addr p_vaddr;
210 Elf32_Addr p_paddr;
211 Elf32_Word p_filesz;
Tao Baod7db5942015-01-28 10:07:51 -0800212 Elf32_Word p_memsz;
213 Elf32_Word p_flags;
214 Elf32_Word p_align;
Ben Cheng655a7c02013-10-16 16:09:24 -0700215} Elf32_Phdr;
Ben Cheng655a7c02013-10-16 16:09:24 -0700216typedef struct elf64_phdr {
Tao Baod7db5942015-01-28 10:07:51 -0800217 Elf64_Word p_type;
218 Elf64_Word p_flags;
219 Elf64_Off p_offset;
Tao Baod7db5942015-01-28 10:07:51 -0800220 Elf64_Addr p_vaddr;
221 Elf64_Addr p_paddr;
222 Elf64_Xword p_filesz;
223 Elf64_Xword p_memsz;
Tao Baod7db5942015-01-28 10:07:51 -0800224 Elf64_Xword p_align;
Ben Cheng655a7c02013-10-16 16:09:24 -0700225} Elf64_Phdr;
226#define SHT_NULL 0
227#define SHT_PROGBITS 1
Ben Cheng655a7c02013-10-16 16:09:24 -0700228#define SHT_SYMTAB 2
229#define SHT_STRTAB 3
230#define SHT_RELA 4
231#define SHT_HASH 5
Ben Cheng655a7c02013-10-16 16:09:24 -0700232#define SHT_DYNAMIC 6
233#define SHT_NOTE 7
234#define SHT_NOBITS 8
235#define SHT_REL 9
Ben Cheng655a7c02013-10-16 16:09:24 -0700236#define SHT_SHLIB 10
237#define SHT_DYNSYM 11
238#define SHT_NUM 12
239#define SHT_LOPROC 0x70000000
Ben Cheng655a7c02013-10-16 16:09:24 -0700240#define SHT_HIPROC 0x7fffffff
241#define SHT_LOUSER 0x80000000
242#define SHT_HIUSER 0xffffffff
243#define SHF_WRITE 0x1
Ben Cheng655a7c02013-10-16 16:09:24 -0700244#define SHF_ALLOC 0x2
245#define SHF_EXECINSTR 0x4
Christopher Ferris106b3a82016-08-24 12:15:38 -0700246#define SHF_RELA_LIVEPATCH 0x00100000
Christopher Ferris49f525c2016-12-12 14:55:36 -0800247#define SHF_RO_AFTER_INIT 0x00200000
Christopher Ferris49f525c2016-12-12 14:55:36 -0800248#define SHF_MASKPROC 0xf0000000
Christopher Ferris106b3a82016-08-24 12:15:38 -0700249#define SHN_UNDEF 0
Ben Cheng655a7c02013-10-16 16:09:24 -0700250#define SHN_LORESERVE 0xff00
251#define SHN_LOPROC 0xff00
Christopher Ferris49f525c2016-12-12 14:55:36 -0800252#define SHN_HIPROC 0xff1f
Christopher Ferris106b3a82016-08-24 12:15:38 -0700253#define SHN_LIVEPATCH 0xff20
254#define SHN_ABS 0xfff1
Ben Cheng655a7c02013-10-16 16:09:24 -0700255#define SHN_COMMON 0xfff2
Christopher Ferris49f525c2016-12-12 14:55:36 -0800256#define SHN_HIRESERVE 0xffff
Ben Cheng655a7c02013-10-16 16:09:24 -0700257typedef struct elf32_shdr {
Tao Baod7db5942015-01-28 10:07:51 -0800258 Elf32_Word sh_name;
Tao Baod7db5942015-01-28 10:07:51 -0800259 Elf32_Word sh_type;
Christopher Ferris49f525c2016-12-12 14:55:36 -0800260 Elf32_Word sh_flags;
Tao Baod7db5942015-01-28 10:07:51 -0800261 Elf32_Addr sh_addr;
262 Elf32_Off sh_offset;
Tao Baod7db5942015-01-28 10:07:51 -0800263 Elf32_Word sh_size;
Christopher Ferris49f525c2016-12-12 14:55:36 -0800264 Elf32_Word sh_link;
Tao Baod7db5942015-01-28 10:07:51 -0800265 Elf32_Word sh_info;
266 Elf32_Word sh_addralign;
Tao Baod7db5942015-01-28 10:07:51 -0800267 Elf32_Word sh_entsize;
Christopher Ferris49f525c2016-12-12 14:55:36 -0800268} Elf32_Shdr;
Ben Cheng655a7c02013-10-16 16:09:24 -0700269typedef struct elf64_shdr {
Tao Baod7db5942015-01-28 10:07:51 -0800270 Elf64_Word sh_name;
Tao Baod7db5942015-01-28 10:07:51 -0800271 Elf64_Word sh_type;
Christopher Ferris49f525c2016-12-12 14:55:36 -0800272 Elf64_Xword sh_flags;
Tao Baod7db5942015-01-28 10:07:51 -0800273 Elf64_Addr sh_addr;
274 Elf64_Off sh_offset;
Tao Baod7db5942015-01-28 10:07:51 -0800275 Elf64_Xword sh_size;
Christopher Ferris49f525c2016-12-12 14:55:36 -0800276 Elf64_Word sh_link;
Tao Baod7db5942015-01-28 10:07:51 -0800277 Elf64_Word sh_info;
278 Elf64_Xword sh_addralign;
Tao Baod7db5942015-01-28 10:07:51 -0800279 Elf64_Xword sh_entsize;
Christopher Ferris49f525c2016-12-12 14:55:36 -0800280} Elf64_Shdr;
Ben Cheng655a7c02013-10-16 16:09:24 -0700281#define EI_MAG0 0
282#define EI_MAG1 1
Ben Cheng655a7c02013-10-16 16:09:24 -0700283#define EI_MAG2 2
Christopher Ferris49f525c2016-12-12 14:55:36 -0800284#define EI_MAG3 3
Ben Cheng655a7c02013-10-16 16:09:24 -0700285#define EI_CLASS 4
286#define EI_DATA 5
Ben Cheng655a7c02013-10-16 16:09:24 -0700287#define EI_VERSION 6
Christopher Ferris49f525c2016-12-12 14:55:36 -0800288#define EI_OSABI 7
Ben Cheng655a7c02013-10-16 16:09:24 -0700289#define EI_PAD 8
290#define ELFMAG0 0x7f
Ben Cheng655a7c02013-10-16 16:09:24 -0700291#define ELFMAG1 'E'
Christopher Ferris49f525c2016-12-12 14:55:36 -0800292#define ELFMAG2 'L'
Ben Cheng655a7c02013-10-16 16:09:24 -0700293#define ELFMAG3 'F'
294#define ELFMAG "\177ELF"
Ben Cheng655a7c02013-10-16 16:09:24 -0700295#define SELFMAG 4
Christopher Ferris49f525c2016-12-12 14:55:36 -0800296#define ELFCLASSNONE 0
Ben Cheng655a7c02013-10-16 16:09:24 -0700297#define ELFCLASS32 1
298#define ELFCLASS64 2
Ben Cheng655a7c02013-10-16 16:09:24 -0700299#define ELFCLASSNUM 3
Christopher Ferris49f525c2016-12-12 14:55:36 -0800300#define ELFDATANONE 0
Ben Cheng655a7c02013-10-16 16:09:24 -0700301#define ELFDATA2LSB 1
302#define ELFDATA2MSB 2
Ben Cheng655a7c02013-10-16 16:09:24 -0700303#define EV_NONE 0
Christopher Ferris49f525c2016-12-12 14:55:36 -0800304#define EV_CURRENT 1
Ben Cheng655a7c02013-10-16 16:09:24 -0700305#define EV_NUM 2
306#define ELFOSABI_NONE 0
Ben Cheng655a7c02013-10-16 16:09:24 -0700307#define ELFOSABI_LINUX 3
Christopher Ferris49f525c2016-12-12 14:55:36 -0800308#ifndef ELF_OSABI
Ben Cheng655a7c02013-10-16 16:09:24 -0700309#define ELF_OSABI ELFOSABI_NONE
310#endif
Ben Cheng655a7c02013-10-16 16:09:24 -0700311#define NT_PRSTATUS 1
Christopher Ferris49f525c2016-12-12 14:55:36 -0800312#define NT_PRFPREG 2
Ben Cheng655a7c02013-10-16 16:09:24 -0700313#define NT_PRPSINFO 3
314#define NT_TASKSTRUCT 4
Ben Cheng655a7c02013-10-16 16:09:24 -0700315#define NT_AUXV 6
Christopher Ferris49f525c2016-12-12 14:55:36 -0800316#define NT_SIGINFO 0x53494749
Ben Cheng655a7c02013-10-16 16:09:24 -0700317#define NT_FILE 0x46494c45
318#define NT_PRXFPREG 0x46e62b7f
Ben Cheng655a7c02013-10-16 16:09:24 -0700319#define NT_PPC_VMX 0x100
Christopher Ferris49f525c2016-12-12 14:55:36 -0800320#define NT_PPC_SPE 0x101
Ben Cheng655a7c02013-10-16 16:09:24 -0700321#define NT_PPC_VSX 0x102
Christopher Ferris49f525c2016-12-12 14:55:36 -0800322#define NT_PPC_TAR 0x103
323#define NT_PPC_PPR 0x104
Christopher Ferris49f525c2016-12-12 14:55:36 -0800324#define NT_PPC_DSCR 0x105
325#define NT_PPC_EBB 0x106
326#define NT_PPC_PMU 0x107
327#define NT_PPC_TM_CGPR 0x108
Christopher Ferris49f525c2016-12-12 14:55:36 -0800328#define NT_PPC_TM_CFPR 0x109
329#define NT_PPC_TM_CVMX 0x10a
330#define NT_PPC_TM_CVSX 0x10b
331#define NT_PPC_TM_SPR 0x10c
Christopher Ferris49f525c2016-12-12 14:55:36 -0800332#define NT_PPC_TM_CTAR 0x10d
333#define NT_PPC_TM_CPPR 0x10e
334#define NT_PPC_TM_CDSCR 0x10f
Christopher Ferris76a1d452018-06-27 14:12:29 -0700335#define NT_PPC_PKEY 0x110
Ben Cheng655a7c02013-10-16 16:09:24 -0700336#define NT_386_TLS 0x200
Ben Cheng655a7c02013-10-16 16:09:24 -0700337#define NT_386_IOPERM 0x201
338#define NT_X86_XSTATE 0x202
339#define NT_S390_HIGH_GPRS 0x300
340#define NT_S390_TIMER 0x301
Ben Cheng655a7c02013-10-16 16:09:24 -0700341#define NT_S390_TODCMP 0x302
342#define NT_S390_TODPREG 0x303
343#define NT_S390_CTRS 0x304
344#define NT_S390_PREFIX 0x305
Ben Cheng655a7c02013-10-16 16:09:24 -0700345#define NT_S390_LAST_BREAK 0x306
346#define NT_S390_SYSTEM_CALL 0x307
347#define NT_S390_TDB 0x308
Christopher Ferris82d75042015-01-26 10:57:07 -0800348#define NT_S390_VXRS_LOW 0x309
Christopher Ferris82d75042015-01-26 10:57:07 -0800349#define NT_S390_VXRS_HIGH 0x30a
Christopher Ferris525ce912017-07-26 13:12:53 -0700350#define NT_S390_GS_CB 0x30b
351#define NT_S390_GS_BC 0x30c
Christopher Ferris934ec942018-01-31 15:29:16 -0800352#define NT_S390_RI_CB 0x30d
Christopher Ferris82d75042015-01-26 10:57:07 -0800353#define NT_ARM_VFP 0x400
Ben Cheng655a7c02013-10-16 16:09:24 -0700354#define NT_ARM_TLS 0x401
355#define NT_ARM_HW_BREAK 0x402
356#define NT_ARM_HW_WATCH 0x403
Christopher Ferris05d08e92016-02-04 13:16:38 -0800357#define NT_ARM_SYSTEM_CALL 0x404
Christopher Ferris934ec942018-01-31 15:29:16 -0800358#define NT_ARM_SVE 0x405
Christopher Ferrisd842e432019-03-07 10:21:59 -0800359#define NT_ARM_PAC_MASK 0x406
Christopher Ferris24f97eb2019-05-20 12:58:13 -0700360#define NT_ARM_PACA_KEYS 0x407
361#define NT_ARM_PACG_KEYS 0x408
Christopher Ferris32ff3f82020-12-14 13:10:04 -0800362#define NT_ARM_TAGGED_ADDR_CTRL 0x409
Christopher Ferris525ce912017-07-26 13:12:53 -0700363#define NT_ARC_V2 0x600
Christopher Ferris9ce28842018-10-25 12:11:39 -0700364#define NT_VMCOREDD 0x700
365#define NT_MIPS_DSP 0x800
366#define NT_MIPS_FP_MODE 0x801
Christopher Ferrisd842e432019-03-07 10:21:59 -0800367#define NT_MIPS_MSA 0x802
Christopher Ferris8177cdf2020-08-03 11:53:55 -0700368#define NT_GNU_PROPERTY_TYPE_0 5
Ben Cheng655a7c02013-10-16 16:09:24 -0700369typedef struct elf32_note {
Tao Baod7db5942015-01-28 10:07:51 -0800370 Elf32_Word n_namesz;
371 Elf32_Word n_descsz;
Christopher Ferris05d08e92016-02-04 13:16:38 -0800372 Elf32_Word n_type;
Ben Cheng655a7c02013-10-16 16:09:24 -0700373} Elf32_Nhdr;
374typedef struct elf64_note {
Tao Baod7db5942015-01-28 10:07:51 -0800375 Elf64_Word n_namesz;
Christopher Ferris05d08e92016-02-04 13:16:38 -0800376 Elf64_Word n_descsz;
Tao Baod7db5942015-01-28 10:07:51 -0800377 Elf64_Word n_type;
Ben Cheng655a7c02013-10-16 16:09:24 -0700378} Elf64_Nhdr;
Christopher Ferris8177cdf2020-08-03 11:53:55 -0700379#define GNU_PROPERTY_AARCH64_FEATURE_1_AND 0xc0000000
380#define GNU_PROPERTY_AARCH64_FEATURE_1_BTI (1U << 0)
Ben Cheng655a7c02013-10-16 16:09:24 -0700381#endif