Skip to content

Commit 411d04c

Browse files
committed
Fix readelf output of relr
See d86079f and 89c95ef.
1 parent 4719599 commit 411d04c

File tree

1 file changed

+9
-25
lines changed

1 file changed

+9
-25
lines changed

lld/test/ELF/aarch64-reloc-pauth.s

Lines changed: 9 additions & 25 deletions
Original file line numberDiff line numberDiff line change
@@ -67,28 +67,12 @@
6767
# RELR-NEXT: 0000000000030480 0000000200000244 R_AARCH64_AUTH_ABS64 0000000000000000 bar2 + 0
6868
# RELR-EMPTY:
6969
# RELR-NEXT: Relocation section '.relr.auth.dyn' at offset 0x[[ADDR2]] contains 5 entries:
70-
# RELR-NEXT: Offset Info Type Symbol's Value Symbol's Name
71-
# RELR-NEXT: 0000000000030440 0000000000000403 R_AARCH64_RELATIVE
72-
# RELR-NEXT: 0000000000030448 0000000000000403 R_AARCH64_RELATIVE
73-
# RELR-NEXT: 0000000000030450 0000000000000403 R_AARCH64_RELATIVE
74-
# RELR-NEXT: 0000000000030458 0000000000000403 R_AARCH64_RELATIVE
75-
# RELR-NEXT: 0000000000030492 0000000000000403 R_AARCH64_RELATIVE
76-
77-
# RUN: llvm-readobj -r --raw-relr main.pie | \
78-
# RUN: FileCheck --match-full-lines --check-prefix=RAW-RELR %s
79-
80-
## SHT_RELR section contains address/bitmap entries
81-
## encoding the offsets for relative relocation.
82-
83-
# RAW-RELR: Section ({{.+}}) .relr.auth.dyn {
84-
# RAW-RELR-NEXT: 0x30440
85-
# RAW-RELR-NEXT: 0xF
86-
## 0xF = 0b111100..00
87-
## lsb hsb
88-
## Bits 1..3 are set, we have relocs at 0x30440 and the next 3 places: 0x30448, 0x3450, 0x30458
89-
# RAW-RELR-NEXT: 0x30492
90-
## A single reloc at ^^^^^^^
91-
# RAW-RELR-NEXT: }
70+
# RELR-NEXT: Index: Entry Address Symbolic Address
71+
# RELR-NEXT: 0000: 0000000000030440 0000000000030440 $d.0
72+
# RELR-NEXT: 0001: 000000000000000f 0000000000030448 $d.0 + 0x8
73+
# RELR-NEXT: 0000000000030450 $d.0 + 0x10
74+
# RELR-NEXT: 0000000000030458 $d.0 + 0x18
75+
# RELR-NEXT: 0002: 0000000000030492 0000000000030492 $d.0 + 0x52
9276

9377
# HEX: Hex dump of section '.test':
9478
# HEX-NEXT: 0x00030440 01000000 2a000020 42040300 2b000000
@@ -181,7 +165,7 @@
181165
# EMPTY-RELR-NEXT: 0000000000030320 0000000000000411 R_AARCH64_AUTH_RELATIVE 8003031f
182166
# EMPTY-RELR-EMPTY:
183167
# EMPTY-RELR-NEXT: Relocation section '.relr.auth.dyn' at offset {{.*}} contains 0 entries:
184-
# EMPTY-RELR-NEXT: Offset Info Type Symbol's Value Symbol's Name
168+
# EMPTY-RELR-NEXT: Index: Entry Address Symbolic Address
185169

186170
.section .test, "aw"
187171
.p2align 3
@@ -214,8 +198,8 @@
214198
# EMPTY-RELA-NEXT: Offset Info Type Symbol's Value Symbol's Name
215199
# EMPTY-RELA-EMPTY:
216200
# EMPTY-RELA-NEXT: Relocation section '.relr.auth.dyn' at offset {{.*}} contains 1 entries:
217-
# EMPTY-RELA-NEXT: Offset Info Type Symbol's Value Symbol's Name
218-
# EMPTY-RELA-NEXT: 0000000000030310 0000000000000403 R_AARCH64_RELATIVE
201+
# EMPTY-RELA-NEXT: Index: Entry Address Symbolic Address
202+
# EMPTY-RELA-NEXT: 0000: 0000000000030310 0000000000030310 $d.0
219203

220204
.section .test, "aw"
221205
.p2align 3

0 commit comments

Comments
 (0)