Line data Source code
1 :
2 : #ifndef ELF_RELOC
3 : #error "ELF_RELOC must be defined"
4 : #endif
5 :
6 : // glibc's PowerPC asm/sigcontext.h, when compiling for PPC64, has the
7 : // unfortunate behavior of including asm/elf.h, which defines R_PPC_NONE, etc.
8 : // to their corresponding integer values. As a result, we need to undef them
9 : // here before continuing.
10 :
11 : #undef R_PPC64_NONE
12 : #undef R_PPC64_ADDR32
13 : #undef R_PPC64_ADDR24
14 : #undef R_PPC64_ADDR16
15 : #undef R_PPC64_ADDR16_LO
16 : #undef R_PPC64_ADDR16_HI
17 : #undef R_PPC64_ADDR16_HA
18 : #undef R_PPC64_ADDR14
19 : #undef R_PPC64_ADDR14_BRTAKEN
20 : #undef R_PPC64_ADDR14_BRNTAKEN
21 : #undef R_PPC64_REL24
22 : #undef R_PPC64_REL14
23 : #undef R_PPC64_REL14_BRTAKEN
24 : #undef R_PPC64_REL14_BRNTAKEN
25 : #undef R_PPC64_GOT16
26 : #undef R_PPC64_GOT16_LO
27 : #undef R_PPC64_GOT16_HI
28 : #undef R_PPC64_GOT16_HA
29 : #undef R_PPC64_GLOB_DAT
30 : #undef R_PPC64_JMP_SLOT
31 : #undef R_PPC64_RELATIVE
32 : #undef R_PPC64_REL32
33 : #undef R_PPC64_ADDR64
34 : #undef R_PPC64_ADDR16_HIGHER
35 : #undef R_PPC64_ADDR16_HIGHERA
36 : #undef R_PPC64_ADDR16_HIGHEST
37 : #undef R_PPC64_ADDR16_HIGHESTA
38 : #undef R_PPC64_REL64
39 : #undef R_PPC64_TOC16
40 : #undef R_PPC64_TOC16_LO
41 : #undef R_PPC64_TOC16_HI
42 : #undef R_PPC64_TOC16_HA
43 : #undef R_PPC64_TOC
44 : #undef R_PPC64_ADDR16_DS
45 : #undef R_PPC64_ADDR16_LO_DS
46 : #undef R_PPC64_GOT16_DS
47 : #undef R_PPC64_GOT16_LO_DS
48 : #undef R_PPC64_TOC16_DS
49 : #undef R_PPC64_TOC16_LO_DS
50 : #undef R_PPC64_TLS
51 : #undef R_PPC64_DTPMOD64
52 : #undef R_PPC64_TPREL16
53 : #undef R_PPC64_TPREL16_LO
54 : #undef R_PPC64_TPREL16_HI
55 : #undef R_PPC64_TPREL16_HA
56 : #undef R_PPC64_TPREL64
57 : #undef R_PPC64_DTPREL16
58 : #undef R_PPC64_DTPREL16_LO
59 : #undef R_PPC64_DTPREL16_HI
60 : #undef R_PPC64_DTPREL16_HA
61 : #undef R_PPC64_DTPREL64
62 : #undef R_PPC64_GOT_TLSGD16
63 : #undef R_PPC64_GOT_TLSGD16_LO
64 : #undef R_PPC64_GOT_TLSGD16_HI
65 : #undef R_PPC64_GOT_TLSGD16_HA
66 : #undef R_PPC64_GOT_TLSLD16
67 : #undef R_PPC64_GOT_TLSLD16_LO
68 : #undef R_PPC64_GOT_TLSLD16_HI
69 : #undef R_PPC64_GOT_TLSLD16_HA
70 : #undef R_PPC64_GOT_TPREL16_DS
71 : #undef R_PPC64_GOT_TPREL16_LO_DS
72 : #undef R_PPC64_GOT_TPREL16_HI
73 : #undef R_PPC64_GOT_TPREL16_HA
74 : #undef R_PPC64_GOT_DTPREL16_DS
75 : #undef R_PPC64_GOT_DTPREL16_LO_DS
76 : #undef R_PPC64_GOT_DTPREL16_HI
77 : #undef R_PPC64_GOT_DTPREL16_HA
78 : #undef R_PPC64_TPREL16_DS
79 : #undef R_PPC64_TPREL16_LO_DS
80 : #undef R_PPC64_TPREL16_HIGHER
81 : #undef R_PPC64_TPREL16_HIGHERA
82 : #undef R_PPC64_TPREL16_HIGHEST
83 : #undef R_PPC64_TPREL16_HIGHESTA
84 : #undef R_PPC64_DTPREL16_DS
85 : #undef R_PPC64_DTPREL16_LO_DS
86 : #undef R_PPC64_DTPREL16_HIGHER
87 : #undef R_PPC64_DTPREL16_HIGHERA
88 : #undef R_PPC64_DTPREL16_HIGHEST
89 : #undef R_PPC64_DTPREL16_HIGHESTA
90 : #undef R_PPC64_TLSGD
91 : #undef R_PPC64_TLSLD
92 : #undef R_PPC64_REL16
93 : #undef R_PPC64_REL16_LO
94 : #undef R_PPC64_REL16_HI
95 : #undef R_PPC64_REL16_HA
96 :
97 2 : ELF_RELOC(R_PPC64_NONE, 0)
98 2 : ELF_RELOC(R_PPC64_ADDR32, 1)
99 2 : ELF_RELOC(R_PPC64_ADDR24, 2)
100 3 : ELF_RELOC(R_PPC64_ADDR16, 3)
101 12 : ELF_RELOC(R_PPC64_ADDR16_LO, 4)
102 8 : ELF_RELOC(R_PPC64_ADDR16_HI, 5)
103 6 : ELF_RELOC(R_PPC64_ADDR16_HA, 6)
104 4 : ELF_RELOC(R_PPC64_ADDR14, 7)
105 0 : ELF_RELOC(R_PPC64_ADDR14_BRTAKEN, 8)
106 0 : ELF_RELOC(R_PPC64_ADDR14_BRNTAKEN, 9)
107 17 : ELF_RELOC(R_PPC64_REL24, 10)
108 2 : ELF_RELOC(R_PPC64_REL14, 11)
109 0 : ELF_RELOC(R_PPC64_REL14_BRTAKEN, 12)
110 0 : ELF_RELOC(R_PPC64_REL14_BRNTAKEN, 13)
111 4 : ELF_RELOC(R_PPC64_GOT16, 14)
112 8 : ELF_RELOC(R_PPC64_GOT16_LO, 15)
113 4 : ELF_RELOC(R_PPC64_GOT16_HI, 16)
114 4 : ELF_RELOC(R_PPC64_GOT16_HA, 17)
115 1 : ELF_RELOC(R_PPC64_GLOB_DAT, 20)
116 0 : ELF_RELOC(R_PPC64_JMP_SLOT, 21)
117 7 : ELF_RELOC(R_PPC64_RELATIVE, 22)
118 14 : ELF_RELOC(R_PPC64_REL32, 26)
119 60 : ELF_RELOC(R_PPC64_ADDR64, 38)
120 4 : ELF_RELOC(R_PPC64_ADDR16_HIGHER, 39)
121 2 : ELF_RELOC(R_PPC64_ADDR16_HIGHERA, 40)
122 4 : ELF_RELOC(R_PPC64_ADDR16_HIGHEST, 41)
123 2 : ELF_RELOC(R_PPC64_ADDR16_HIGHESTA, 42)
124 2 : ELF_RELOC(R_PPC64_REL64, 44)
125 2 : ELF_RELOC(R_PPC64_TOC16, 47)
126 17 : ELF_RELOC(R_PPC64_TOC16_LO, 48)
127 2 : ELF_RELOC(R_PPC64_TOC16_HI, 49)
128 35 : ELF_RELOC(R_PPC64_TOC16_HA, 50)
129 39 : ELF_RELOC(R_PPC64_TOC, 51)
130 4 : ELF_RELOC(R_PPC64_ADDR16_DS, 56)
131 4 : ELF_RELOC(R_PPC64_ADDR16_LO_DS, 57)
132 4 : ELF_RELOC(R_PPC64_GOT16_DS, 58)
133 4 : ELF_RELOC(R_PPC64_GOT16_LO_DS, 59)
134 5 : ELF_RELOC(R_PPC64_TOC16_DS, 63)
135 29 : ELF_RELOC(R_PPC64_TOC16_LO_DS, 64)
136 5 : ELF_RELOC(R_PPC64_TLS, 67)
137 2 : ELF_RELOC(R_PPC64_DTPMOD64, 68)
138 2 : ELF_RELOC(R_PPC64_TPREL16, 69)
139 5 : ELF_RELOC(R_PPC64_TPREL16_LO, 70)
140 2 : ELF_RELOC(R_PPC64_TPREL16_HI, 71)
141 5 : ELF_RELOC(R_PPC64_TPREL16_HA, 72)
142 2 : ELF_RELOC(R_PPC64_TPREL64, 73)
143 2 : ELF_RELOC(R_PPC64_DTPREL16, 74)
144 5 : ELF_RELOC(R_PPC64_DTPREL16_LO, 75)
145 2 : ELF_RELOC(R_PPC64_DTPREL16_HI, 76)
146 5 : ELF_RELOC(R_PPC64_DTPREL16_HA, 77)
147 2 : ELF_RELOC(R_PPC64_DTPREL64, 78)
148 2 : ELF_RELOC(R_PPC64_GOT_TLSGD16, 79)
149 5 : ELF_RELOC(R_PPC64_GOT_TLSGD16_LO, 80)
150 2 : ELF_RELOC(R_PPC64_GOT_TLSGD16_HI, 81)
151 5 : ELF_RELOC(R_PPC64_GOT_TLSGD16_HA, 82)
152 2 : ELF_RELOC(R_PPC64_GOT_TLSLD16, 83)
153 5 : ELF_RELOC(R_PPC64_GOT_TLSLD16_LO, 84)
154 2 : ELF_RELOC(R_PPC64_GOT_TLSLD16_HI, 85)
155 5 : ELF_RELOC(R_PPC64_GOT_TLSLD16_HA, 86)
156 4 : ELF_RELOC(R_PPC64_GOT_TPREL16_DS, 87)
157 7 : ELF_RELOC(R_PPC64_GOT_TPREL16_LO_DS, 88)
158 2 : ELF_RELOC(R_PPC64_GOT_TPREL16_HI, 89)
159 5 : ELF_RELOC(R_PPC64_GOT_TPREL16_HA, 90)
160 4 : ELF_RELOC(R_PPC64_GOT_DTPREL16_DS, 91)
161 4 : ELF_RELOC(R_PPC64_GOT_DTPREL16_LO_DS, 92)
162 2 : ELF_RELOC(R_PPC64_GOT_DTPREL16_HI, 93)
163 2 : ELF_RELOC(R_PPC64_GOT_DTPREL16_HA, 94)
164 2 : ELF_RELOC(R_PPC64_TPREL16_DS, 95)
165 2 : ELF_RELOC(R_PPC64_TPREL16_LO_DS, 96)
166 2 : ELF_RELOC(R_PPC64_TPREL16_HIGHER, 97)
167 2 : ELF_RELOC(R_PPC64_TPREL16_HIGHERA, 98)
168 2 : ELF_RELOC(R_PPC64_TPREL16_HIGHEST, 99)
169 2 : ELF_RELOC(R_PPC64_TPREL16_HIGHESTA, 100)
170 2 : ELF_RELOC(R_PPC64_DTPREL16_DS, 101)
171 2 : ELF_RELOC(R_PPC64_DTPREL16_LO_DS, 102)
172 2 : ELF_RELOC(R_PPC64_DTPREL16_HIGHER, 103)
173 2 : ELF_RELOC(R_PPC64_DTPREL16_HIGHERA, 104)
174 2 : ELF_RELOC(R_PPC64_DTPREL16_HIGHEST, 105)
175 2 : ELF_RELOC(R_PPC64_DTPREL16_HIGHESTA, 106)
176 5 : ELF_RELOC(R_PPC64_TLSGD, 107)
177 5 : ELF_RELOC(R_PPC64_TLSLD, 108)
178 2 : ELF_RELOC(R_PPC64_REL16, 249)
179 2 : ELF_RELOC(R_PPC64_REL16_LO, 250)
180 2 : ELF_RELOC(R_PPC64_REL16_HI, 251)
181 2 : ELF_RELOC(R_PPC64_REL16_HA, 252)
|