|
117 | 117 | // ANDROID32-NEXT: }
|
118 | 118 |
|
119 | 119 | // RUN: ld.lld -pie --pack-dyn-relocs=relr %t.a32.o %t.a32.so -o %t4.a32
|
120 |
| -// RUN: llvm-readobj -S --dynamic-table %t4.a32 | FileCheck --check-prefix=RELR32-HEADERS %s |
121 |
| -// RUN: llvm-readobj -r --raw-relr %t4.a32 | FileCheck --check-prefix=RAW-RELR32 %s |
122 |
| -// RUN: llvm-readobj -r %t4.a32 | FileCheck --check-prefix=RELR32 %s |
123 |
| - |
124 |
| -// RELR32-HEADERS: Index: 1 |
125 |
| -// RELR32-HEADERS-NEXT: Name: .dynsym |
126 |
| - |
127 |
| -// RELR32-HEADERS: Name: .relr.dyn |
128 |
| -// RELR32-HEADERS-NEXT: Type: SHT_RELR |
129 |
| -// RELR32-HEADERS-NEXT: Flags [ (0x2) |
130 |
| -// RELR32-HEADERS-NEXT: SHF_ALLOC (0x2) |
131 |
| -// RELR32-HEADERS-NEXT: ] |
132 |
| -// RELR32-HEADERS-NEXT: Address: [[ADDR:.*]] |
133 |
| -// RELR32-HEADERS-NEXT: Offset: [[ADDR]] |
134 |
| -// RELR32-HEADERS-NEXT: Size: 8 |
135 |
| -// RELR32-HEADERS-NEXT: Link: 0 |
136 |
| -// RELR32-HEADERS-NEXT: Info: 0 |
137 |
| -// RELR32-HEADERS-NEXT: AddressAlignment: 4 |
138 |
| -// RELR32-HEADERS-NEXT: EntrySize: 4 |
139 |
| - |
140 |
| -// RELR32-HEADERS: 0x00000024 RELR [[ADDR]] |
141 |
| -// RELR32-HEADERS: 0x00000023 RELRSZ 8 (bytes) |
142 |
| -// RELR32-HEADERS: 0x00000025 RELRENT 4 (bytes) |
143 |
| - |
144 |
| -/// SHT_RELR section contains address/bitmap entries |
145 |
| -/// encoding the offsets for relative relocation. |
146 |
| -// RAW-RELR32: Section ({{.+}}) .relr.dyn { |
147 |
| -// RAW-RELR32-NEXT: 0x30284 |
148 |
| -// RAW-RELR32-NEXT: 0x7FCFEFF |
149 |
| -// RAW-RELR32-NEXT: } |
| 120 | +// RUN: llvm-readelf -Sdr %t4.a32 | FileCheck --check-prefix=RELR32 %s |
150 | 121 |
|
151 |
| -/// Decoded SHT_RELR section is same as UNPACKED, |
152 |
| -/// but contains only the relative relocations. |
153 |
| -/// Any relative relocations with odd offset stay in SHT_REL. |
154 |
| -// RELR32: Section ({{.+}}) .rel.dyn { |
155 |
| -// RELR32-NEXT: 0x302F1 R_ARM_RELATIVE - |
156 |
| -// RELR32-NEXT: 0x302A4 R_ARM_ABS32 bar2 |
157 |
| -// RELR32-NEXT: 0x302C8 R_ARM_ABS32 bar2 |
158 |
| -// RELR32-NEXT: 0x302F5 R_ARM_ABS32 bar2 |
159 |
| -// RELR32-NEXT: 0x302F9 R_ARM_ABS32 bar2 |
160 |
| -// RELR32-NEXT: 0x302FD R_ARM_ABS32 bar2 |
161 |
| -// RELR32-NEXT: 0x30301 R_ARM_ABS32 bar2 |
162 |
| -// RELR32-NEXT: 0x30305 R_ARM_ABS32 bar2 |
163 |
| -// RELR32-NEXT: 0x302C4 R_ARM_ABS32 zed2 |
164 |
| -// RELR32-NEXT: } |
165 |
| -// RELR32-NEXT: Section ({{.+}}) .relr.dyn { |
166 |
| -// RELR32-NEXT: 0x30284 R_ARM_RELATIVE - |
167 |
| -// RELR32-NEXT: 0x30288 R_ARM_RELATIVE - |
168 |
| -// RELR32-NEXT: 0x3028C R_ARM_RELATIVE - |
169 |
| -// RELR32-NEXT: 0x30290 R_ARM_RELATIVE - |
170 |
| -// RELR32-NEXT: 0x30294 R_ARM_RELATIVE - |
171 |
| -// RELR32-NEXT: 0x30298 R_ARM_RELATIVE - |
172 |
| -// RELR32-NEXT: 0x3029C R_ARM_RELATIVE - |
173 |
| -// RELR32-NEXT: 0x302A0 R_ARM_RELATIVE - |
174 |
| - |
175 |
| -// RELR32-NEXT: 0x302A8 R_ARM_RELATIVE - |
176 |
| -// RELR32-NEXT: 0x302AC R_ARM_RELATIVE - |
177 |
| -// RELR32-NEXT: 0x302B0 R_ARM_RELATIVE - |
178 |
| -// RELR32-NEXT: 0x302B4 R_ARM_RELATIVE - |
179 |
| -// RELR32-NEXT: 0x302B8 R_ARM_RELATIVE - |
180 |
| -// RELR32-NEXT: 0x302BC R_ARM_RELATIVE - |
181 |
| -// RELR32-NEXT: 0x302C0 R_ARM_RELATIVE - |
182 |
| - |
183 |
| -// RELR32-NEXT: 0x302CC R_ARM_RELATIVE - |
184 |
| -// RELR32-NEXT: 0x302D0 R_ARM_RELATIVE - |
185 |
| -// RELR32-NEXT: 0x302D4 R_ARM_RELATIVE - |
186 |
| -// RELR32-NEXT: 0x302D8 R_ARM_RELATIVE - |
187 |
| -// RELR32-NEXT: 0x302DC R_ARM_RELATIVE - |
188 |
| -// RELR32-NEXT: 0x302E0 R_ARM_RELATIVE - |
189 |
| -// RELR32-NEXT: 0x302E4 R_ARM_RELATIVE - |
190 |
| -// RELR32-NEXT: 0x302E8 R_ARM_RELATIVE - |
191 |
| -// RELR32-NEXT: 0x302EC R_ARM_RELATIVE - |
192 |
| -// RELR32-NEXT: } |
| 122 | +// RELR32: Name Type Address Off Size ES Flg Lk Inf Al |
| 123 | +// RELR32: .dynstr STRTAB {{.*}} 00 A 0 0 1 |
| 124 | +// RELR32-NEXT: .rel.dyn REL {{.*}} 08 A 1 0 4 |
| 125 | +// RELR32-NEXT: .relr.dyn RELR {{0*}}[[#%x,RELR:]] {{.*}} 04 A 0 0 4 |
| 126 | + |
| 127 | +// RELR32: (RELCOUNT) 1 |
| 128 | +// RELR32: (RELR) 0x[[#RELR]] |
| 129 | +// RELR32-NEXT: (RELRSZ) 8 (bytes) |
| 130 | +// RELR32-NEXT: (RELRENT) 4 (bytes) |
| 131 | + |
| 132 | +// RELR32: Relocation section '.relr.dyn' at offset {{.*}} contains 24 entries: |
| 133 | +// RELR32-NEXT: Index: Entry Address Symbolic Address |
| 134 | +// RELR32-NEXT: 0000: 00030284 {{.*}} |
| 135 | +// RELR32-NEXT: 0001: 07fcfeff {{.*}} |
193 | 136 |
|
194 | 137 | // RUN: llvm-mc -filetype=obj -triple=aarch64-unknown-linux %p/Inputs/shared2.s -o %t.a64.so.o
|
195 | 138 | // RUN: ld.lld -shared %t.a64.so.o -soname=so -o %t.a64.so
|
|
292 | 235 |
|
293 | 236 | // RUN: ld.lld -pie --pack-dyn-relocs=relr %t.a64.o %t.a64.so -o %t4.a64
|
294 | 237 | // RUN: llvm-readelf -Sdr -x .data %t4.a64 | FileCheck --check-prefix=RELR64 %s
|
295 |
| -// RUN: llvm-readobj -r --raw-relr %t4.a64 | FileCheck --check-prefix=RAW-RELR64 %s |
296 | 238 |
|
297 | 239 | // RELR64: Name Type Address Off Size ES Flg Lk Inf Al
|
298 | 240 | // RELR64: .dynstr STRTAB {{.*}} 00 A 0 0 1
|
|
305 | 247 | // RELR64-NEXT: (RELRSZ) 16 (bytes)
|
306 | 248 | // RELR64-NEXT: (RELRENT) 8 (bytes)
|
307 | 249 |
|
308 |
| -/// SHT_RELR section contains address/bitmap entries |
309 |
| -/// encoding the offsets for relative relocation. |
310 |
| -// RAW-RELR64: Section ({{.+}}) .relr.dyn { |
311 |
| -// RAW-RELR64-NEXT: 0x30490 |
312 |
| -// RAW-RELR64-NEXT: 0x7FCFEFF |
313 |
| -// RAW-RELR64-NEXT: } |
314 |
| - |
315 | 250 | /// Decoded SHT_RELR section is same as UNPACKED,
|
316 | 251 | /// but contains only the relative relocations.
|
317 | 252 | /// Any relative relocations with odd offset stay in SHT_RELA.
|
|
0 commit comments