llvm.org GIT mirror llvm / fc61a23
Add missing ELF constants. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@141840 91177308-0d34-0410-b5e6-96231b3b80d8 Michael J. Spencer 9 years ago
1 changed file(s) with 216 addition(s) and 18 deletion(s). Raw diff Collapse all Expand all
125125
126126 // Machine architectures
127127 enum {
128 EM_NONE = 0, // No machine
129 EM_M32 = 1, // AT&T WE 32100
130 EM_SPARC = 2, // SPARC
131 EM_386 = 3, // Intel 386
132 EM_68K = 4, // Motorola 68000
133 EM_88K = 5, // Motorola 88000
134 EM_486 = 6, // Intel 486 (deprecated)
135 EM_860 = 7, // Intel 80860
136 EM_MIPS = 8, // MIPS R3000
137 EM_PPC = 20, // PowerPC
138 EM_PPC64 = 21, // PowerPC64
139 EM_ARM = 40, // ARM
140 EM_ALPHA = 41, // DEC Alpha
141 EM_SPARCV9 = 43, // SPARC V9
142 EM_X86_64 = 62, // AMD64
143 EM_MBLAZE = 47787 // Xilinx MicroBlaze
128 EM_NONE = 0, // No machine
129 EM_M32 = 1, // AT&T WE 32100
130 EM_SPARC = 2, // SPARC
131 EM_386 = 3, // Intel 386
132 EM_68K = 4, // Motorola 68000
133 EM_88K = 5, // Motorola 88000
134 EM_486 = 6, // Intel 486 (deprecated)
135 EM_860 = 7, // Intel 80860
136 EM_MIPS = 8, // MIPS R3000
137 EM_S370 = 9, // IBM System/370
138 EM_MIPS_RS3_LE = 10, // MIPS RS3000 Little-endian
139 EM_PARISC = 15, // Hewlett-Packard PA-RISC
140 EM_VPP500 = 17, // Fujitsu VPP500
141 EM_SPARC32PLUS = 18, // Enhanced instruction set SPARC
142 EM_960 = 19, // Intel 80960
143 EM_PPC = 20, // PowerPC
144 EM_PPC64 = 21, // PowerPC64
145 EM_S390 = 22, // IBM System/390
146 EM_SPU = 23, // IBM SPU/SPC
147 EM_V800 = 36, // NEC V800
148 EM_FR20 = 37, // Fujitsu FR20
149 EM_RH32 = 38, // TRW RH-32
150 EM_RCE = 39, // Motorola RCE
151 EM_ARM = 40, // ARM
152 EM_ALPHA = 41, // DEC Alpha
153 EM_SH = 42, // Hitachi SH
154 EM_SPARCV9 = 43, // SPARC V9
155 EM_TRICORE = 44, // Siemens TriCore
156 EM_ARC = 45, // Argonaut RISC Core
157 EM_H8_300 = 46, // Hitachi H8/300
158 EM_H8_300H = 47, // Hitachi H8/300H
159 EM_H8S = 48, // Hitachi H8S
160 EM_H8_500 = 49, // Hitachi H8/500
161 EM_IA_64 = 50, // Intel IA-64 processor architecture
162 EM_MIPS_X = 51, // Stanford MIPS-X
163 EM_COLDFIRE = 52, // Motorola ColdFire
164 EM_68HC12 = 53, // Motorola M68HC12
165 EM_MMA = 54, // Fujitsu MMA Multimedia Accelerator
166 EM_PCP = 55, // Siemens PCP
167 EM_NCPU = 56, // Sony nCPU embedded RISC processor
168 EM_NDR1 = 57, // Denso NDR1 microprocessor
169 EM_STARCORE = 58, // Motorola Star*Core processor
170 EM_ME16 = 59, // Toyota ME16 processor
171 EM_ST100 = 60, // STMicroelectronics ST100 processor
172 EM_TINYJ = 61, // Advanced Logic Corp. TinyJ embedded processor family
173 EM_X86_64 = 62, // AMD x86-64 architecture
174 EM_PDSP = 63, // Sony DSP Processor
175 EM_PDP10 = 64, // Digital Equipment Corp. PDP-10
176 EM_PDP11 = 65, // Digital Equipment Corp. PDP-11
177 EM_FX66 = 66, // Siemens FX66 microcontroller
178 EM_ST9PLUS = 67, // STMicroelectronics ST9+ 8/16 bit microcontroller
179 EM_ST7 = 68, // STMicroelectronics ST7 8-bit microcontroller
180 EM_68HC16 = 69, // Motorola MC68HC16 Microcontroller
181 EM_68HC11 = 70, // Motorola MC68HC11 Microcontroller
182 EM_68HC08 = 71, // Motorola MC68HC08 Microcontroller
183 EM_68HC05 = 72, // Motorola MC68HC05 Microcontroller
184 EM_SVX = 73, // Silicon Graphics SVx
185 EM_ST19 = 74, // STMicroelectronics ST19 8-bit microcontroller
186 EM_VAX = 75, // Digital VAX
187 EM_CRIS = 76, // Axis Communications 32-bit embedded processor
188 EM_JAVELIN = 77, // Infineon Technologies 32-bit embedded processor
189 EM_FIREPATH = 78, // Element 14 64-bit DSP Processor
190 EM_ZSP = 79, // LSI Logic 16-bit DSP Processor
191 EM_MMIX = 80, // Donald Knuth's educational 64-bit processor
192 EM_HUANY = 81, // Harvard University machine-independent object files
193 EM_PRISM = 82, // SiTera Prism
194 EM_AVR = 83, // Atmel AVR 8-bit microcontroller
195 EM_FR30 = 84, // Fujitsu FR30
196 EM_D10V = 85, // Mitsubishi D10V
197 EM_D30V = 86, // Mitsubishi D30V
198 EM_V850 = 87, // NEC v850
199 EM_M32R = 88, // Mitsubishi M32R
200 EM_MN10300 = 89, // Matsushita MN10300
201 EM_MN10200 = 90, // Matsushita MN10200
202 EM_PJ = 91, // picoJava
203 EM_OPENRISC = 92, // OpenRISC 32-bit embedded processor
204 EM_ARC_COMPACT = 93, // ARC International ARCompact processor (old
205 // spelling/synonym: EM_ARC_A5)
206 EM_XTENSA = 94, // Tensilica Xtensa Architecture
207 EM_VIDEOCORE = 95, // Alphamosaic VideoCore processor
208 EM_TMM_GPP = 96, // Thompson Multimedia General Purpose Processor
209 EM_NS32K = 97, // National Semiconductor 32000 series
210 EM_TPC = 98, // Tenor Network TPC processor
211 EM_SNP1K = 99, // Trebia SNP 1000 processor
212 EM_ST200 = 100, // STMicroelectronics (www.st.com) ST200
213 EM_IP2K = 101, // Ubicom IP2xxx microcontroller family
214 EM_MAX = 102, // MAX Processor
215 EM_CR = 103, // National Semiconductor CompactRISC microprocessor
216 EM_F2MC16 = 104, // Fujitsu F2MC16
217 EM_MSP430 = 105, // Texas Instruments embedded microcontroller msp430
218 EM_BLACKFIN = 106, // Analog Devices Blackfin (DSP) processor
219 EM_SE_C33 = 107, // S1C33 Family of Seiko Epson processors
220 EM_SEP = 108, // Sharp embedded microprocessor
221 EM_ARCA = 109, // Arca RISC Microprocessor
222 EM_UNICORE = 110, // Microprocessor series from PKU-Unity Ltd. and MPRC
223 // of Peking University
224 EM_EXCESS = 111, // eXcess: 16/32/64-bit configurable embedded CPU
225 EM_DXP = 112, // Icera Semiconductor Inc. Deep Execution Processor
226 EM_ALTERA_NIOS2 = 113, // Altera Nios II soft-core processor
227 EM_CRX = 114, // National Semiconductor CompactRISC CRX
228 EM_XGATE = 115, // Motorola XGATE embedded processor
229 EM_C166 = 116, // Infineon C16x/XC16x processor
230 EM_M16C = 117, // Renesas M16C series microprocessors
231 EM_DSPIC30F = 118, // Microchip Technology dsPIC30F Digital Signal
232 // Controller
233 EM_CE = 119, // Freescale Communication Engine RISC core
234 EM_M32C = 120, // Renesas M32C series microprocessors
235 EM_TSK3000 = 131, // Altium TSK3000 core
236 EM_RS08 = 132, // Freescale RS08 embedded processor
237 EM_SHARC = 133, // Analog Devices SHARC family of 32-bit DSP
238 // processors
239 EM_ECOG2 = 134, // Cyan Technology eCOG2 microprocessor
240 EM_SCORE7 = 135, // Sunplus S+core7 RISC processor
241 EM_DSP24 = 136, // New Japan Radio (NJR) 24-bit DSP Processor
242 EM_VIDEOCORE3 = 137, // Broadcom VideoCore III processor
243 EM_LATTICEMICO32 = 138, // RISC processor for Lattice FPGA architecture
244 EM_SE_C17 = 139, // Seiko Epson C17 family
245 EM_TI_C6000 = 140, // The Texas Instruments TMS320C6000 DSP family
246 EM_TI_C2000 = 141, // The Texas Instruments TMS320C2000 DSP family
247 EM_TI_C5500 = 142, // The Texas Instruments TMS320C55x DSP family
248 EM_MMDSP_PLUS = 160, // STMicroelectronics 64bit VLIW Data Signal Processor
249 EM_CYPRESS_M8C = 161, // Cypress M8C microprocessor
250 EM_R32C = 162, // Renesas R32C series microprocessors
251 EM_TRIMEDIA = 163, // NXP Semiconductors TriMedia architecture family
252 EM_QDSP6 = 164, // QUALCOMM DSP6 Processor
253 EM_8051 = 165, // Intel 8051 and variants
254 EM_STXP7X = 166, // STMicroelectronics STxP7x family of configurable
255 // and extensible RISC processors
256 EM_NDS32 = 167, // Andes Technology compact code size embedded RISC
257 // processor family
258 EM_ECOG1 = 168, // Cyan Technology eCOG1X family
259 EM_ECOG1X = 168, // Cyan Technology eCOG1X family
260 EM_MAXQ30 = 169, // Dallas Semiconductor MAXQ30 Core Micro-controllers
261 EM_XIMO16 = 170, // New Japan Radio (NJR) 16-bit DSP Processor
262 EM_MANIK = 171, // M2000 Reconfigurable RISC Microprocessor
263 EM_CRAYNV2 = 172, // Cray Inc. NV2 vector architecture
264 EM_RX = 173, // Renesas RX family
265 EM_METAG = 174, // Imagination Technologies META processor
266 // architecture
267 EM_MCST_ELBRUS = 175, // MCST Elbrus general purpose hardware architecture
268 EM_ECOG16 = 176, // Cyan Technology eCOG16 family
269 EM_CR16 = 177, // National Semiconductor CompactRISC CR16 16-bit
270 // microprocessor
271 EM_ETPU = 178, // Freescale Extended Time Processing Unit
272 EM_SLE9X = 179, // Infineon Technologies SLE9X core
273 EM_L10M = 180, // Intel L10M
274 EM_K10M = 181, // Intel K10M
275 EM_AVR32 = 185, // Atmel Corporation 32-bit microprocessor family
276 EM_STM8 = 186, // STMicroeletronics STM8 8-bit microcontroller
277 EM_TILE64 = 187, // Tilera TILE64 multicore architecture family
278 EM_TILEPRO = 188, // Tilera TILEPro multicore architecture family
279 EM_MICROBLAZE = 189, // Xilinx MicroBlaze 32-bit RISC soft processor core
280 EM_CUDA = 190, // NVIDIA CUDA architecture
281 EM_TILEGX = 191, // Tilera TILE-Gx multicore architecture family
282 EM_CLOUDSHIELD = 192, // CloudShield architecture family
283 EM_COREA_1ST = 193, // KIPO-KAIST Core-A 1st generation processor family
284 EM_COREA_2ND = 194, // KIPO-KAIST Core-A 2nd generation processor family
285 EM_ARC_COMPACT2 = 195, // Synopsys ARCompact V2
286 EM_OPEN8 = 196, // Open8 8-bit RISC soft processor core
287 EM_RL78 = 197, // Renesas RL78 family
288 EM_VIDEOCORE5 = 198, // Broadcom VideoCore V processor
289 EM_78KOR = 199, // Renesas 78KOR family
290 EM_56800EX = 200, // Freescale 56800EX Digital Signal Controller (DSC)
291 EM_MBLAZE = 47787 // Xilinx MicroBlaze
144292 };
145293
146294 // Object file classes.
210358 R_X86_64_PC64 = 24,
211359 R_X86_64_GOTOFF64 = 25,
212360 R_X86_64_GOTPC32 = 26,
361 R_X86_64_GOT64 = 27,
362 R_X86_64_GOTPCREL64 = 28,
363 R_X86_64_GOTPC64 = 29,
364 R_X86_64_GOTPLT64 = 30,
365 R_X86_64_PLTOFF64 = 31,
213366 R_X86_64_SIZE32 = 32,
214367 R_X86_64_SIZE64 = 33,
215368 R_X86_64_GOTPC32_TLSDESC = 34,
483636 SHN_LORESERVE = 0xff00, // Lowest reserved index
484637 SHN_LOPROC = 0xff00, // Lowest processor-specific index
485638 SHN_HIPROC = 0xff1f, // Highest processor-specific index
639 SHN_LOOS = 0xff20, // Lowest operating system-specific index
640 SHN_HIOS = 0xff3f, // Highest operating system-specific index
486641 SHN_ABS = 0xfff1, // Symbol has absolute value; does not need relocation
487642 SHN_COMMON = 0xfff2, // FORTRAN COMMON or C external global variables
488643 SHN_XINDEX = 0xffff, // Mark that the index is >= SHN_LORESERVE
573728 /// set to the start of the section by the boot code.
574729 XCORE_SHF_DP_SECTION = 0x1000U,
575730
731 SHF_MASKOS = 0x0ff00000,
732
576733 // Bits indicating processor-specific flags.
577 SHF_MASKPROC = 0xf0000000
734 SHF_MASKPROC = 0xf0000000,
735
736 // If an object file section does not have this flag set, then it may not hold
737 // more than 2GB and can be freely referred to in objects using smaller code
738 // models. Otherwise, only objects using larger code models can refer to them.
739 // For example, a medium code model object can refer to data in a section that
740 // sets this flag besides being able to refer to data in a section that does
741 // not set it; likewise, a small code model object can refer only to code in a
742 // section that does not set this flag.
743 SHF_X86_64_LARGE = 0x10000000
578744 };
579745
580746 // Section Group Flags
635801 STB_LOCAL = 0, // Local symbol, not visible outside obj file containing def
636802 STB_GLOBAL = 1, // Global symbol, visible to all object files being combined
637803 STB_WEAK = 2, // Weak symbol, like global but lower-precedence
804 STB_LOOS = 10, // Lowest operating system-specific binding type
805 STB_HIOS = 12, // Highest operating system-specific binding type
638806 STB_LOPROC = 13, // Lowest processor-specific binding type
639807 STB_HIPROC = 15 // Highest processor-specific binding type
640808 };
648816 STT_FILE = 4, // Local, absolute symbol that refers to a file
649817 STT_COMMON = 5, // An uninitialized common block
650818 STT_TLS = 6, // Thread local data object
819 STT_LOOS = 7, // Lowest operating system-specific symbol type
820 STT_HIOS = 8, // Highest operating system-specific symbol type
651821 STT_LOPROC = 13, // Lowest processor-specific symbol type
652822 STT_HIPROC = 15 // Highest processor-specific symbol type
653823 };
762932 PT_NOTE = 4, // Auxiliary information.
763933 PT_SHLIB = 5, // Reserved.
764934 PT_PHDR = 6, // The program header table itself.
935 PT_TLS = 7, // The thread-local storage template.
936 PT_LOOS = 0x60000000, // Lowest operating system-specific pt entry type.
937
938 // x86-64 program header types.
939 // These all contain stack unwind tables.
940 PT_GNU_EH_FRAME = 0x6474e550,
941 PT_SUNW_EH_FRAME = 0x6474e550,
942 PT_SUNW_UNWIND = 0x6464e550,
943
944 PT_HIOS = 0x6fffffff, // Highest operating system-specific pt entry type.
765945 PT_LOPROC = 0x70000000, // Lowest processor-specific program hdr entry type.
766946 PT_HIPROC = 0x7fffffff // Highest processor-specific program hdr entry type.
767947 };
771951 PF_X = 1, // Execute
772952 PF_W = 2, // Write
773953 PF_R = 4, // Read
774 PF_MASKPROC = 0xf0000000 // Unspecified
954 PF_MASKOS = 0x0ff00000,// Bits for operating system-specific semantics.
955 PF_MASKPROC = 0xf0000000 // Bits for processor-specific semantics.
775956 };
776957
777958 // Dynamic table entry for ELF32.
8271008 DT_FINI_ARRAY = 26, // Pointer to array of termination functions.
8281009 DT_INIT_ARRAYSZ = 27, // Size of DT_INIT_ARRAY.
8291010 DT_FINI_ARRAYSZ = 28, // Size of DT_FINI_ARRAY.
1011 DT_RUNPATH = 29, // String table offset of lib search path.
1012 DT_FLAGS = 30, // Flags.
1013 DT_ENCODING = 32, // Values from here to DT_LOOS follow the rules
1014 // for the interpretation of the d_un union.
1015
1016 DT_PREINIT_ARRAY = 32, // Pointer to array of preinit functions.
1017 DT_PREINIT_ARRAYSZ = 33, // Size of the DT_PREINIT_ARRAY array.
1018
8301019 DT_LOOS = 0x60000000, // Start of environment specific tags.
8311020 DT_HIOS = 0x6FFFFFFF, // End of environment specific tags.
8321021 DT_LOPROC = 0x70000000, // Start of processor specific tags.
8331022 DT_HIPROC = 0x7FFFFFFF // End of processor specific tags.
8341023 };
8351024
1025 // DT_FLAGS values.
1026 enum {
1027 DF_ORIGIN = 0x01, // The object may reference $ORIGIN.
1028 DF_SYMBOLIC = 0x02, // Search the shared lib before searching the exe.
1029 DF_TEXTREL = 0x04, // Relocations may modify a non-writable segment.
1030 DF_BIND_NOW = 0x08, // Process all relocations on load.
1031 DF_STATIC_TLS = 0x10 // Reject attempts to load dynamically.
1032 };
1033
8361034 } // end namespace ELF
8371035
8381036 } // end namespace llvm