1 #-------------------------------------------------------------------------------
2 # elftools: elf/enums.py
4 # Mappings of enum names to values
6 # Eli Bendersky (eliben@gmail.com)
7 # This code is in the public domain
8 #-------------------------------------------------------------------------------
9 from ..common
.utils
import merge_dicts
10 from ..construct
import Pass
13 # e_ident[EI_CLASS] in the ELF header
20 # e_ident[EI_DATA] in the ELF header
27 # e_version in the ELF header
28 ENUM_E_VERSION
= dict(
34 # e_ident[EI_OSABI] in the ELF header
54 ELFOSABI_ARM_AEABI
=64,
56 ELFOSABI_CELL_LV2
=102,
57 ELFOSABI_STANDALONE
=255,
61 # e_type in the ELF header
73 # e_machine in the ELF header
74 ENUM_E_MACHINE
= dict(
75 EM_NONE
= 0, # No machine
76 EM_M32
= 1, # AT&T WE 32100
78 EM_386
= 3, # Intel 80386
79 EM_68K
= 4, # Motorola 68000
80 EM_88K
= 5, # Motorola 88000
81 EM_IAMCU
= 6, # Intel MCU
82 EM_860
= 7, # Intel 80860
83 EM_MIPS
= 8, # MIPS I Architecture
84 EM_S370
= 9, # IBM System/370 Processor
85 EM_MIPS_RS3_LE
= 10, # MIPS RS3000 Little-endian
86 EM_PARISC
= 15, # Hewlett-Packard PA-RISC
87 EM_VPP500
= 17, # Fujitsu VPP500
88 EM_SPARC32PLUS
= 18, # Enhanced instruction set SPARC
89 EM_960
= 19, # Intel 80960
90 EM_PPC
= 20, # PowerPC
91 EM_PPC64
= 21, # 64-bit PowerPC
92 EM_S390
= 22, # IBM System/390 Processor
93 EM_SPU
= 23, # IBM SPU/SPC
94 EM_V800
= 36, # NEC V800
95 EM_FR20
= 37, # Fujitsu FR20
96 EM_RH32
= 38, # TRW RH-32
97 EM_RCE
= 39, # Motorola RCE
98 EM_ARM
= 40, # ARM 32-bit architecture (AARCH32)
99 EM_ALPHA
= 41, # Digital Alpha
100 EM_SH
= 42, # Hitachi SH
101 EM_SPARCV9
= 43, # SPARC Version 9
102 EM_TRICORE
= 44, # Siemens TriCore embedded processor
103 EM_ARC
= 45, # Argonaut RISC Core, Argonaut Technologies Inc.
104 EM_H8_300
= 46, # Hitachi H8/300
105 EM_H8_300H
= 47, # Hitachi H8/300H
106 EM_H8S
= 48, # Hitachi H8S
107 EM_H8_500
= 49, # Hitachi H8/500
108 EM_IA_64
= 50, # Intel IA-64 processor architecture
109 EM_MIPS_X
= 51, # Stanford MIPS-X
110 EM_COLDFIRE
= 52, # Motorola ColdFire
111 EM_68HC12
= 53, # Motorola M68HC12
112 EM_MMA
= 54, # Fujitsu MMA Multimedia Accelerator
113 EM_PCP
= 55, # Siemens PCP
114 EM_NCPU
= 56, # Sony nCPU embedded RISC processor
115 EM_NDR1
= 57, # Denso NDR1 microprocessor
116 EM_STARCORE
= 58, # Motorola Star*Core processor
117 EM_ME16
= 59, # Toyota ME16 processor
118 EM_ST100
= 60, # STMicroelectronics ST100 processor
119 EM_TINYJ
= 61, # Advanced Logic Corp. TinyJ embedded processor family
120 EM_X86_64
= 62, # AMD x86-64 architecture
121 EM_PDSP
= 63, # Sony DSP Processor
122 EM_PDP10
= 64, # Digital Equipment Corp. PDP-10
123 EM_PDP11
= 65, # Digital Equipment Corp. PDP-11
124 EM_FX66
= 66, # Siemens FX66 microcontroller
125 EM_ST9PLUS
= 67, # STMicroelectronics ST9+ 8/16 bit microcontroller
126 EM_ST7
= 68, # STMicroelectronics ST7 8-bit microcontroller
127 EM_68HC16
= 69, # Motorola MC68HC16 Microcontroller
128 EM_68HC11
= 70, # Motorola MC68HC11 Microcontroller
129 EM_68HC08
= 71, # Motorola MC68HC08 Microcontroller
130 EM_68HC05
= 72, # Motorola MC68HC05 Microcontroller
131 EM_SVX
= 73, # Silicon Graphics SVx
132 EM_ST19
= 74, # STMicroelectronics ST19 8-bit microcontroller
133 EM_VAX
= 75, # Digital VAX
134 EM_CRIS
= 76, # Axis Communications 32-bit embedded processor
135 EM_JAVELIN
= 77, # Infineon Technologies 32-bit embedded processor
136 EM_FIREPATH
= 78, # Element 14 64-bit DSP Processor
137 EM_ZSP
= 79, # LSI Logic 16-bit DSP Processor
138 EM_MMIX
= 80, # Donald Knuth's educational 64-bit processor
139 EM_HUANY
= 81, # Harvard University machine-independent object files
140 EM_PRISM
= 82, # SiTera Prism
141 EM_AVR
= 83, # Atmel AVR 8-bit microcontroller
142 EM_FR30
= 84, # Fujitsu FR30
143 EM_D10V
= 85, # Mitsubishi D10V
144 EM_D30V
= 86, # Mitsubishi D30V
145 EM_V850
= 87, # NEC v850
146 EM_M32R
= 88, # Mitsubishi M32R
147 EM_MN10300
= 89, # Matsushita MN10300
148 EM_MN10200
= 90, # Matsushita MN10200
149 EM_PJ
= 91, # picoJava
150 EM_OPENRISC
= 92, # OpenRISC 32-bit embedded processor
151 EM_ARC_COMPACT
= 93, # ARC International ARCompact processor (old spelling/synonym: EM_ARC_A5)
152 EM_XTENSA
= 94, # Tensilica Xtensa Architecture
153 EM_VIDEOCORE
= 95, # Alphamosaic VideoCore processor
154 EM_TMM_GPP
= 96, # Thompson Multimedia General Purpose Processor
155 EM_NS32K
= 97, # National Semiconductor 32000 series
156 EM_TPC
= 98, # Tenor Network TPC processor
157 EM_SNP1K
= 99, # Trebia SNP 1000 processor
158 EM_ST200
= 100, # STMicroelectronics (www.st.com) ST200 microcontroller
159 EM_IP2K
= 101, # Ubicom IP2xxx microcontroller family
160 EM_MAX
= 102, # MAX Processor
161 EM_CR
= 103, # National Semiconductor CompactRISC microprocessor
162 EM_F2MC16
= 104, # Fujitsu F2MC16
163 EM_MSP430
= 105, # Texas Instruments embedded microcontroller msp430
164 EM_BLACKFIN
= 106, # Analog Devices Blackfin (DSP) processor
165 EM_SE_C33
= 107, # S1C33 Family of Seiko Epson processors
166 EM_SEP
= 108, # Sharp embedded microprocessor
167 EM_ARCA
= 109, # Arca RISC Microprocessor
168 EM_UNICORE
= 110, # Microprocessor series from PKU-Unity Ltd. and MPRC of Peking University
169 EM_EXCESS
= 111, # eXcess: 16/32/64-bit configurable embedded CPU
170 EM_DXP
= 112, # Icera Semiconductor Inc. Deep Execution Processor
171 EM_ALTERA_NIOS2
= 113, # Altera Nios II soft-core processor
172 EM_CRX
= 114, # National Semiconductor CompactRISC CRX microprocessor
173 EM_XGATE
= 115, # Motorola XGATE embedded processor
174 EM_C166
= 116, # Infineon C16x/XC16x processor
175 EM_M16C
= 117, # Renesas M16C series microprocessors
176 EM_DSPIC30F
= 118, # Microchip Technology dsPIC30F Digital Signal Controller
177 EM_CE
= 119, # Freescale Communication Engine RISC core
178 EM_M32C
= 120, # Renesas M32C series microprocessors
179 EM_TSK3000
= 131, # Altium TSK3000 core
180 EM_RS08
= 132, # Freescale RS08 embedded processor
181 EM_SHARC
= 133, # Analog Devices SHARC family of 32-bit DSP processors
182 EM_ECOG2
= 134, # Cyan Technology eCOG2 microprocessor
183 EM_SCORE7
= 135, # Sunplus S+core7 RISC processor
184 EM_DSP24
= 136, # New Japan Radio (NJR) 24-bit DSP Processor
185 EM_VIDEOCORE3
= 137, # Broadcom VideoCore III processor
186 EM_LATTICEMICO32
= 138, # RISC processor for Lattice FPGA architecture
187 EM_SE_C17
= 139, # Seiko Epson C17 family
188 EM_TI_C6000
= 140, # The Texas Instruments TMS320C6000 DSP family
189 EM_TI_C2000
= 141, # The Texas Instruments TMS320C2000 DSP family
190 EM_TI_C5500
= 142, # The Texas Instruments TMS320C55x DSP family
191 EM_TI_ARP32
= 143, # Texas Instruments Application Specific RISC Processor, 32bit fetch
192 EM_TI_PRU
= 144, # Texas Instruments Programmable Realtime Unit
193 EM_MMDSP_PLUS
= 160, # STMicroelectronics 64bit VLIW Data Signal Processor
194 EM_CYPRESS_M8C
= 161, # Cypress M8C microprocessor
195 EM_R32C
= 162, # Renesas R32C series microprocessors
196 EM_TRIMEDIA
= 163, # NXP Semiconductors TriMedia architecture family
197 EM_QDSP6
= 164, # QUALCOMM DSP6 Processor
198 EM_8051
= 165, # Intel 8051 and variants
199 EM_STXP7X
= 166, # STMicroelectronics STxP7x family of configurable and extensible RISC processors
200 EM_NDS32
= 167, # Andes Technology compact code size embedded RISC processor family
201 EM_ECOG1
= 168, # Cyan Technology eCOG1X family
202 EM_ECOG1X
= 168, # Cyan Technology eCOG1X family
203 EM_MAXQ30
= 169, # Dallas Semiconductor MAXQ30 Core Micro-controllers
204 EM_XIMO16
= 170, # New Japan Radio (NJR) 16-bit DSP Processor
205 EM_MANIK
= 171, # M2000 Reconfigurable RISC Microprocessor
206 EM_CRAYNV2
= 172, # Cray Inc. NV2 vector architecture
207 EM_RX
= 173, # Renesas RX family
208 EM_METAG
= 174, # Imagination Technologies META processor architecture
209 EM_MCST_ELBRUS
= 175, # MCST Elbrus general purpose hardware architecture
210 EM_ECOG16
= 176, # Cyan Technology eCOG16 family
211 EM_CR16
= 177, # National Semiconductor CompactRISC CR16 16-bit microprocessor
212 EM_ETPU
= 178, # Freescale Extended Time Processing Unit
213 EM_SLE9X
= 179, # Infineon Technologies SLE9X core
214 EM_L10M
= 180, # Intel L10M
215 EM_K10M
= 181, # Intel K10M
216 EM_AARCH64
= 183, # ARM 64-bit architecture (AARCH64)
217 EM_AVR32
= 185, # Atmel Corporation 32-bit microprocessor family
218 EM_STM8
= 186, # STMicroeletronics STM8 8-bit microcontroller
219 EM_TILE64
= 187, # Tilera TILE64 multicore architecture family
220 EM_TILEPRO
= 188, # Tilera TILEPro multicore architecture family
221 EM_MICROBLAZE
= 189, # Xilinx MicroBlaze 32-bit RISC soft processor core
222 EM_CUDA
= 190, # NVIDIA CUDA architecture
223 EM_TILEGX
= 191, # Tilera TILE-Gx multicore architecture family
224 EM_CLOUDSHIELD
= 192, # CloudShield architecture family
225 EM_COREA_1ST
= 193, # KIPO-KAIST Core-A 1st generation processor family
226 EM_COREA_2ND
= 194, # KIPO-KAIST Core-A 2nd generation processor family
227 EM_ARC_COMPACT2
= 195, # Synopsys ARCompact V2
228 EM_OPEN8
= 196, # Open8 8-bit RISC soft processor core
229 EM_RL78
= 197, # Renesas RL78 family
230 EM_VIDEOCORE5
= 198, # Broadcom VideoCore V processor
231 EM_78KOR
= 199, # Renesas 78KOR family
232 EM_56800EX
= 200, # Freescale 56800EX Digital Signal Controller (DSC)
233 EM_BA1
= 201, # Beyond BA1 CPU architecture
234 EM_BA2
= 202, # Beyond BA2 CPU architecture
235 EM_XCORE
= 203, # XMOS xCORE processor family
236 EM_MCHP_PIC
= 204, # Microchip 8-bit PIC(r) family
237 EM_INTEL205
= 205, # Reserved by Intel
238 EM_INTEL206
= 206, # Reserved by Intel
239 EM_INTEL207
= 207, # Reserved by Intel
240 EM_INTEL208
= 208, # Reserved by Intel
241 EM_INTEL209
= 209, # Reserved by Intel
242 EM_KM32
= 210, # KM211 KM32 32-bit processor
243 EM_KMX32
= 211, # KM211 KMX32 32-bit processor
244 EM_KMX16
= 212, # KM211 KMX16 16-bit processor
245 EM_KMX8
= 213, # KM211 KMX8 8-bit processor
246 EM_KVARC
= 214, # KM211 KVARC processor
247 EM_CDP
= 215, # Paneve CDP architecture family
248 EM_COGE
= 216, # Cognitive Smart Memory Processor
249 EM_COOL
= 217, # Bluechip Systems CoolEngine
250 EM_NORC
= 218, # Nanoradio Optimized RISC
251 EM_CSR_KALIMBA
= 219, # CSR Kalimba architecture family
252 EM_Z80
= 220, # Zilog Z80
253 EM_VISIUM
= 221, # Controls and Data Services VISIUMcore processor
254 EM_FT32
= 222, # FTDI Chip FT32 high performance 32-bit RISC architecture
255 EM_MOXIE
= 223, # Moxie processor family
256 EM_AMDGPU
= 224, # AMD GPU architecture
257 EM_RISCV
= 243, # RISC-V
258 EM_BPF
= 247, # Linux BPF - in-kernel virtual machine
259 EM_CSKY
= 252, # C-SKY
260 EM_LOONGARCH
= 258, # LoongArch
261 EM_FRV
= 0x5441, # Fujitsu FR-V
263 # reserved 11-14 Reserved for future use
264 # reserved 16 Reserved for future use
265 # reserved 24-35 Reserved for future use
266 # reserved 121-130 Reserved for future use
267 # reserved 145-159 Reserved for future use
268 # reserved 145-159 Reserved for future use
269 # reserved 182 Reserved for future Intel use
270 # reserved 184 Reserved for future ARM use
271 # unknown/reserve? 225 - 242
275 # sh_type in the section header
277 # This is the "base" dict that doesn't hold processor-specific values; from it
278 # we later create per-processor dicts that use the LOPROC...HIPROC range to
279 # define processor-specific values. The proper dict should be used based on the
280 # machine the ELF header refers to.
281 ENUM_SH_TYPE_BASE
= dict(
296 SHT_PREINIT_ARRAY
=16,
302 SHT_GNU_ATTRIBUTES
=0x6ffffff5,
303 SHT_GNU_HASH
=0x6ffffff6,
304 SHT_GNU_LIBLIST
=0x6ffffff7,
305 SHT_GNU_verdef
=0x6ffffffd, # also SHT_SUNW_verdef
306 SHT_GNU_verneed
=0x6ffffffe, # also SHT_SUNW_verneed
307 SHT_GNU_versym
=0x6fffffff, # also SHT_SUNW_versym, SHT_HIOS
309 # These are commented out because they carry no semantic meaning in
310 # themselves and may be overridden by target-specific enums.
311 #SHT_LOPROC=0x70000000,
312 #SHT_HIPROC=0x7fffffff,
314 SHT_LOUSER
=0x80000000,
315 SHT_HIUSER
=0xffffffff,
316 SHT_SUNW_LDYNSYM
=0x6ffffff3,
317 SHT_SUNW_syminfo
=0x6ffffffc,
321 ENUM_SH_TYPE_AMD64
= merge_dicts(
323 dict(SHT_AMD64_UNWIND
=0x70000001))
325 ENUM_SH_TYPE_ARM
= merge_dicts(
328 SHT_ARM_EXIDX
=0x70000001,
329 SHT_ARM_PREEMPTMAP
=0x70000002,
330 SHT_ARM_ATTRIBUTES
=0x70000003,
331 SHT_ARM_DEBUGOVERLAY
=0x70000004))
333 ENUM_SH_TYPE_RISCV
= merge_dicts(
335 dict(SHT_RISCV_ATTRIBUTES
=0x70000003))
337 ENUM_SH_TYPE_MIPS
= merge_dicts(
340 SHT_MIPS_LIBLIST
=0x70000000,
341 SHT_MIPS_DEBUG
=0x70000005,
342 SHT_MIPS_REGINFO
=0x70000006,
343 SHT_MIPS_PACKAGE
=0x70000007,
344 SHT_MIPS_PACKSYM
=0x70000008,
345 SHT_MIPS_RELD
=0x70000009,
346 SHT_MIPS_IFACE
=0x7000000b,
347 SHT_MIPS_CONTENT
=0x7000000c,
348 SHT_MIPS_OPTIONS
=0x7000000d,
349 SHT_MIPS_SHDR
=0x70000010,
350 SHT_MIPS_FDESC
=0x70000011,
351 SHT_MIPS_EXTSYM
=0x70000012,
352 SHT_MIPS_DENSE
=0x70000013,
353 SHT_MIPS_PDESC
=0x70000014,
354 SHT_MIPS_LOCSYM
=0x70000015,
355 SHT_MIPS_AUXSYM
=0x70000016,
356 SHT_MIPS_OPTSYM
=0x70000017,
357 SHT_MIPS_LOCSTR
=0x70000018,
358 SHT_MIPS_LINE
=0x70000019,
359 SHT_MIPS_RFDESC
=0x7000001a,
360 SHT_MIPS_DELTASYM
=0x7000001b,
361 SHT_MIPS_DELTAINST
=0x7000001c,
362 SHT_MIPS_DELTACLASS
=0x7000001d,
363 SHT_MIPS_DWARF
=0x7000001e,
364 SHT_MIPS_DELTADECL
=0x7000001f,
365 SHT_MIPS_SYMBOL_LIB
=0x70000020,
366 SHT_MIPS_EVENTS
=0x70000021,
367 SHT_MIPS_TRANSLATE
=0x70000022,
368 SHT_MIPS_PIXIE
=0x70000023,
369 SHT_MIPS_XLATE
=0x70000024,
370 SHT_MIPS_XLATE_DEBUG
=0x70000025,
371 SHT_MIPS_WHIRL
=0x70000026,
372 SHT_MIPS_EH_REGION
=0x70000027,
373 SHT_MIPS_XLATE_OLD
=0x70000028,
374 SHT_MIPS_PDR_EXCEPTION
=0x70000029,
375 SHT_MIPS_ABIFLAGS
=0x7000002a))
377 ENUM_ELFCOMPRESS_TYPE
= dict(
379 ELFCOMPRESS_LOOS
=0x60000000,
380 ELFCOMPRESS_HIOS
=0x6fffffff,
381 ELFCOMPRESS_LOPROC
=0x70000000,
382 ELFCOMPRESS_HIPROC
=0x7fffffff,
386 # p_type in the program header
387 # some values scavenged from the ELF headers in binutils-2.21
389 # Using the same base + per-processor augmentation technique as in sh_type.
390 ENUM_P_TYPE_BASE
= dict(
402 # These are commented out because they carry no semantic meaning in
403 # themselves and may be overridden by target-specific enums.
404 #PT_LOPROC=0x70000000,
405 #PT_HIPROC=0x7fffffff,
407 PT_GNU_EH_FRAME
=0x6474e550,
408 PT_GNU_STACK
=0x6474e551,
409 PT_GNU_RELRO
=0x6474e552,
410 PT_GNU_PROPERTY
=0x6474e553,
414 ENUM_P_TYPE_ARM
= merge_dicts(
417 PT_ARM_ARCHEXT
=0x70000000,
418 PT_ARM_EXIDX
=0x70000001))
420 ENUM_P_TYPE_AARCH64
= merge_dicts(
423 PT_AARCH64_ARCHEXT
=0x70000000,
424 PT_AARCH64_UNWIND
=0x70000001))
426 ENUM_P_TYPE_MIPS
= merge_dicts(
428 dict(PT_MIPS_ABIFLAGS
=0x70000003))
430 ENUM_P_TYPE_RISCV
= merge_dicts(
432 dict(PT_RISCV_ATTRIBUTES
=0x70000003))
434 # st_info bindings in the symbol header
435 ENUM_ST_INFO_BIND
= dict(
447 # st_info type in the symbol header
448 ENUM_ST_INFO_TYPE
= dict(
466 # visibility from st_other
467 ENUM_ST_VISIBILITY
= dict(
478 ENUM_ST_LOCAL
= dict(
483 ENUM_ST_SHNDX
= dict(
491 ENUM_D_TAG_COMMON
= dict(
525 DT_PREINIT_ARRAYSZ
=33,
532 DT_ANDROID_REL
=0x6000000f,
533 DT_ANDROID_RELSZ
=0x60000010,
534 DT_ANDROID_RELA
=0x60000011,
535 DT_ANDROID_RELASZ
=0x60000012,
536 DT_ANDROID_RELR
=0x6fffe000,
537 DT_ANDROID_RELRSZ
=0x6fffe001,
538 DT_ANDROID_RELRENT
=0x6fffe003,
539 DT_ANDROID_RELRCOUNT
=0x6fffe005,
541 DT_LOPROC
=0x70000000,
542 DT_HIPROC
=0x7fffffff,
544 DT_VALRNGLO
=0x6ffffd00,
545 DT_GNU_PRELINKED
=0x6ffffdf5,
546 DT_GNU_CONFLICTSZ
=0x6ffffdf6,
547 DT_GNU_LIBLISTSZ
=0x6ffffdf7,
548 DT_CHECKSUM
=0x6ffffdf8,
549 DT_PLTPADSZ
=0x6ffffdf9,
550 DT_MOVEENT
=0x6ffffdfa,
551 DT_MOVESZ
=0x6ffffdfb,
552 DT_SYMINSZ
=0x6ffffdfe,
553 DT_SYMINENT
=0x6ffffdff,
554 DT_GNU_HASH
=0x6ffffef5,
555 DT_TLSDESC_PLT
=0x6ffffef6,
556 DT_TLSDESC_GOT
=0x6ffffef7,
557 DT_GNU_CONFLICT
=0x6ffffef8,
558 DT_GNU_LIBLIST
=0x6ffffef9,
559 DT_CONFIG
=0x6ffffefa,
560 DT_DEPAUDIT
=0x6ffffefb,
562 DT_PLTPAD
=0x6ffffefd,
563 DT_MOVETAB
=0x6ffffefe,
564 DT_SYMINFO
=0x6ffffeff,
565 DT_VERSYM
=0x6ffffff0,
566 DT_RELACOUNT
=0x6ffffff9,
567 DT_RELCOUNT
=0x6ffffffa,
568 DT_FLAGS_1
=0x6ffffffb,
569 DT_VERDEF
=0x6ffffffc,
570 DT_VERDEFNUM
=0x6ffffffd,
571 DT_VERNEED
=0x6ffffffe,
572 DT_VERNEEDNUM
=0x6fffffff,
573 DT_AUXILIARY
=0x7ffffffd,
574 DT_FILTER
=0x7fffffff,
578 # Above are the dynamic tags which are valid always.
579 # Below are the dynamic tags which are only valid in certain contexts.
581 ENUM_D_TAG_SOLARIS
= dict(
582 DT_SUNW_AUXILIARY
=0x6000000d,
583 DT_SUNW_RTLDINF
=0x6000000e,
584 DT_SUNW_FILTER
=0x6000000f,
585 DT_SUNW_CAP
=0x60000010,
586 DT_SUNW_SYMTAB
=0x60000011,
587 DT_SUNW_SYMSZ
=0x60000012,
588 DT_SUNW_ENCODING
=0x60000013,
589 DT_SUNW_SORTENT
=0x60000013,
590 DT_SUNW_SYMSORT
=0x60000014,
591 DT_SUNW_SYMSORTSZ
=0x60000015,
592 DT_SUNW_TLSSORT
=0x60000016,
593 DT_SUNW_TLSSORTSZ
=0x60000017,
594 DT_SUNW_CAPINFO
=0x60000018,
595 DT_SUNW_STRPAD
=0x60000019,
596 DT_SUNW_CAPCHAIN
=0x6000001a,
597 DT_SUNW_LDMACH
=0x6000001b,
598 DT_SUNW_CAPCHAINENT
=0x6000001d,
599 DT_SUNW_CAPCHAINSZ
=0x6000001f,
602 ENUM_D_TAG_MIPS
= dict(
603 DT_MIPS_RLD_VERSION
=0x70000001,
604 DT_MIPS_TIME_STAMP
=0x70000002,
605 DT_MIPS_ICHECKSUM
=0x70000003,
606 DT_MIPS_IVERSION
=0x70000004,
607 DT_MIPS_FLAGS
=0x70000005,
608 DT_MIPS_BASE_ADDRESS
=0x70000006,
609 DT_MIPS_CONFLICT
=0x70000008,
610 DT_MIPS_LIBLIST
=0x70000009,
611 DT_MIPS_LOCAL_GOTNO
=0x7000000a,
612 DT_MIPS_CONFLICTNO
=0x7000000b,
613 DT_MIPS_LIBLISTNO
=0x70000010,
614 DT_MIPS_SYMTABNO
=0x70000011,
615 DT_MIPS_UNREFEXTNO
=0x70000012,
616 DT_MIPS_GOTSYM
=0x70000013,
617 DT_MIPS_HIPAGENO
=0x70000014,
618 DT_MIPS_RLD_MAP
=0x70000016,
619 DT_MIPS_RLD_MAP_REL
=0x70000035,
622 # Here is the mapping from e_machine enum to the extra dynamic tags which it
623 # validates. Solaris is missing from this list because its inclusion is not
624 # controlled by e_machine but rather e_ident[EI_OSABI].
625 # TODO: add the rest of the machine-specific dynamic tags, not just mips and
628 ENUMMAP_EXTRA_D_TAG_MACHINE
= dict(
629 EM_MIPS
=ENUM_D_TAG_MIPS
,
630 EM_MIPS_RS3_LE
=ENUM_D_TAG_MIPS
,
633 # Here is the full combined mapping from tag name to value
635 ENUM_D_TAG
= dict(ENUM_D_TAG_COMMON
)
636 ENUM_D_TAG
.update(ENUM_D_TAG_SOLARIS
)
637 for k
in ENUMMAP_EXTRA_D_TAG_MACHINE
:
638 ENUM_D_TAG
.update(ENUMMAP_EXTRA_D_TAG_MACHINE
[k
])
640 ENUM_DT_FLAGS
= dict(
648 ENUM_DT_FLAGS_1
= dict(
659 DF_1_INTERPOSE
=0x400,
663 DF_1_ENDFILTEE
=0x4000,
664 DF_1_DISPRELDNE
=0x8000,
665 DF_1_DISPRELPND
=0x10000,
666 DF_1_NODIRECT
=0x20000,
667 DF_1_IGNMULDEF
=0x40000,
668 DF_1_NOKSYMS
=0x80000,
670 DF_1_EDITED
=0x200000,
671 DF_1_NORELOC
=0x400000,
672 DF_1_SYMINTPOSE
=0x800000,
673 DF_1_GLOBAUDIT
=0x1000000,
674 DF_1_SINGLETON
=0x2000000,
679 ENUM_RELOC_TYPE_MIPS
= dict(
711 R_MIPS_ADD_IMMEDIATE
=34,
715 R_MIPS_TLS_DTPMOD32
=38,
716 R_MIPS_TLS_DTPREL32
=39,
717 R_MIPS_TLS_DTPMOD64
=40,
718 R_MIPS_TLS_DTPREL64
=41,
721 R_MIPS_TLS_DTPREL_HI16
=44,
722 R_MIPS_TLS_DTPREL_LO16
=45,
723 R_MIPS_TLS_GOTTPREL
=46,
724 R_MIPS_TLS_TPREL32
=47,
725 R_MIPS_TLS_TPREL64
=48,
726 R_MIPS_TLS_TPREL_HI16
=49,
727 R_MIPS_TLS_TPREL_LO16
=50,
730 R_MIPS_JUMP_SLOT
=127,
734 ENUM_RELOC_TYPE_i386
= dict(
758 R_386_TLS_GD_PUSH
=25,
759 R_386_TLS_GD_CALL
=26,
762 R_386_TLS_LDM_PUSH
=29,
763 R_386_TLS_LDM_CALL
=30,
764 R_386_TLS_LDM_POP
=31,
768 R_386_TLS_DTPMOD32
=35,
769 R_386_TLS_DTPOFF32
=36,
770 R_386_TLS_TPOFF32
=37,
771 R_386_TLS_GOTDESC
=39,
772 R_386_TLS_DESC_CALL
=40,
775 R_386_USED_BY_INTEL_200
=200,
776 R_386_GNU_VTINHERIT
=250,
777 R_386_GNU_VTENTRY
=251,
781 ENUM_RELOC_TYPE_x64
= dict(
789 R_X86_64_JUMP_SLOT
=7,
798 R_X86_64_DTPMOD64
=16,
799 R_X86_64_DTPOFF64
=17,
803 R_X86_64_DTPOFF32
=21,
804 R_X86_64_GOTTPOFF
=22,
807 R_X86_64_GOTOFF64
=25,
810 R_X86_64_GOTPCREL64
=28,
812 R_X86_64_GOTPLT64
=30,
813 R_X86_64_PLTOFF64
=31,
814 R_X86_64_GOTPC32_TLSDESC
=34,
815 R_X86_64_TLSDESC_CALL
=35,
817 R_X86_64_IRELATIVE
=37,
818 R_X86_64_REX_GOTPCRELX
=42,
819 R_X86_64_GNU_VTINHERIT
=250,
820 R_X86_64_GNU_VTENTRY
=251,
824 ENUM_RELOC_TYPE_BPF
= dict(
834 # https://github.com/loongson/la-abi-specs/blob/release/laelf.adoc
835 ENUM_RELOC_TYPE_LOONGARCH
= dict(
842 R_LARCH_TLS_DTPMOD32
=6,
843 R_LARCH_TLS_DTPMOD64
=7,
844 R_LARCH_TLS_DTPREL32
=8,
845 R_LARCH_TLS_DTPREL64
=9,
846 R_LARCH_TLS_TPREL32
=10,
847 R_LARCH_TLS_TPREL64
=11,
848 R_LARCH_IRELATIVE
=12,
850 R_LARCH_MARK_PCREL
=21,
851 R_LARCH_SOP_PUSH_PCREL
=22,
852 R_LARCH_SOP_PUSH_ABSOLUTE
=23,
853 R_LARCH_SOP_PUSH_DUP
=24,
854 R_LARCH_SOP_PUSH_GPREL
=25,
855 R_LARCH_SOP_PUSH_TLS_TPREL
=26,
856 R_LARCH_SOP_PUSH_TLS_GOT
=27,
857 R_LARCH_SOP_PUSH_TLS_GD
=28,
858 R_LARCH_SOP_PUSH_PLT_PCREL
=29,
859 R_LARCH_SOP_ASSERT
=30,
866 R_LARCH_SOP_IF_ELSE
=37,
867 R_LARCH_SOP_POP_32_S_10_5
=38,
868 R_LARCH_SOP_POP_32_U_10_12
=39,
869 R_LARCH_SOP_POP_32_S_10_12
=40,
870 R_LARCH_SOP_POP_32_S_10_16
=41,
871 R_LARCH_SOP_POP_32_S_10_16_S2
=42,
872 R_LARCH_SOP_POP_32_S_5_20
=43,
873 R_LARCH_SOP_POP_32_S_0_5_10_16_S2
=44,
874 R_LARCH_SOP_POP_32_S_0_10_10_16_S2
=45,
875 R_LARCH_SOP_POP_32_U
=46,
886 R_LARCH_GNU_VTINHERIT
=57,
887 R_LARCH_GNU_VTENTRY
=58,
893 R_LARCH_ABS64_LO20
=69,
894 R_LARCH_ABS64_HI12
=70,
895 R_LARCH_PCALA_HI20
=71,
896 R_LARCH_PCALA_LO12
=72,
897 R_LARCH_PCALA64_LO20
=73,
898 R_LARCH_PCALA64_HI12
=74,
899 R_LARCH_GOT_PC_HI20
=75,
900 R_LARCH_GOT_PC_LO12
=76,
901 R_LARCH_GOT64_PC_LO20
=77,
902 R_LARCH_GOT64_PC_HI12
=78,
905 R_LARCH_GOT64_LO20
=81,
906 R_LARCH_GOT64_HI12
=82,
907 R_LARCH_TLS_LE_HI20
=83,
908 R_LARCH_TLS_LE_LO12
=84,
909 R_LARCH_TLS_LE64_LO20
=85,
910 R_LARCH_TLS_LE64_HI12
=86,
911 R_LARCH_TLS_IE_PC_HI20
=87,
912 R_LARCH_TLS_IE_PC_LO12
=88,
913 R_LARCH_TLS_IE64_PC_LO20
=89,
914 R_LARCH_TLS_IE64_PC_HI12
=90,
915 R_LARCH_TLS_IE_HI20
=91,
916 R_LARCH_TLS_IE_LO12
=92,
917 R_LARCH_TLS_IE64_LO20
=93,
918 R_LARCH_TLS_IE64_HI12
=94,
919 R_LARCH_TLS_LD_PC_HI20
=95,
920 R_LARCH_TLS_LD_HI20
=96,
921 R_LARCH_TLS_GD_PC_HI20
=97,
922 R_LARCH_TLS_GD_HI20
=98,
927 R_LARCH_PCREL20_S2
=103,
931 R_LARCH_ADD_ULEB128
=107,
932 R_LARCH_SUB_ULEB128
=108,
933 R_LARCH_64_PCREL
=109,
937 # Sunw Syminfo Bound To special values
938 ENUM_SUNW_SYMINFO_BOUNDTO
= dict(
939 SYMINFO_BT_SELF
=0xffff,
940 SYMINFO_BT_PARENT
=0xfffe,
941 SYMINFO_BT_NONE
=0xfffd,
942 SYMINFO_BT_EXTERN
=0xfffc,
946 # Versym section, version dependency index
950 VER_NDX_LORESERVE
=0xff00,
951 VER_NDX_ELIMINATE
=0xff01,
955 # Sunw Syminfo Bound To special values
956 ENUM_SUNW_SYMINFO_BOUNDTO
= dict(
957 SYMINFO_BT_SELF
=0xffff,
958 SYMINFO_BT_PARENT
=0xfffe,
959 SYMINFO_BT_NONE
=0xfffd,
960 SYMINFO_BT_EXTERN
=0xfffc,
964 # PT_NOTE section types for all ELF types except ET_CORE
965 ENUM_NOTE_N_TYPE
= dict(
969 NT_GNU_GOLD_VERSION
=4,
970 NT_GNU_PROPERTY_TYPE_0
=5,
974 # PT_NOTE section types for ET_CORE
975 ENUM_CORE_NOTE_N_TYPE
= dict(
981 NT_SIGINFO
=0x53494749,
986 # Values in GNU .note.ABI-tag notes (n_type=='NT_GNU_ABI_TAG')
987 ENUM_NOTE_ABI_TAG_OS
= dict(
990 ELF_NOTE_OS_SOLARIS2
=2,
991 ELF_NOTE_OS_FREEBSD
=3,
992 ELF_NOTE_OS_NETBSD
=4,
993 ELF_NOTE_OS_SYLLABLE
=5,
997 # Values in GNU .note.gnu.property notes (n_type=='NT_GNU_PROPERTY_TYPE_0')
998 ENUM_NOTE_GNU_PROPERTY_TYPE
= dict(
999 GNU_PROPERTY_STACK_SIZE
=1,
1000 GNU_PROPERTY_NO_COPY_ON_PROTECTED
=2,
1001 GNU_PROPERTY_X86_FEATURE_1_AND
=0xc0000002,
1002 GNU_PROPERTY_X86_ISA_1_NEEDED
=0xc0008002,
1003 GNU_PROPERTY_X86_FEATURE_2_USED
=0xc0010001,
1004 GNU_PROPERTY_X86_ISA_1_USED
=0xc0010002,
1008 ENUM_GNU_PROPERTY_X86_FEATURE_1_FLAGS
= dict(
1009 GNU_PROPERTY_X86_FEATURE_1_IBT
=1,
1010 GNU_PROPERTY_X86_FEATURE_1_SHSTK
=2,
1011 GNU_PROPERTY_X86_FEATURE_1_LAM_U48
=4,
1012 GNU_PROPERTY_X86_FEATURE_1_LAM_U57
=8,
1016 ENUM_RELOC_TYPE_ARM
= dict(
1034 R_ARM_TLS_DTPMOD32
=17,
1035 R_ARM_TLS_DTPOFF32
=18,
1036 R_ARM_TLS_TPOFF32
=19,
1047 R_ARM_THM_JUMP24
=30,
1049 R_ARM_ALU_PCREL_7_0
=32,
1050 R_ARM_ALU_PCREL_15_8
=33,
1051 R_ARM_ALU_PCREL_23_15
=34,
1052 R_ARM_LDR_SBREL_11_0_NC
=35,
1053 R_ARM_ALU_SBREL_19_12_NC
=36,
1054 R_ARM_ALU_SBREL_27_20_CK
=37,
1060 R_ARM_MOVW_ABS_NC
=43,
1062 R_ARM_MOVW_PREL_NC
=45,
1064 R_ARM_THM_MOVW_ABS_NC
=47,
1065 R_ARM_THM_MOVT_ABS
=48,
1066 R_ARM_THM_MOVW_PREL_NC
=49,
1067 R_ARM_THM_MOVT_PREL
=50,
1068 R_ARM_THM_JUMP19
=51,
1070 R_ARM_THM_ALU_PREL_11_0
=53,
1074 R_ARM_ALU_PC_G0_NC
=57,
1076 R_ARM_ALU_PC_G1_NC
=59,
1081 R_ARM_LDRS_PC_G0
=64,
1082 R_ARM_LDRS_PC_G1
=65,
1083 R_ARM_LDRS_PC_G2
=66,
1087 R_ARM_ALU_SB_G0_NC
=70,
1089 R_ARM_ALU_SB_G1_NC
=72,
1095 R_ARM_LDRS_SB_G0
=78,
1096 R_ARM_LDRS_SB_G1
=79,
1097 R_ARM_LDRS_SB_G2
=80,
1101 R_ARM_MOVW_BREL_NC
=84,
1104 R_ARM_THM_MOVW_BREL_NC
=87,
1105 R_ARM_THM_MOVT_BREL
=88,
1106 R_ARM_THM_MOVW_BREL
=89,
1110 R_ARM_GOT_BREL12
=97,
1113 R_ARM_GNU_VTENTRY
=100,
1114 R_ARM_GNU_VTINHERIT
=101,
1115 R_ARM_THM_JUMP11
=102,
1116 R_ARM_THM_JUMP8
=103,
1118 R_ARM_TLS_LDM32
=105,
1119 R_ARM_TLS_LDO32
=106,
1122 R_ARM_TLS_LDO12
=109,
1124 R_ARM_TLS_IE12GP
=111,
1125 R_ARM_PRIVATE_0
=112,
1126 R_ARM_PRIVATE_1
=113,
1127 R_ARM_PRIVATE_2
=114,
1128 R_ARM_PRIVATE_3
=115,
1129 R_ARM_PRIVATE_4
=116,
1130 R_ARM_PRIVATE_5
=117,
1131 R_ARM_PRIVATE_6
=118,
1132 R_ARM_PRIVATE_7
=119,
1133 R_ARM_PRIVATE_8
=120,
1134 R_ARM_PRIVATE_9
=121,
1135 R_ARM_PRIVATE_10
=122,
1136 R_ARM_PRIVATE_11
=123,
1137 R_ARM_PRIVATE_12
=124,
1138 R_ARM_PRIVATE_13
=125,
1139 R_ARM_PRIVATE_14
=126,
1140 R_ARM_PRIVATE_15
=127,
1142 R_ARM_THM_TLS_DESCSEQ16
=129,
1143 R_ARM_THM_TLS_DESCSEQ32
=130,
1144 R_ARM_THM_GOT_BREL12
=131,
1145 R_ARM_IRELATIVE
=140,
1148 ENUM_RELOC_TYPE_AARCH64
= dict(
1150 R_AARCH64_ABS64
=257,
1151 R_AARCH64_ABS32
=258,
1152 R_AARCH64_ABS16
=259,
1153 R_AARCH64_PREL64
=260,
1154 R_AARCH64_PREL32
=261,
1155 R_AARCH64_PREL16
=262,
1156 R_AARCH64_MOVW_UABS_G0
=263,
1157 R_AARCH64_MOVW_UABS_G0_NC
=264,
1158 R_AARCH64_MOVW_UABS_G1
=265,
1159 R_AARCH64_MOVW_UABS_G1_NC
=266,
1160 R_AARCH64_MOVW_UABS_G2
=267,
1161 R_AARCH64_MOVW_UABS_G2_NC
=268,
1162 R_AARCH64_MOVW_UABS_G3
=269,
1163 R_AARCH64_MOVW_SABS_G0
=270,
1164 R_AARCH64_MOVW_SABS_G1
=271,
1165 R_AARCH64_MOVW_SABS_G2
=272,
1166 R_AARCH64_LD_PREL_LO19
=273,
1167 R_AARCH64_ADR_PREL_LO21
=274,
1168 R_AARCH64_ADR_PREL_PG_HI21
=275,
1169 R_AARCH64_ADR_PREL_PG_HI21_NC
=276,
1170 R_AARCH64_ADD_ABS_LO12_NC
=277,
1171 R_AARCH64_LDST8_ABS_LO12_NC
=278,
1172 R_AARCH64_TSTBR14
=279,
1173 R_AARCH64_CONDBR19
=280,
1174 R_AARCH64_JUMP26
=282,
1175 R_AARCH64_CALL26
=283,
1176 R_AARCH64_LDST16_ABS_LO12_NC
=284,
1177 R_AARCH64_LDST32_ABS_LO12_NC
=285,
1178 R_AARCH64_LDST64_ABS_LO12_NC
=286,
1179 R_AARCH64_MOVW_PREL_G0
=287,
1180 R_AARCH64_MOVW_PREL_G0_NC
=288,
1181 R_AARCH64_MOVW_PREL_G1
=289,
1182 R_AARCH64_MOVW_PREL_G1_NC
=290,
1183 R_AARCH64_MOVW_PREL_G2
=291,
1184 R_AARCH64_MOVW_PREL_G2_NC
=292,
1185 R_AARCH64_MOVW_PREL_G3
=293,
1186 R_AARCH64_MOVW_GOTOFF_G0
=300,
1187 R_AARCH64_MOVW_GOTOFF_G0_NC
=301,
1188 R_AARCH64_MOVW_GOTOFF_G1
=302,
1189 R_AARCH64_MOVW_GOTOFF_G1_NC
=303,
1190 R_AARCH64_MOVW_GOTOFF_G2
=304,
1191 R_AARCH64_MOVW_GOTOFF_G2_NC
=305,
1192 R_AARCH64_MOVW_GOTOFF_G3
=306,
1193 R_AARCH64_GOTREL64
=307,
1194 R_AARCH64_GOTREL32
=308,
1195 R_AARCH64_GOT_LD_PREL19
=309,
1196 R_AARCH64_LD64_GOTOFF_LO15
=310,
1197 R_AARCH64_ADR_GOT_PAGE
=311,
1198 R_AARCH64_LD64_GOT_LO12_NC
=312,
1199 R_AARCH64_TLSGD_ADR_PREL21
=512,
1200 R_AARCH64_TLSGD_ADR_PAGE21
=513,
1201 R_AARCH64_TLSGD_ADD_LO12_NC
=514,
1202 R_AARCH64_TLSGD_MOVW_G1
=515,
1203 R_AARCH64_TLSGD_MOVW_G0_NC
=516,
1204 R_AARCH64_TLSLD_ADR_PREL21
=517,
1205 R_AARCH64_TLSLD_ADR_PAGE21
=518,
1206 R_AARCH64_TLSLD_ADD_LO12_NC
=519,
1207 R_AARCH64_TLSLD_MOVW_G1
=520,
1208 R_AARCH64_TLSLD_MOVW_G0_NC
=521,
1209 R_AARCH64_TLSLD_LD_PREL19
=522,
1210 R_AARCH64_TLSLD_MOVW_DTPREL_G2
=523,
1211 R_AARCH64_TLSLD_MOVW_DTPREL_G1
=524,
1212 R_AARCH64_TLSLD_MOVW_DTPREL_G1_NC
=525,
1213 R_AARCH64_TLSLD_MOVW_DTPREL_G0
=526,
1214 R_AARCH64_TLSLD_MOVW_DTPREL_G0_NC
=527,
1215 R_AARCH64_TLSLD_ADD_DTPREL_HI12
=528,
1216 R_AARCH64_TLSLD_ADD_DTPREL_LO12
=529,
1217 R_AARCH64_TLSLD_ADD_DTPREL_LO12_NC
=530,
1218 R_AARCH64_TLSLD_LDST8_DTPREL_LO12
=531,
1219 R_AARCH64_TLSLD_LDST8_DTPREL_LO12_NC
=532,
1220 R_AARCH64_TLSLD_LDST16_DTPREL_LO12
=533,
1221 R_AARCH64_TLSLD_LDST16_DTPREL_LO12_NC
=534,
1222 R_AARCH64_TLSLD_LDST32_DTPREL_LO12
=535,
1223 R_AARCH64_TLSLD_LDST32_DTPREL_LO12_NC
=536,
1224 R_AARCH64_TLSLD_LDST64_DTPREL_LO12
=537,
1225 R_AARCH64_TLSLD_LDST64_DTPREL_LO12_NC
=538,
1226 R_AARCH64_TLSIE_MOVW_GOTTPREL_G1
=539,
1227 R_AARCH64_TLSIE_MOVW_GOTTPREL_G0_NC
=540,
1228 R_AARCH64_TLSIE_ADR_GOTTPREL_PAGE21
=541,
1229 R_AARCH64_TLSIE_LD64_GOTTPREL_LO12_NC
=542,
1230 R_AARCH64_TLSIE_LD_GOTTPREL_PREL19
=543,
1231 R_AARCH64_TLSLE_MOVW_TPREL_G2
=544,
1232 R_AARCH64_TLSLE_MOVW_TPREL_G1
=545,
1233 R_AARCH64_TLSLE_MOVW_TPREL_G1_NC
=546,
1234 R_AARCH64_TLSLE_MOVW_TPREL_G0
=547,
1235 R_AARCH64_TLSLE_MOVW_TPREL_G0_NC
=548,
1236 R_AARCH64_TLSLE_ADD_TPREL_HI12
=549,
1237 R_AARCH64_TLSLE_ADD_TPREL_LO12
=550,
1238 R_AARCH64_TLSLE_ADD_TPREL_LO12_NC
=551,
1239 R_AARCH64_TLSLE_LDST8_TPREL_LO12
=552,
1240 R_AARCH64_TLSLE_LDST8_TPREL_LO12_NC
=553,
1241 R_AARCH64_TLSLE_LDST16_TPREL_LO12
=554,
1242 R_AARCH64_TLSLE_LDST16_TPREL_LO12_NC
=555,
1243 R_AARCH64_TLSLE_LDST32_TPREL_LO12
=556,
1244 R_AARCH64_TLSLE_LDST32_TPREL_LO12_NC
=557,
1245 R_AARCH64_TLSLE_LDST64_TPREL_LO12
=558,
1246 R_AARCH64_TLSLE_LDST64_TPREL_LO12_NC
=559,
1247 R_AARCH64_COPY
=1024,
1248 R_AARCH64_GLOB_DAT
=1025,
1249 R_AARCH64_JUMP_SLOT
=1026,
1250 R_AARCH64_RELATIVE
=1027,
1251 R_AARCH64_TLS_DTPREL64
=1028,
1252 R_AARCH64_TLS_DTPMOD64
=1029,
1253 R_AARCH64_TLS_TPREL64
=1030,
1254 R_AARCH64_TLS_DTPREL32
=1031,
1255 R_AARCH64_TLS_DTPMOD32
=1032,
1256 R_AARCH64_TLS_TPREL32
=1033,
1259 ENUM_ATTR_TAG_ARM
= dict(
1266 TAG_CPU_ARCH_PROFILE
=7,
1268 TAG_THUMB_ISA_USE
=9,
1271 TAG_ADVANCED_SIMD_ARCH
=12,
1273 TAG_ABI_PCS_R9_USE
=14,
1274 TAG_ABI_PCS_RW_DATA
=15,
1275 TAG_ABI_PCS_RO_DATA
=16,
1276 TAG_ABI_PCS_GOT_USE
=17,
1277 TAG_ABI_PCS_WCHAR_T
=18,
1278 TAG_ABI_FP_ROUNDING
=19,
1279 TAG_ABI_FP_DENORMAL
=20,
1280 TAG_ABI_FP_EXCEPTIONS
=21,
1281 TAG_ABI_FP_USER_EXCEPTIONS
=22,
1282 TAG_ABI_FP_NUMBER_MODEL
=23,
1283 TAG_ABI_ALIGN_NEEDED
=24,
1284 TAG_ABI_ALIGN_PRESERVED
=25,
1285 TAG_ABI_ENUM_SIZE
=26,
1286 TAG_ABI_HARDFP_USE
=27,
1287 TAG_ABI_VFP_ARGS
=28,
1288 TAG_ABI_WMMX_ARGS
=29,
1289 TAG_ABI_OPTIMIZATION_GOALS
=30,
1290 TAG_ABI_FP_OPTIMIZATION_GOALS
=31,
1291 TAG_COMPATIBILITY
=32,
1292 TAG_CPU_UNALIGNED_ACCESS
=34,
1293 TAG_FP_HP_EXTENSION
=36,
1294 TAG_ABI_FP_16BIT_FORMAT
=38,
1295 TAG_MPEXTENSION_USE
=42,
1297 TAG_DSP_EXTENSION
= 46,
1299 TAG_ALSO_COMPATIBLE_WITH
=65,
1302 TAG_VIRTUALIZATION_USE
=68,
1303 TAG_MPEXTENSION_USE_OLD
=70,
1306 ENUM_ATTR_TAG_RISCV
= dict(
1312 TAG_UNALIGNED_ACCESS
=6,
1315 # https://openpowerfoundation.org/wp-content/uploads/2016/03/ABI64BitOpenPOWERv1.1_16July2015_pub4.pdf
1316 # See 3.5.3 Relocation Types Table.
1317 ENUM_RELOC_TYPE_PPC64
= dict(
1322 R_PPC64_ADDR16_LO
=4,
1323 R_PPC64_ADDR16_HI
=5,
1324 R_PPC64_ADDR16_HA
=6,
1326 R_PPC64_ADDR14_BRTAKEN
=8,
1327 R_PPC64_ADDR14_BRNTAKEN
=9,
1330 R_PPC64_REL14_BRTAKEN
=12,
1331 R_PPC64_REL14_BRNTAKEN
=13,
1333 R_PPC64_GOT16_LO
=15,
1334 R_PPC64_GOT16_HI
=16,
1335 R_PPC64_GOT16_HA
=17,
1337 R_PPC64_GLOB_DAT
=20,
1338 R_PPC64_JMP_SLOT
=21,
1339 R_PPC64_RELATIVE
=22,
1344 R_PPC64_PLTREL32
=28,
1345 R_PPC64_PLT16_LO
=29,
1346 R_PPC64_PLT16_HI
=30,
1347 R_PPC64_PLT16_HA
=31,
1349 R_PPC64_SECTOFF_LO
=34,
1350 R_PPC64_SECTOFF_HI
=35,
1351 R_PPC64_SECTOFF_HA
=36,
1354 R_PPC64_ADDR16_HIGHER
=39,
1355 R_PPC64_ADDR16_HIGHERA
=40,
1356 R_PPC64_ADDR16_HIGHEST
=41,
1357 R_PPC64_ADDR16_HIGHESTA
=42,
1361 R_PPC64_PLTREL64
=46,
1363 R_PPC64_TOC16_LO
=48,
1364 R_PPC64_TOC16_HI
=49,
1365 R_PPC64_TOC16_HA
=50,
1367 R_PPC64_PLTGOT16
=52,
1368 R_PPC64_PLTGOT16_LO
=53,
1369 R_PPC64_PLTGOT16_HI
=54,
1370 R_PPC64_PLTGOT16_HA
=55,
1371 R_PPC64_ADDR16_DS
=56,
1372 R_PPC64_ADDR16_LO_DS
=57,
1373 R_PPC64_GOT16_DS
=58,
1374 R_PPC64_GOT16_LO_DS
=59,
1375 R_PPC64_PLT16_LO_DS
=60,
1376 R_PPC64_SECTOFF_DS
=61,
1377 R_PPC64_SECTOFF_LO_DS
=62,
1378 R_PPC64_TOC16_DS
=63,
1379 R_PPC64_TOC16_LO_DS
=64,
1380 R_PPC64_PLTGOT16_DS
=65,
1381 R_PPC64_PLTGOT16_LO_DS
=66,
1383 R_PPC64_DTPMOD64
=68,
1385 R_PPC64_TPREL16_LO
=70,
1386 R_PPC64_TPREL16_HI
=71,
1387 R_PPC64_TPREL16_HA
=72,
1389 R_PPC64_DTPREL16
=74,
1390 R_PPC64_DTPREL16_LO
=75,
1391 R_PPC64_DTPREL16_HI
=76,
1392 R_PPC64_DTPREL16_HA
=77,
1393 R_PPC64_DTPREL64
=78,
1394 R_PPC64_GOT_TLSGD16
=79,
1395 R_PPC64_GOT_TLSGD16_LO
=80,
1396 R_PPC64_GOT_TLSGD16_HI
=81,
1397 R_PPC64_GOT_TLSGD16_HA
=82,
1398 R_PPC64_GOT_TLSLD16
=83,
1399 R_PPC64_GOT_TLSLD16_LO
=84,
1400 R_PPC64_GOT_TLSLD16_HI
=85,
1401 R_PPC64_GOT_TLSLD16_HA
=86,
1402 R_PPC64_GOT_TPREL16_DS
=87,
1403 R_PPC64_GOT_TPREL16_LO_DS
=88,
1404 R_PPC64_GOT_TPREL16_HI
=89,
1405 R_PPC64_GOT_TPREL16_HA
=90,
1406 R_PPC64_GOT_DTPREL16_DS
=91,
1407 R_PPC64_GOT_DTPREL16_LO_DS
=92,
1408 R_PPC64_GOT_DTPREL16_HI
=93,
1409 R_PPC64_GOT_DTPREL16_HA
=94,
1410 R_PPC64_TPREL16_DS
=95,
1411 R_PPC64_TPREL16_LO_DS
=96,
1412 R_PPC64_TPREL16_HIGHER
=97,
1413 R_PPC64_TPREL16_HIGHERA
=98,
1414 R_PPC64_TPREL16_HIGHEST
=99,
1415 R_PPC64_TPREL16_HIGHESTA
=100,
1416 R_PPC64_DTPREL16_DS
=101,
1417 R_PPC64_DTPREL16_LO_DS
=102,
1418 R_PPC64_DTPREL16_HIGHER
=103,
1419 R_PPC64_DTPREL16_HIGHERA
=104,
1420 R_PPC64_DTPREL16_HIGHEST
=105,
1421 R_PPC64_DTPREL16_HIGHESTA
=106,
1424 R_PPC64_TOCSAVE
=109,
1425 R_PPC64_ADDR16_HIGH
=110,
1426 R_PPC64_ADDR16_HIGHA
=111,
1427 R_PPC64_TPREL16_HIGH
=112,
1428 R_PPC64_TPREL16_HIGHA
=113,
1429 R_PPC64_DTPREL16_HIGH
=114,
1430 R_PPC64_DTPREL16_HIGHA
=115,
1431 R_PPC64_REL24_NOTOC
=116,
1432 R_PPC64_ADDR64_LOCAL
=117,
1433 R_PPC64_IRELATIVE
=248,
1435 R_PPC64_REL16_LO
=250,
1436 R_PPC64_REL16_HI
=251,
1437 R_PPC64_REL16_HA
=252,
1438 R_PPC64_GNU_VTINHERIT
=253,
1439 R_PPC64_GNU_VTENTRY
=254,