Debian Codegraph @

src/lib/libdwarf/dwarf_elf_defines.h

raw
1 /* Copyright (c) 2019-2023, David Anderson
2 All rights reserved.
3
4 Redistribution and use in source and binary forms, with
5 or without modification, are permitted provided that the
6 following conditions are met:
7
8 Redistributions of source code must retain the above
9 copyright notice, this list of conditions and the following
10 disclaimer.
11
12 Redistributions in binary form must reproduce the above
13 copyright notice, this list of conditions and the following
14 disclaimer in the documentation and/or other materials
15 provided with the distribution.
16
17 THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND
18 CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES,
19 INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
20 OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
21 ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR
22 CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
23 SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
24 NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
25 LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
26 HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
27 CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR
28 OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE,
29 EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
30
31 */
32 #ifndef DWARF_ELF_DEFINES_H
33 #define DWARF_ELF_DEFINES_H
34
35 #ifdef __cplusplus
36 extern "C" {
37 #endif /* __cplusplus */
38
39 /* Standard Elf section types. */
40 #ifndef SHT_NULL
41 #define SHT_NULL 0
42 #endif
43 #ifndef SHT_PROGBITS
44 #define SHT_PROGBITS 1
45 #endif
46 #ifndef SHT_SYMTAB
47 #define SHT_SYMTAB 2
48 #endif
49 #ifndef SHT_STRTAB
50 #define SHT_STRTAB 3
51 #endif
52 #ifndef SHT_RELA
53 #define SHT_RELA 4
54 #endif
55 #ifndef SHT_REL
56 #define SHT_REL 9
57 #endif
58
59 #ifndef DW_GROUPNUMBER_BASE
60 #define DW_GROUPNUMBER_BASE 1
61 #endif
62 #ifndef DW_GROUPNUMBER_DWO
63 #define DW_GROUPNUMBER_DWO 2
64 #endif
65
66 #ifndef SHF_GROUP
67 #define SHF_GROUP (1 << 9)
68 #endif /* SHF_GROUP */
69
70 #ifndef STN_UNDEF
71 #define STN_UNDEF 0
72 #endif /* STN_UNDEF */
73
74 #ifndef SHT_HASH
75 #define SHT_HASH 5
76 #endif
77 #ifndef SHT_DYNAMIC
78 #define SHT_DYNAMIC 6
79 #endif
80 #ifndef SHT_NOTE
81 #define SHT_NOTE 7
82 #endif
83 #ifndef SHT_NOBITS
84 #define SHT_NOBITS 8
85 #endif
86 #ifndef SHT_REL
87 #define SHT_REL 9
88 #endif
89 #ifndef SHT_SHLIB
90 #define SHT_SHLIB 10
91 #endif
92 #ifndef SHT_DYNSYM
93 #define SHT_DYNSYM 11
94 #endif
95 #ifndef SHT_GROUP
96 #define SHT_GROUP 17
97 #endif /* SHT_GROUP */
98
99 /* Symbol Types, Elf standard. */
100 #define STT_NOTYPE 0
101 #define STT_OBJECT 1
102 #define STT_FUNC 2
103 #define STT_SECTION 3
104 #define STT_FILE 4
105
106 #ifndef PT_NULL
107 #define PT_NULL 0
108 #endif
109 #ifndef PT_LOAD
110 #define PT_LOAD 1
111 #endif
112 #ifndef PT_DYNAMIC
113 #define PT_DYNAMIC 2
114 #endif
115 #ifndef PT_INTERP
116 #define PT_INTERP 3
117 #endif
118 #ifndef PT_NOTE
119 #define PT_NOTE 4
120 #endif
121 #ifndef PT_SHLIB
122 #define PT_SHLIB 5
123 #endif
124 #ifndef PT_PHDR
125 #define PT_PHDR 6
126 #endif
127 #ifndef PT_LOPROC
128 #define PT_LOPROC 0x70000000
129 #endif
130 #ifndef PT_HIPROC
131 #define PT_HIPROC 0x7fffffff
132 #endif
133
134 #ifndef PF_X
135 #define PF_X (1 << 0)
136 #endif
137 #ifndef PF_W
138 #define PF_W (1 << 1)
139 #endif
140 #ifndef PF_R
141 #define PF_R (1 << 2)
142 #endif
143 #ifndef PF_MASKOS
144 #define PF_MASKOS 0x0ff00000
145 #endif
146 #ifndef PF_MASKPROC
147 #define PF_MASKPROC 0xf0000000
148 #endif
149
150 #ifndef ET_NONE
151 #define ET_NONE 0
152 #endif
153 #ifndef ET_REL
154 #define ET_REL 1
155 #endif
156 #ifndef ET_EXEC
157 #define ET_EXEC 2
158 #endif
159 #ifndef ET_DYN
160 #define ET_DYN 3
161 #endif
162 #ifndef ET_CORE
163 #define ET_CORE 4
164 #endif
165 #ifndef ET_NUM
166 #define ET_NUM 5
167 #endif
168 #ifndef ET_LOOS
169 #define ET_LOOS 0xfe00
170 #endif
171 #ifndef ET_HIOS
172 #define ET_HIOS 0xfeff
173 #endif
174 #ifndef ET_LOPROC
175 #define ET_LOPROC 0xff00
176 #endif
177 #ifndef ET_HIPROC
178 #define ET_HIPROC 0xffff
179 #endif
180
181 #ifndef EM_NONE
182 #define EM_NONE 0
183 #endif
184 #ifndef EM_M32
185 #define EM_M32 1
186 #endif
187 #ifndef EM_SPARC
188 #define EM_SPARC 2
189 #endif
190 #ifndef EM_386
191 #define EM_386 3
192 #endif
193 #ifndef EM_68K
194 #define EM_68K 4
195 #endif
196 #ifndef EM_88K
197 #define EM_88K 5
198 #endif
199 #ifndef EM_IAMCU
200 #define EM_IAMCU 6
201 #endif
202 #ifndef EM_860
203 #define EM_860 7
204 #endif
205 #ifndef EM_MIPS
206 #define EM_MIPS 8
207 #endif
208 #ifndef EM_S370
209 #define EM_S370 9
210 #endif
211 #ifndef EM_MIPS_RS3_LE
212 #define EM_MIPS_RS3_LE 10
213 #endif
214 #ifndef EM_PARISC
215 #define EM_PARISC 15
216 #endif
217 #ifndef EM_VPP500
218 #define EM_VPP500 17
219 #endif
220 #ifndef EM_SPARC32PLUS
221 #define EM_SPARC32PLUS 18
222 #endif
223 #ifndef EM_960
224 #define EM_960 19
225 #endif
226 #ifndef EM_PPC
227 #define EM_PPC 20
228 #endif
229 #ifndef EM_PPC64
230 #define EM_PPC64 21
231 #endif
232 #ifndef EM_S390
233 #define EM_S390 22
234 #endif
235 #ifndef EM_SPU
236 #define EM_SPU 23
237 #endif
238 #ifndef EM_V800
239 #define EM_V800 36
240 #endif
241 #ifndef EM_FR20
242 #define EM_FR20 37
243 #endif
244 #ifndef EM_RH32
245 #define EM_RH32 38
246 #endif
247 #ifndef EM_RCE
248 #define EM_RCE 39
249 #endif
250 #ifndef EM_ARM
251 #define EM_ARM 40
252 #endif
253 #ifndef EM_FAKE_ALPHA
254 #define EM_FAKE_ALPHA 41
255 #endif
256 #ifndef EM_SH
257 #define EM_SH 42
258 #endif
259 #ifndef EM_SPARCV9
260 #define EM_SPARCV9 43
261 #endif
262 #ifndef EM_TRICORE
263 #define EM_TRICORE 44
264 #endif
265 #ifndef EM_ARC
266 #define EM_ARC 45
267 #endif
268 #ifndef EM_H8_300
269 #define EM_H8_300 46
270 #endif
271 #ifndef EM_H8_300H
272 #define EM_H8_300H 47
273 #endif
274 #ifndef EM_H8S
275 #define EM_H8S 48
276 #endif
277 #ifndef EM_H8_500
278 #define EM_H8_500 49
279 #endif
280 #ifndef EM_IA_64
281 #define EM_IA_64 50
282 #endif
283 #ifndef EM_MIPS_X
284 #define EM_MIPS_X 51
285 #endif
286 #ifndef EM_COLDFIRE
287 #define EM_COLDFIRE 52
288 #endif
289 #ifndef EM_68HC12
290 #define EM_68HC12 53
291 #endif
292 #ifndef EM_MMA
293 #define EM_MMA 54
294 #endif
295 #ifndef EM_PCP
296 #define EM_PCP 55
297 #endif
298 #ifndef EM_NCPU
299 #define EM_NCPU 56
300 #endif
301 #ifndef EM_NDR1
302 #define EM_NDR1 57
303 #endif
304 #ifndef EM_STARCORE
305 #define EM_STARCORE 58
306 #endif
307 #ifndef EM_ME16
308 #define EM_ME16 59
309 #endif
310 #ifndef EM_ST100
311 #define EM_ST100 60
312 #endif
313 #ifndef EM_TINYJ
314 #define EM_TINYJ 61
315 #endif
316 #ifndef EM_X86_64
317 #define EM_X86_64 62
318 #endif
319 #ifndef EM_PDSP
320 #define EM_PDSP 63
321 #endif
322 #ifndef EM_PDP10
323 #define EM_PDP10 64
324 #endif
325 #ifndef EM_PDP11
326 #define EM_PDP11 65
327 #endif
328 #ifndef EM_FX66
329 #define EM_FX66 66
330 #endif
331 #ifndef EM_ST9PLUS
332 #define EM_ST9PLUS 67
333 #endif
334 #ifndef EM_ST7
335 #define EM_ST7 68
336 #endif
337 #ifndef EM_68HC16
338 #define EM_68HC16 69
339 #endif
340 #ifndef EM_68HC11
341 #define EM_68HC11 70
342 #endif
343 #ifndef EM_68HC08
344 #define EM_68HC08 71
345 #endif
346 #ifndef EM_68HC05
347 #define EM_68HC05 72
348 #endif
349 #ifndef EM_SVX
350 #define EM_SVX 73
351 #endif
352 #ifndef EM_ST19
353 #define EM_ST19 74
354 #endif
355 #ifndef EM_VAX
356 #define EM_VAX 75
357 #endif
358 #ifndef EM_CRIS
359 #define EM_CRIS 76
360 #endif
361 #ifndef EM_JAVELIN
362 #define EM_JAVELIN 77
363 #endif
364 #ifndef EM_FIREPATH
365 #define EM_FIREPATH 78
366 #endif
367 #ifndef EM_ZSP
368 #define EM_ZSP 79
369 #endif
370 #ifndef EM_MMIX
371 #define EM_MMIX 80
372 #endif
373 #ifndef EM_HUANY
374 #define EM_HUANY 81
375 #endif
376 #ifndef EM_PRISM
377 #define EM_PRISM 82
378 #endif
379 #ifndef EM_AVR
380 #define EM_AVR 83
381 #endif
382 #ifndef EM_FR30
383 #define EM_FR30 84
384 #endif
385 #ifndef EM_D10V
386 #define EM_D10V 85
387 #endif
388 #ifndef EM_D30V
389 #define EM_D30V 86
390 #endif
391 #ifndef EM_V850
392 #define EM_V850 87
393 #endif
394 #ifndef EM_M32R
395 #define EM_M32R 88
396 #endif
397 #ifndef EM_MN10300
398 #define EM_MN10300 89
399 #endif
400 #ifndef EM_MN10200
401 #define EM_MN10200 90
402 #endif
403 #ifndef EM_PJ
404 #define EM_PJ 91
405 #endif
406 #ifndef EM_OPENRISC
407 #define EM_OPENRISC 92
408 #endif
409 #ifndef EM_ARC_COMPACT
410 #define EM_ARC_COMPACT 93
411 #endif
412 #ifndef EM_XTENSA
413 #define EM_XTENSA 94
414 #endif
415 #ifndef EM_VIDEOCORE
416 #define EM_VIDEOCORE 95
417 #endif
418 #ifndef EM_TMM_GPP
419 #define EM_TMM_GPP 96
420 #endif
421 #ifndef EM_NS32K
422 #define EM_NS32K 97
423 #endif
424 #ifndef EM_TPC
425 #define EM_TPC 98
426 #endif
427 #ifndef EM_SNP1K
428 #define EM_SNP1K 99
429 #endif
430 #ifndef EM_ST200
431 #define EM_ST200 100
432 #endif
433 #ifndef EM_IP2K
434 #define EM_IP2K 101
435 #endif
436 #ifndef EM_MAX
437 #define EM_MAX 102
438 #endif
439 #ifndef EM_CR
440 #define EM_CR 103
441 #endif
442 #ifndef EM_F2MC16
443 #define EM_F2MC16 104
444 #endif
445 #ifndef EM_MSP430
446 #define EM_MSP430 105
447 #endif
448 #ifndef EM_BLACKFIN
449 #define EM_BLACKFIN 106
450 #endif
451 #ifndef EM_SE_C33
452 #define EM_SE_C33 107
453 #endif
454 #ifndef EM_SEP
455 #define EM_SEP 108
456 #endif
457 #ifndef EM_ARCA
458 #define EM_ARCA 109
459 #endif
460 #ifndef EM_UNICORE
461 #define EM_UNICORE 110
462 #endif
463 #ifndef EM_EXCESS
464 #define EM_EXCESS 111
465 #endif
466 #ifndef EM_DXP
467 #define EM_DXP 112
468 #endif
469 #ifndef EM_ALTERA_NIOS2
470 #define EM_ALTERA_NIOS2 113
471 #endif
472 #ifndef EM_CRX
473 #define EM_CRX 114
474 #endif
475 #ifndef EM_XGATE
476 #define EM_XGATE 115
477 #endif
478 #ifndef EM_C166
479 #define EM_C166 116
480 #endif
481 #ifndef EM_M16C
482 #define EM_M16C 117
483 #endif
484 #ifndef EM_DSPIC30F
485 #define EM_DSPIC30F 118
486 #endif
487 #ifndef EM_CE
488 #define EM_CE 119
489 #endif
490 #ifndef EM_M32C
491 #define EM_M32C 120
492 #endif
493 #ifndef EM_TSK3000
494 #define EM_TSK3000 131
495 #endif
496 #ifndef EM_RS08
497 #define EM_RS08 132
498 #endif
499 #ifndef EM_SHARC
500 #define EM_SHARC 133
501 #endif
502 #ifndef EM_ECOG2
503 #define EM_ECOG2 134
504 #endif
505 #ifndef EM_SCORE7
506 #define EM_SCORE7 135
507 #endif
508 #ifndef EM_DSP24
509 #define EM_DSP24 136
510 #endif
511 #ifndef EM_VIDEOCORE3
512 #define EM_VIDEOCORE3 137
513 #endif
514 #ifndef EM_LATTICEMICO32
515 #define EM_LATTICEMICO32 138
516 #endif
517 #ifndef EM_SE_C17
518 #define EM_SE_C17 139
519 #endif
520 #ifndef EM_TI_C6000
521 #define EM_TI_C6000 140
522 #endif
523 #ifndef EM_TI_C2000
524 #define EM_TI_C2000 141
525 #endif
526 #ifndef EM_TI_C5500
527 #define EM_TI_C5500 142
528 #endif
529 #ifndef EM_TI_ARP32
530 #define EM_TI_ARP32 143
531 #endif
532 #ifndef EM_TI_PRU
533 #define EM_TI_PRU 144
534 #endif
535 #ifndef EM_MMDSP_PLUS
536 #define EM_MMDSP_PLUS 160
537 #endif
538 #ifndef EM_CYPRESS_M8C
539 #define EM_CYPRESS_M8C 161
540 #endif
541 #ifndef EM_R32C
542 #define EM_R32C 162
543 #endif
544 #ifndef EM_TRIMEDIA
545 #define EM_TRIMEDIA 163
546 #endif
547 #ifndef EM_QDSP6
548 #define EM_QDSP6 164
549 #endif
550 #ifndef EM_QUALCOMM_DSP6
551 #define EM_QUALCOMM_DSP6 164
552 #endif
553 #ifndef EM_8051
554 #define EM_8051 165
555 #endif
556 #ifndef EM_STXP7X
557 #define EM_STXP7X 166
558 #endif
559 #ifndef EM_NDS32
560 #define EM_NDS32 167
561 #endif
562 #ifndef EM_ECOG1X
563 #define EM_ECOG1X 168
564 #endif
565 #ifndef EM_MAXQ30
566 #define EM_MAXQ30 169
567 #endif
568 #ifndef EM_XIMO16
569 #define EM_XIMO16 170
570 #endif
571 #ifndef EM_MANIK
572 #define EM_MANIK 171
573 #endif
574 #ifndef EM_CRAYNV2
575 #define EM_CRAYNV2 172
576 #endif
577 #ifndef EM_RX
578 #define EM_RX 173
579 #endif
580 #ifndef EM_METAG
581 #define EM_METAG 174
582 #endif
583 #ifndef EM_MCST_ELBRUS
584 #define EM_MCST_ELBRUS 175
585 #endif
586 #ifndef EM_ECOG16
587 #define EM_ECOG16 176
588 #endif
589 #ifndef EM_CR16
590 #define EM_CR16 177
591 #endif
592 #ifndef EM_ETPU
593 #define EM_ETPU 178
594 #endif
595 #ifndef EM_SLE9X
596 #define EM_SLE9X 179
597 #endif
598 #ifndef EM_L10M
599 #define EM_L10M 180
600 #endif
601 #ifndef EM_K10M
602 #define EM_K10M 181
603 #endif
604 #ifndef EM_AARCH64
605 #define EM_AARCH64 183
606 #endif
607 #ifndef EM_AVR32
608 #define EM_AVR32 185
609 #endif
610 #ifndef EM_STM8
611 #define EM_STM8 186
612 #endif
613 #ifndef EM_TILE64
614 #define EM_TILE64 187
615 #endif
616 #ifndef EM_TILEPRO
617 #define EM_TILEPRO 188
618 #endif
619 #ifndef EM_MICROBLAZE
620 #define EM_MICROBLAZE 189
621 #endif
622 #ifndef EM_CUDA
623 #define EM_CUDA 190
624 #endif
625 #ifndef EM_TILEGX
626 #define EM_TILEGX 191
627 #endif
628 #ifndef EM_CLOUDSHIELD
629 #define EM_CLOUDSHIELD 192
630 #endif
631 #ifndef EM_COREA_1ST
632 #define EM_COREA_1ST 193
633 #endif
634 #ifndef EM_COREA_2ND
635 #define EM_COREA_2ND 194
636 #endif
637 #ifndef EM_ARC_COMPACT2
638 #define EM_ARC_COMPACT2 195
639 #endif
640 #ifndef EM_OPEN8
641 #define EM_OPEN8 196
642 #endif
643 #ifndef EM_RL78
644 #define EM_RL78 197
645 #endif
646 #ifndef EM_VIDEOCORE5
647 #define EM_VIDEOCORE5 198
648 #endif
649 #ifndef EM_78KOR
650 #define EM_78KOR 199
651 #endif
652 #ifndef EM_56800EX
653 #define EM_56800EX 200
654 #endif
655 #ifndef EM_BA1
656 #define EM_BA1 201
657 #endif
658 #ifndef EM_BA2
659 #define EM_BA2 202
660 #endif
661 #ifndef EM_XCORE
662 #define EM_XCORE 203
663 #endif
664 #ifndef EM_MCHP_PIC
665 #define EM_MCHP_PIC 204
666 #endif
667 #ifndef EM_KM32
668 #define EM_KM32 210
669 #endif
670 #ifndef EM_KMX32
671 #define EM_KMX32 211
672 #endif
673 #ifndef EM_EMX16
674 #define EM_EMX16 212
675 #endif
676 #ifndef EM_EMX8
677 #define EM_EMX8 213
678 #endif
679 #ifndef EM_KVARC
680 #define EM_KVARC 214
681 #endif
682 #ifndef EM_CDP
683 #define EM_CDP 215
684 #endif
685 #ifndef EM_COGE
686 #define EM_COGE 216
687 #endif
688 #ifndef EM_COOL
689 #define EM_COOL 217
690 #endif
691 #ifndef EM_NORC
692 #define EM_NORC 218
693 #endif
694 #ifndef EM_CSR_KALIMBA
695 #define EM_CSR_KALIMBA 219
696 #endif
697 #ifndef EM_Z80
698 #define EM_Z80 220
699 #endif
700 #ifndef EM_VISIUM
701 #define EM_VISIUM 221
702 #endif
703 #ifndef EM_FT32
704 #define EM_FT32 222
705 #endif
706 #ifndef EM_MOXIE
707 #define EM_MOXIE 223
708 #endif
709 #ifndef EM_AMDGPU
710 #define EM_AMDGPU 224
711 #endif
712 #ifndef EM_RISCV
713 #define EM_RISCV 243
714 #endif
715 #ifndef EM_BPF
716 #define EM_BPF 247
717 #endif
718
719 /* Standard Elf dynamic tags. */
720 #ifndef DT_NULL
721 #define DT_NULL 0
722 #endif
723 #ifndef DT_NEEDED
724 #define DT_NEEDED 1
725 #endif
726 #ifndef DT_PLTRELSZ
727 #define DT_PLTRELSZ 2
728 #endif
729 #ifndef DT_PLTGOT
730 #define DT_PLTGOT 3
731 #endif
732 #ifndef DT_HASH
733 #define DT_HASH 4
734 #endif
735 #ifndef DT_STRTAB
736 #define DT_STRTAB 5
737 #endif
738 #ifndef DT_SYMTAB
739 #define DT_SYMTAB 6
740 #endif
741 #ifndef DT_RELA
742 #define DT_RELA 7
743 #endif
744 #ifndef DT_REL
745 #define DT_REL 17
746 #endif
747 #ifndef DT_RELASZ
748 #define DT_RELASZ 8
749 #endif
750 #ifndef DT_RELAENT
751 #define DT_RELAENT 9
752 #endif
753 #ifndef DT_STRSZ
754 #define DT_STRSZ 10
755 #endif
756
757 #ifndef DT_SYMENT
758 #define DT_SYMENT 11
759 #endif
760
761 #ifndef DT_INIT
762 #define DT_INIT 12
763 #endif
764
765 #ifndef DT_FINI
766 #define DT_FINI 13
767 #endif
768
769 #ifndef DT_SONAME
770 #define DT_SONAME 14
771 #endif
772
773 #ifndef DT_RPATH
774 #define DT_RPATH 15
775 #endif
776
777 #ifndef DT_SYMBOLIC
778 #define DT_SYMBOLIC 16
779 #endif
780
781 #ifndef DT_REL
782 #define DT_REL 17
783 #endif
784 #ifndef DT_RELSZ
785 #define DT_RELSZ 18
786 #endif
787
788 #ifndef DT_RELENT
789 #define DT_RELENT 19
790 #endif
791
792 #ifndef DT_PLTREL
793 #define DT_PLTREL 20
794 #endif
795
796 #ifndef DT_DEBUG
797 #define DT_DEBUG 21
798 #endif
799
800 #ifndef DT_TEXTREL
801 #define DT_TEXTREL 22
802 #endif
803
804 #ifndef DT_JMPREL
805 #define DT_JMPREL 23
806 #endif
807
808 #ifndef SHN_UNDEF
809 #define SHN_UNDEF 0
810 #endif
811 #ifndef SHN_LORESERVE
812 #define SHN_LORESERVE 0xff00
813 #endif
814 #ifndef SHN_LOPROC
815 #define SHN_LOPROC 0xff00
816 #endif
817 #ifndef SHN_HIPROC
818 #define SHN_HIPROC 0xff1f
819 #endif
820 #ifndef SHN_ABS
821 #define SHN_ABS 0xfff1
822 #endif
823 #ifndef SHN_COMMON
824 #define SHN_COMMON 0xfff2
825 #endif
826 #ifndef SHN_HIRESERVE
827 #define SHN_HIRESERVE 0xffff
828 #endif
829
830 #ifndef EV_CURRENT
831 #define EV_CURRENT 1
832 #endif
833 #ifndef EV_NONE
834 #define EV_NONE 0
835 #endif
836
837 #ifndef EI_MAG0
838 #define EI_MAG0 0
839 #endif
840 #ifndef EI_MAG1
841 #define EI_MAG1 1
842 #endif
843 #ifndef EI_MAG2
844 #define EI_MAG2 2
845 #endif
846 #ifndef EI_MAG3
847 #define EI_MAG3 3
848 #endif
849 #ifndef EI_CLASS
850 #define EI_CLASS 4
851 #endif
852 #ifndef EI_DATA
853 #define EI_DATA 5
854 #endif
855 #ifndef EI_VERSION
856 #define EI_VERSION 6
857 #endif
858 #ifndef EI_PAD
859 #define EI_PAD 7
860 #endif
861 #ifndef EI_OSABI
862 #define EI_OSABI 7
863 #endif
864 #ifndef EI_NIDENT
865 #define EI_NIDENT 16
866 #endif
867 #ifndef EI_ABIVERSION
868 #define EI_ABIVERSION 8
869 #endif
870
871 #ifndef ELFMAG0
872 #define ELFMAG0 0x7f
873 #endif
874 #ifndef ELFMAG1
875 #define ELFMAG1 'E'
876 #endif
877 #ifndef ELFMAG2
878 #define ELFMAG2 'L'
879 #endif
880 #ifndef ELFMAG3
881 #define ELFMAG3 'F'
882 #endif
883 #ifndef ELFCLASSNONE
884 #define ELFCLASSNONE 0
885 #endif
886 #ifndef ELFCLASS32
887 #define ELFCLASS32 1
888 #endif
889 #ifndef ELFCLASS64
890 #define ELFCLASS64 2
891 #endif
892 #ifndef ELFDATANONE
893 #define ELFDATANONE 0
894 #endif
895 #ifndef ELFDATA2LSB
896 #define ELFDATA2LSB 1
897 #endif
898 #ifndef ELFDATA2MSB
899 #define ELFDATA2MSB 2
900 #endif
901
902 #ifndef ELFOSABI_NONE
903 #define ELFOSABI_NONE 0
904 #endif
905 #ifndef ELFOSABI_SYSV
906 #define ELFOSABI_SYSV 0
907 #endif
908 #ifndef ELFOSABI_HPUX
909 #define ELFOSABI_HPUX 1
910 #endif
911 #ifndef ELFOSABI_NETBSD
912 #define ELFOSABI_NETBSD 2
913 #endif
914 #ifndef ELFOSABI_GNU
915 #define ELFOSABI_GNU 3
916 #endif
917 #ifndef ELFOSABI_LINUX
918 #define ELFOSABI_LINUX ELFOSABI_GNU
919 #endif
920 #ifndef ELFOSABI_SOLARIS
921 #define ELFOSABI_SOLARIS 6
922 #endif
923 #ifndef ELFOSABI_AIX
924 #define ELFOSABI_AIX 7
925 #endif
926 #ifndef ELFOSABI_IRIX
927 #define ELFOSABI_IRIX 8
928 #endif
929 #ifndef ELFOSABI_FREEBSD
930 #define ELFOSABI_FREEBSD 9
931 #endif
932 #ifndef ELFOSABI_TRU64
933 #define ELFOSABI_TRU64 10
934 #endif
935 #ifndef ELFOSABI_MODESTO
936 #define ELFOSABI_MODESTO 11
937 #endif
938 #ifndef ELFOSABI_OPENBSD
939 #define ELFOSABI_OPENBSD 12
940 #endif
941 #ifndef ELFOSABI_ARM_AEABI
942 #define ELFOSABI_ARM_AEABI 64
943 #endif
944 #ifndef ELFOSABI_ARM
945 #define ELFOSABI_ARM 97
946 #endif
947 #ifndef ELFOSABI_STANDALONE
948 #define ELFOSABI_STANDALONE 255
949 #endif
950
951 /* for the producer code. */
952 #ifndef R_MIPS_NONE
953 #define R_MIPS_NONE 0
954 #endif
955 #ifndef R_QUALCOMM_REL32
956 #define R_QUALCOMM_REL32 6
957 #endif
958 /* For Freebsd: */
959 #ifndef R_PPC64_ADDR32
960 #define R_PPC64_ADDR32 1
961 #endif
962 #ifndef R_PPC64_DTPREL32
963 #define R_PPC64_DTPREL32 110
964 #endif
965 #ifndef R_PPC64_DTPREL64
966 #define R_PPC64_DTPREL64 78
967 #endif
968 #ifndef R_PPC_DTPREL32
969 #define R_PPC_DTPREL32 78
970 #endif
971 /* The following two probably useless. */
972 #ifndef R_X86_64_PC32_BND
973 #define R_X86_64_PC32_BND 39
974 #endif
975 #ifndef R_X86_64_PLT32_BND
976 #define R_X86_64_PLT32_BND 40
977 #endif
978
979 /* Seen in a Linux Kernel. Means 'nothing to do' */
980 #ifndef R_X86_64_NONE
981 #define R_X86_64_NONE 0
982 #endif /* R_X86_64_NONE */
983
984 #ifndef R_386_32
985 #define R_386_32 1
986 #endif /* R_386_32 */
987 #ifndef R_386_GOTOFF
988 #define R_386_GOTOFF 9
989 #endif /* R_386_GOTOFF */
990 #ifndef R_386_GOTPC
991 #define R_386_GOTPC 10
992 #endif /* R_386_GOTPC */
993 #ifndef R_386_PC32
994 #define R_386_PC32 2
995 #endif /* R_386_PC32 */
996 #ifndef R_386_TLS_DTPOFF32
997 #define R_386_TLS_DTPOFF32 36
998 #endif /* R_386_TLS_DTPOFF32 */
999 #ifndef R_386_TLS_LDO_32
1000 #define R_386_TLS_LDO_32 32
1001 #endif /* R_386_TLS_LDO_32 */
1002 #ifndef R_390_32
1003 #define R_390_32 4
1004 #endif /* R_390_32 */
1005 #ifndef R_390_64
1006 #define R_390_64 22
1007 #endif /* R_390_64 */
1008 #ifndef R_390_TLS_LDO32
1009 #define R_390_TLS_LDO32 52
1010 #endif /* R_390_TLS_LDO32 */
1011 #ifndef R_390_TLS_LDO64
1012 #define R_390_TLS_LDO64 53
1013 #endif /* R_390_TLS_LDO64 */
1014 #ifndef R_AARCH64_NONE
1015 #define R_AARCH64_NONE 0
1016 #endif /* R_AARCH64_NONE */
1017 #ifndef R_AARCH64_ABS32
1018 #define R_AARCH64_ABS32 258
1019 #endif /* R_AARCH64_ABS32 */
1020 #ifndef R_AARCH64_ABS64
1021 #define R_AARCH64_ABS64 257
1022 #endif /* R_AARCH64_ABS64 */
1023 #ifndef R_ARM_ABS32
1024 #define R_ARM_ABS32 2
1025 #endif /* R_ARM_ABS32 */
1026 #ifndef R_ARM_TLS_LDO32
1027 #define R_ARM_TLS_LDO32 106
1028 #endif /* R_ARM_TLS_LDO32 */
1029 #ifndef R_IA64_DIR32LSB
1030 #define R_IA64_DIR32LSB 0x25
1031 #endif /* R_IA64_DIR32LSB */
1032 #ifndef R_IA64_DIR64LSB
1033 #define R_IA64_DIR64LSB 0x27
1034 #endif /* R_IA64_DIR64LSB */
1035 #ifndef R_IA64_DTPREL32LSB
1036 #define R_IA64_DTPREL32LSB 0xb5
1037 #endif /* R_IA64_DTPREL32LSB */
1038 #ifndef R_IA64_DTPREL64LSB
1039 #define R_IA64_DTPREL64LSB 0xb7
1040 #endif /* R_IA64_DTPREL64LSB */
1041 #ifndef R_IA64_REL32LSB
1042 #define R_IA64_REL32LSB 0x6d
1043 #endif /* R_IA64_REL32LSB */
1044 #ifndef R_IA64_SECREL32LSB
1045 #define R_IA64_SECREL32LSB 0x65
1046 #endif /* R_IA64_SECREL32LSB */
1047 #ifndef R_IA64_SECREL64LSB
1048 #define R_IA64_SECREL64LSB 0x67
1049 #endif /* R_IA64_SECREL64LSB */
1050 #ifndef R_MIPS_32
1051 #define R_MIPS_32 2
1052 #endif /* R_MIPS_32 */
1053 #ifndef R_MIPS_64
1054 #define R_MIPS_64 18
1055 #endif /* R_MIPS_64 */
1056 #ifndef R_MIPS_TLS_DTPREL32
1057 #define R_MIPS_TLS_DTPREL32 39
1058 #endif /* R_MIPS_TLS_DTPREL32 */
1059 #ifndef R_MIPS_TLS_DTPREL64
1060 #define R_MIPS_TLS_DTPREL64 41
1061 #endif /* R_MIPS_TLS_DTPREL64 */
1062 #ifndef R_PPC64_ADDR64
1063 #define R_PPC64_ADDR64 38
1064 #endif /* R_PPC64_ADDR64 */
1065 #ifndef R_PPC64_DTPREL32
1066 #define R_PPC64_DTPREL32 110
1067 #endif /* R_PPC64_DTPREL32 */
1068 #ifndef R_PPC64_DTPREL64
1069 #define R_PPC64_DTPREL64 78
1070 #endif /* R_PPC64_DTPREL64 */
1071 #ifndef R_PPC_ADDR32
1072 #define R_PPC_ADDR32 1
1073 #endif /* R_PPC_ADDR32 */
1074 #ifndef R_PPC_DTPREL32
1075 #define R_PPC_DTPREL32 78
1076 #endif /* R_PPC_DTPREL32 */
1077 #ifndef R_QUALCOMM_REL32
1078 #define R_QUALCOMM_REL32 6
1079 #endif /* R_QUALCOMM_REL32 */
1080 #ifndef R_SH_DIR32
1081 #define R_SH_DIR32 1
1082 #endif /* R_SH_DIR32 */
1083 #ifndef R_SH_TLS_DTPOFF32
1084 #define R_SH_TLS_DTPOFF32 150
1085 #endif /* R_SH_TLS_DTPOFF32 */
1086 #ifndef R_SPARC_TLS_DTPOFF32
1087 #define R_SPARC_TLS_DTPOFF32 76
1088 #endif /* R_SPARC_TLS_DTPOFF32 */
1089 #ifndef R_SPARC_TLS_DTPOFF64
1090 #define R_SPARC_TLS_DTPOFF64 77
1091 #endif /* R_SPARC_TLS_DTPOFF64 */
1092 #ifndef R_SPARC_UA32
1093 #define R_SPARC_UA32 23
1094 #endif /* R_SPARC_UA32 */
1095 #ifndef R_SPARC_UA64
1096 #define R_SPARC_UA64 54
1097 #endif /* R_SPARC_UA64 */
1098 #ifndef R_X86_64_32
1099 #define R_X86_64_32 10
1100 #endif /* R_X86_64_32 */
1101 #ifndef R_X86_64_64
1102 #define R_X86_64_64 1
1103 #endif /* R_X86_64_64 */
1104 #ifndef R_X86_64_PC64
1105 #define R_X86_64_PC64 24
1106 #endif /* R_X86_64_PC64 */
1107 #ifndef R_X86_64_DTPOFF32
1108 #define R_X86_64_DTPOFF32 21
1109 #endif /* R_X86_64_DTPOFF32 */
1110 #ifndef R_X86_64_DTPOFF64
1111 #define R_X86_64_DTPOFF64 17
1112 #endif /* R_X86_64_DTPOFF64 */
1113 #ifndef R_X86_64_PC32
1114 #define R_X86_64_PC32 2
1115 #endif /* R_X86_64_PC32 */
1116
1117 #ifdef __cplusplus
1118 }
1119 #endif /* __cplusplus */
1120
1121 #endif /* DWARF_ELF_DEFINES_H */