aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorFangrui Song <i@maskray.me>2024-03-18 14:42:45 -0700
committerFangrui Song <i@maskray.me>2024-03-18 14:42:45 -0700
commit228757f6c3cd9271eb25b8869445aab5216fe0b6 (patch)
treec306699ac0201a27a3764028411e2c4fe816d440
parent7459f7247312f7035281062be9fc3d2bcde4bfc0 (diff)
downloadllvm-228757f6c3cd9271eb25b8869445aab5216fe0b6.zip
llvm-228757f6c3cd9271eb25b8869445aab5216fe0b6.tar.gz
llvm-228757f6c3cd9271eb25b8869445aab5216fe0b6.tar.bz2
[ELF] Improve --pack-dyn-relocs tests for Android and RELR
-rw-r--r--lld/test/ELF/pack-dyn-relocs-arm2.s13
-rw-r--r--lld/test/ELF/pack-dyn-relocs.s234
2 files changed, 118 insertions, 129 deletions
diff --git a/lld/test/ELF/pack-dyn-relocs-arm2.s b/lld/test/ELF/pack-dyn-relocs-arm2.s
index cf2cd8b..ed4fa52e 100644
--- a/lld/test/ELF/pack-dyn-relocs-arm2.s
+++ b/lld/test/ELF/pack-dyn-relocs-arm2.s
@@ -5,7 +5,7 @@
// RUN: llvm-mc -filetype=obj -triple=armv7a-none-linux-gnueabi %s -o %t.o
// RUN: ld.lld -pie --pack-dyn-relocs=relr %t.o %t.so -o %t.exe
-// RUN: llvm-readobj -r %t.exe | FileCheck %s
+// RUN: llvm-readobj -r -x .data %t.exe | FileCheck %s
// CHECK: Section (5) .relr.dyn {
// CHECK-NEXT: 0x301E8 R_ARM_RELATIVE -
@@ -43,6 +43,9 @@
// CHECK-NEXT: 0x30268 R_ARM_RELATIVE -
// CHECK-NEXT: 0x3026C R_ARM_RELATIVE -
// CHECK-NEXT: }
+// CHECK: Hex dump of section '.data':
+// CHECK-NEXT: 0x000301e8 00000000 01000000 02000000 ffffffff .
+// CHECK-NEXT: 0x000301f8 00000080 00000000 00000000 00000000 .
// RUN: llvm-readobj -S --dynamic-table %t.exe | FileCheck --check-prefix=HEADER %s
// HEADER: 0x00000023 RELRSZ 12 (bytes)
@@ -50,10 +53,10 @@
.data
.align 2
.dc.a __ehdr_start
-.dc.a __ehdr_start
-.dc.a __ehdr_start
-.dc.a __ehdr_start
-.dc.a __ehdr_start
+.dc.a __ehdr_start+1
+.dc.a __ehdr_start+2
+.dc.a __ehdr_start-1
+.dc.a __ehdr_start-0x80000000
.dc.a __ehdr_start
.dc.a __ehdr_start
.dc.a __ehdr_start
diff --git a/lld/test/ELF/pack-dyn-relocs.s b/lld/test/ELF/pack-dyn-relocs.s
index da97e38..9de5bee 100644
--- a/lld/test/ELF/pack-dyn-relocs.s
+++ b/lld/test/ELF/pack-dyn-relocs.s
@@ -198,11 +198,11 @@
// RUN: llvm-readobj -r %t2.a64 | FileCheck --check-prefix=UNPACKED64 %s
// UNPACKED64: Section ({{.+}}) .rela.dyn {
-// UNPACKED64-NEXT: 0x30690 R_AARCH64_RELATIVE - 0x1
-// UNPACKED64-NEXT: 0x30698 R_AARCH64_RELATIVE - 0x2
-// UNPACKED64-NEXT: 0x306A0 R_AARCH64_RELATIVE - 0x3
-// UNPACKED64-NEXT: 0x306A8 R_AARCH64_RELATIVE - 0x4
-// UNPACKED64-NEXT: 0x306B0 R_AARCH64_RELATIVE - 0x5
+// UNPACKED64-NEXT: 0x30690 R_AARCH64_RELATIVE - 0x0
+// UNPACKED64-NEXT: 0x30698 R_AARCH64_RELATIVE - 0x1
+// UNPACKED64-NEXT: 0x306A0 R_AARCH64_RELATIVE - 0x2
+// UNPACKED64-NEXT: 0x306A8 R_AARCH64_RELATIVE - 0xFFFFFFFFFFFFFFFF
+// UNPACKED64-NEXT: 0x306B0 R_AARCH64_RELATIVE - 0x80000000
// UNPACKED64-NEXT: 0x306B8 R_AARCH64_RELATIVE - 0x6
// UNPACKED64-NEXT: 0x306C0 R_AARCH64_RELATIVE - 0x7
// UNPACKED64-NEXT: 0x306C8 R_AARCH64_RELATIVE - 0x8
@@ -238,91 +238,72 @@
// UNPACKED64-NEXT: }
// RUN: ld.lld -pie --pack-dyn-relocs=android %t.a64.o %t.a64.so -o %t3.a64
-// RUN: llvm-readobj -S --dynamic-table %t3.a64 | FileCheck --check-prefix=ANDROID64-HEADERS %s
-// RUN: llvm-readobj -r %t3.a64 | FileCheck --check-prefix=ANDROID64 %s
-
-// ANDROID64-HEADERS: Index: 1
-// ANDROID64-HEADERS-NEXT: Name: .dynsym
-
-// ANDROID64-HEADERS: Name: .rela.dyn
-// ANDROID64-HEADERS-NEXT: Type: SHT_ANDROID_RELA
-// ANDROID64-HEADERS-NEXT: Flags [ (0x2)
-// ANDROID64-HEADERS-NEXT: SHF_ALLOC (0x2)
-// ANDROID64-HEADERS-NEXT: ]
-// ANDROID64-HEADERS-NEXT: Address: [[ADDR:.*]]
-// ANDROID64-HEADERS-NEXT: Offset: [[ADDR]]
-// ANDROID64-HEADERS-NEXT: Size: [[SIZE:.*]]
-// ANDROID64-HEADERS-NEXT: Link: 1
-// ANDROID64-HEADERS-NEXT: Info: 0
-// ANDROID64-HEADERS-NEXT: AddressAlignment: 8
-// ANDROID64-HEADERS-NEXT: EntrySize: 1
+// RUN: llvm-readelf -S -d -r %t3.a64 | FileCheck --check-prefix=ANDROID64 %s
+
+// ANDROID64: Name Type Address Off Size ES Flg Lk Inf Al
+// ANDROID64: .dynstr STRTAB {{.*}} 00 A 0 0 1
+// ANDROID64-NEXT: .rela.dyn ANDROID_RELA {{0*}}[[#%x,ANDROID:]] {{.*}} 01 A 1 0 8
+// ANDROID64-NEXT: .text PROGBITS {{.*}} 00 AX 0 0 4
+
+// ANDROID64: (DEBUG) 0x0
+// ANDROID64-NEXT: (ANDROID_RELA) 0x[[#ANDROID]]
+// ANDROID64-NEXT: (ANDROID_RELASZ) 122 (bytes)
+// ANDROID64-NEXT: (RELAENT) 24 (bytes)
// ANDROID64-HEADERS: 0x0000000060000011 ANDROID_RELA [[ADDR]]
// ANDROID64-HEADERS: 0x0000000060000012 ANDROID_RELASZ [[SIZE]]
-// ANDROID64: Section ({{.+}}) .rela.dyn {
-// ANDROID64-NEXT: 0x303E0 R_AARCH64_RELATIVE - 0x1
-// ANDROID64-NEXT: 0x303E8 R_AARCH64_RELATIVE - 0x2
-// ANDROID64-NEXT: 0x303F0 R_AARCH64_RELATIVE - 0x3
-// ANDROID64-NEXT: 0x303F8 R_AARCH64_RELATIVE - 0x4
-// ANDROID64-NEXT: 0x30400 R_AARCH64_RELATIVE - 0x5
-// ANDROID64-NEXT: 0x30408 R_AARCH64_RELATIVE - 0x6
-// ANDROID64-NEXT: 0x30410 R_AARCH64_RELATIVE - 0x7
-// ANDROID64-NEXT: 0x30418 R_AARCH64_RELATIVE - 0x8
-// ANDROID64-NEXT: 0x30470 R_AARCH64_RELATIVE - 0x1
-// ANDROID64-NEXT: 0x30478 R_AARCH64_RELATIVE - 0x2
-// ANDROID64-NEXT: 0x30480 R_AARCH64_RELATIVE - 0x3
-// ANDROID64-NEXT: 0x30488 R_AARCH64_RELATIVE - 0x4
-// ANDROID64-NEXT: 0x30490 R_AARCH64_RELATIVE - 0x5
-// ANDROID64-NEXT: 0x30498 R_AARCH64_RELATIVE - 0x6
-// ANDROID64-NEXT: 0x304A0 R_AARCH64_RELATIVE - 0x7
-// ANDROID64-NEXT: 0x304A8 R_AARCH64_RELATIVE - 0x8
-// ANDROID64-NEXT: 0x304B0 R_AARCH64_RELATIVE - 0x9
-
-// ANDROID64-NEXT: 0x30428 R_AARCH64_RELATIVE - 0x1
-// ANDROID64-NEXT: 0x30430 R_AARCH64_RELATIVE - 0x2
-// ANDROID64-NEXT: 0x30438 R_AARCH64_RELATIVE - 0x3
-// ANDROID64-NEXT: 0x30440 R_AARCH64_RELATIVE - 0x4
-// ANDROID64-NEXT: 0x30448 R_AARCH64_RELATIVE - 0x5
-// ANDROID64-NEXT: 0x30450 R_AARCH64_RELATIVE - 0x6
-// ANDROID64-NEXT: 0x30458 R_AARCH64_RELATIVE - 0x7
-
-// ANDROID64-NEXT: 0x304B9 R_AARCH64_RELATIVE - 0xA
-
-// ANDROID64-NEXT: 0x30468 R_AARCH64_ABS64 bar2 0x0
-// ANDROID64-NEXT: 0x304C1 R_AARCH64_ABS64 bar2 0x0
-// ANDROID64-NEXT: 0x304C9 R_AARCH64_ABS64 bar2 0x0
-// ANDROID64-NEXT: 0x304E1 R_AARCH64_ABS64 bar2 0x0
-// ANDROID64-NEXT: 0x30420 R_AARCH64_ABS64 bar2 0x1
-// ANDROID64-NEXT: 0x30460 R_AARCH64_ABS64 zed2 0x0
-// ANDROID64-NEXT: 0x304D1 R_AARCH64_ABS64 bar2 0x1
-// ANDROID64-NEXT: 0x304D9 R_AARCH64_ABS64 bar2 0x1
-// ANDROID64-NEXT: }
+// ANDROID64: Relocation section '.rela.dyn' at offset {{.*}} contains 33 entries:
+// ANDROID64-NEXT: Offset Info Type Symbol's Value Symbol's Name + Addend
+// ANDROID64-NEXT: 00000000000303e8 0000000000000403 R_AARCH64_RELATIVE 0
+// ANDROID64-NEXT: 00000000000303f0 0000000000000403 R_AARCH64_RELATIVE 1
+// ANDROID64-NEXT: 00000000000303f8 0000000000000403 R_AARCH64_RELATIVE 2
+// ANDROID64-NEXT: 0000000000030400 0000000000000403 R_AARCH64_RELATIVE ffffffffffffffff
+// ANDROID64-NEXT: 0000000000030408 0000000000000403 R_AARCH64_RELATIVE 80000000
+// ANDROID64-NEXT: 0000000000030410 0000000000000403 R_AARCH64_RELATIVE 6
+// ANDROID64-NEXT: 0000000000030418 0000000000000403 R_AARCH64_RELATIVE 7
+// ANDROID64-NEXT: 0000000000030420 0000000000000403 R_AARCH64_RELATIVE 8
+// ANDROID64-NEXT: 0000000000030478 0000000000000403 R_AARCH64_RELATIVE 1
+// ANDROID64-NEXT: 0000000000030480 0000000000000403 R_AARCH64_RELATIVE 2
+// ANDROID64-NEXT: 0000000000030488 0000000000000403 R_AARCH64_RELATIVE 3
+// ANDROID64-NEXT: 0000000000030490 0000000000000403 R_AARCH64_RELATIVE 4
+// ANDROID64-NEXT: 0000000000030498 0000000000000403 R_AARCH64_RELATIVE 5
+// ANDROID64-NEXT: 00000000000304a0 0000000000000403 R_AARCH64_RELATIVE 6
+// ANDROID64-NEXT: 00000000000304a8 0000000000000403 R_AARCH64_RELATIVE 7
+// ANDROID64-NEXT: 00000000000304b0 0000000000000403 R_AARCH64_RELATIVE 8
+// ANDROID64-NEXT: 00000000000304b8 0000000000000403 R_AARCH64_RELATIVE 9
+// ANDROID64-NEXT: 0000000000030430 0000000000000403 R_AARCH64_RELATIVE 1
+// ANDROID64-NEXT: 0000000000030438 0000000000000403 R_AARCH64_RELATIVE 2
+// ANDROID64-NEXT: 0000000000030440 0000000000000403 R_AARCH64_RELATIVE 3
+// ANDROID64-NEXT: 0000000000030448 0000000000000403 R_AARCH64_RELATIVE 4
+// ANDROID64-NEXT: 0000000000030450 0000000000000403 R_AARCH64_RELATIVE 5
+// ANDROID64-NEXT: 0000000000030458 0000000000000403 R_AARCH64_RELATIVE 6
+// ANDROID64-NEXT: 0000000000030460 0000000000000403 R_AARCH64_RELATIVE 7
+// ANDROID64-NEXT: 00000000000304c1 0000000000000403 R_AARCH64_RELATIVE a
+// ANDROID64-NEXT: 0000000000030470 0000000100000101 R_AARCH64_ABS64 0000000000000000 bar2 + 0
+// ANDROID64-NEXT: 00000000000304c9 0000000100000101 R_AARCH64_ABS64 0000000000000000 bar2 + 0
+// ANDROID64-NEXT: 00000000000304d1 0000000100000101 R_AARCH64_ABS64 0000000000000000 bar2 + 0
+// ANDROID64-NEXT: 00000000000304e9 0000000100000101 R_AARCH64_ABS64 0000000000000000 bar2 + 0
+// ANDROID64-NEXT: 0000000000030428 0000000100000101 R_AARCH64_ABS64 0000000000000000 bar2 + 1
+// ANDROID64-NEXT: 0000000000030468 0000000200000101 R_AARCH64_ABS64 0000000000000000 zed2 + 0
+// ANDROID64-NEXT: 00000000000304d9 0000000100000101 R_AARCH64_ABS64 0000000000000000 bar2 + 1
+// ANDROID64-NEXT: 00000000000304e1 0000000100000101 R_AARCH64_ABS64 0000000000000000 bar2 + 1
+// ANDROID64-EMPTY:
// RUN: ld.lld -pie --pack-dyn-relocs=relr %t.a64.o %t.a64.so -o %t4.a64
-// RUN: llvm-readobj -S --dynamic-table %t4.a64 | FileCheck --check-prefix=RELR64-HEADERS %s
+// RUN: llvm-readelf -Sdr -x .data %t4.a64 | FileCheck --check-prefix=RELR64 %s
// RUN: llvm-readobj -r --raw-relr %t4.a64 | FileCheck --check-prefix=RAW-RELR64 %s
-// RUN: llvm-readobj -r %t4.a64 | FileCheck --check-prefix=RELR64 %s
-
-// RELR64-HEADERS: Index: 1
-// RELR64-HEADERS-NEXT: Name: .dynsym
-
-// RELR64-HEADERS: Name: .relr.dyn
-// RELR64-HEADERS-NEXT: Type: SHT_RELR
-// RELR64-HEADERS-NEXT: Flags [ (0x2)
-// RELR64-HEADERS-NEXT: SHF_ALLOC (0x2)
-// RELR64-HEADERS-NEXT: ]
-// RELR64-HEADERS-NEXT: Address: [[ADDR:.*]]
-// RELR64-HEADERS-NEXT: Offset: [[ADDR]]
-// RELR64-HEADERS-NEXT: Size: 16
-// RELR64-HEADERS-NEXT: Link: 0
-// RELR64-HEADERS-NEXT: Info: 0
-// RELR64-HEADERS-NEXT: AddressAlignment: 8
-// RELR64-HEADERS-NEXT: EntrySize: 8
-
-// RELR64-HEADERS: 0x0000000000000024 RELR [[ADDR]]
-// RELR64-HEADERS: 0x0000000000000023 RELRSZ 16 (bytes)
-// RELR64-HEADERS: 0x0000000000000025 RELRENT 8 (bytes)
+
+// RELR64: Name Type Address Off Size ES Flg Lk Inf Al
+// RELR64: .dynstr STRTAB {{.*}} 00 A 0 0 1
+// RELR64-NEXT: .rela.dyn RELA {{.*}} 18 A 1 0 8
+// RELR64-NEXT: .relr.dyn RELR {{0*}}[[#%x,RELR:]] {{.*}} 08 A 0 0 8
+// RELR64-NEXT: .text PROGBITS 0000000000010380 000380 000000 00 AX 0 0 4
+
+// RELR64: (RELACOUNT) 1
+// RELR64: (RELR) 0x[[#RELR]]
+// RELR64-NEXT: (RELRSZ) 16 (bytes)
+// RELR64-NEXT: (RELRENT) 8 (bytes)
/// SHT_RELR section contains address/bitmap entries
/// encoding the offsets for relative relocation.
@@ -334,51 +315,56 @@
/// Decoded SHT_RELR section is same as UNPACKED,
/// but contains only the relative relocations.
/// Any relative relocations with odd offset stay in SHT_RELA.
-// RELR64: Section ({{.+}}) .rela.dyn {
-// RELR64-NEXT: 0x30569 R_AARCH64_RELATIVE - 0xA
-// RELR64-NEXT: 0x304D0 R_AARCH64_ABS64 bar2 0x1
-// RELR64-NEXT: 0x30518 R_AARCH64_ABS64 bar2 0x0
-// RELR64-NEXT: 0x30571 R_AARCH64_ABS64 bar2 0x0
-// RELR64-NEXT: 0x30579 R_AARCH64_ABS64 bar2 0x0
-// RELR64-NEXT: 0x30581 R_AARCH64_ABS64 bar2 0x1
-// RELR64-NEXT: 0x30589 R_AARCH64_ABS64 bar2 0x1
-// RELR64-NEXT: 0x30591 R_AARCH64_ABS64 bar2 0x0
-// RELR64-NEXT: 0x30510 R_AARCH64_ABS64 zed2 0x0
-// RELR64-NEXT: }
-// RELR64-NEXT: Section ({{.+}}) .relr.dyn {
-// RELR64-NEXT: 0x30490 R_AARCH64_RELATIVE -
-// RELR64-NEXT: 0x30498 R_AARCH64_RELATIVE -
-// RELR64-NEXT: 0x304A0 R_AARCH64_RELATIVE -
-// RELR64-NEXT: 0x304A8 R_AARCH64_RELATIVE -
-// RELR64-NEXT: 0x304B0 R_AARCH64_RELATIVE -
-// RELR64-NEXT: 0x304B8 R_AARCH64_RELATIVE -
-// RELR64-NEXT: 0x304C0 R_AARCH64_RELATIVE -
-// RELR64-NEXT: 0x304C8 R_AARCH64_RELATIVE -
-// RELR64-NEXT: 0x304D8 R_AARCH64_RELATIVE -
-// RELR64-NEXT: 0x304E0 R_AARCH64_RELATIVE -
-// RELR64-NEXT: 0x304E8 R_AARCH64_RELATIVE -
-// RELR64-NEXT: 0x304F0 R_AARCH64_RELATIVE -
-// RELR64-NEXT: 0x304F8 R_AARCH64_RELATIVE -
-// RELR64-NEXT: 0x30500 R_AARCH64_RELATIVE -
-// RELR64-NEXT: 0x30508 R_AARCH64_RELATIVE -
-// RELR64-NEXT: 0x30520 R_AARCH64_RELATIVE -
-// RELR64-NEXT: 0x30528 R_AARCH64_RELATIVE -
-// RELR64-NEXT: 0x30530 R_AARCH64_RELATIVE -
-// RELR64-NEXT: 0x30538 R_AARCH64_RELATIVE -
-// RELR64-NEXT: 0x30540 R_AARCH64_RELATIVE -
-// RELR64-NEXT: 0x30548 R_AARCH64_RELATIVE -
-// RELR64-NEXT: 0x30550 R_AARCH64_RELATIVE -
-// RELR64-NEXT: 0x30558 R_AARCH64_RELATIVE -
-// RELR64-NEXT: 0x30560 R_AARCH64_RELATIVE -
-// RELR64-NEXT: }
+// RELR64: Relocation section '.rela.dyn' at offset {{.*}} contains 9 entries:
+// RELR64-NEXT: Offset Info Type Symbol's Value Symbol's Name + Addend
+// RELR64-NEXT: 0000000000030569 0000000000000403 R_AARCH64_RELATIVE a
+// RELR64-NEXT: 00000000000304d0 0000000100000101 R_AARCH64_ABS64 0000000000000000 bar2 + 1
+// RELR64-NEXT: 0000000000030518 0000000100000101 R_AARCH64_ABS64 0000000000000000 bar2 + 0
+// RELR64-NEXT: 0000000000030571 0000000100000101 R_AARCH64_ABS64 0000000000000000 bar2 + 0
+// RELR64-NEXT: 0000000000030579 0000000100000101 R_AARCH64_ABS64 0000000000000000 bar2 + 0
+// RELR64-NEXT: 0000000000030581 0000000100000101 R_AARCH64_ABS64 0000000000000000 bar2 + 1
+// RELR64-NEXT: 0000000000030589 0000000100000101 R_AARCH64_ABS64 0000000000000000 bar2 + 1
+// RELR64-NEXT: 0000000000030591 0000000100000101 R_AARCH64_ABS64 0000000000000000 bar2 + 0
+// RELR64-NEXT: 0000000000030510 0000000200000101 R_AARCH64_ABS64 0000000000000000 zed2 + 0
+// RELR64-EMPTY:
+// RELR64-NEXT: Relocation section '.relr.dyn' at offset {{.*}} contains 24 entries:
+// RELR64-NEXT: Offset Info Type Symbol's Value Symbol's Name
+// RELR64-NEXT: 0000000000030490 0000000000000403 R_AARCH64_RELATIVE
+// RELR64-NEXT: 0000000000030498 0000000000000403 R_AARCH64_RELATIVE
+// RELR64-NEXT: 00000000000304a0 0000000000000403 R_AARCH64_RELATIVE
+// RELR64-NEXT: 00000000000304a8 0000000000000403 R_AARCH64_RELATIVE
+// RELR64-NEXT: 00000000000304b0 0000000000000403 R_AARCH64_RELATIVE
+// RELR64-NEXT: 00000000000304b8 0000000000000403 R_AARCH64_RELATIVE
+// RELR64-NEXT: 00000000000304c0 0000000000000403 R_AARCH64_RELATIVE
+// RELR64-NEXT: 00000000000304c8 0000000000000403 R_AARCH64_RELATIVE
+// RELR64-NEXT: 00000000000304d8 0000000000000403 R_AARCH64_RELATIVE
+// RELR64-NEXT: 00000000000304e0 0000000000000403 R_AARCH64_RELATIVE
+// RELR64-NEXT: 00000000000304e8 0000000000000403 R_AARCH64_RELATIVE
+// RELR64-NEXT: 00000000000304f0 0000000000000403 R_AARCH64_RELATIVE
+// RELR64-NEXT: 00000000000304f8 0000000000000403 R_AARCH64_RELATIVE
+// RELR64-NEXT: 0000000000030500 0000000000000403 R_AARCH64_RELATIVE
+// RELR64-NEXT: 0000000000030508 0000000000000403 R_AARCH64_RELATIVE
+// RELR64-NEXT: 0000000000030520 0000000000000403 R_AARCH64_RELATIVE
+// RELR64-NEXT: 0000000000030528 0000000000000403 R_AARCH64_RELATIVE
+// RELR64-NEXT: 0000000000030530 0000000000000403 R_AARCH64_RELATIVE
+// RELR64-NEXT: 0000000000030538 0000000000000403 R_AARCH64_RELATIVE
+// RELR64-NEXT: 0000000000030540 0000000000000403 R_AARCH64_RELATIVE
+// RELR64-NEXT: 0000000000030548 0000000000000403 R_AARCH64_RELATIVE
+// RELR64-NEXT: 0000000000030550 0000000000000403 R_AARCH64_RELATIVE
+// RELR64-NEXT: 0000000000030558 0000000000000403 R_AARCH64_RELATIVE
+// RELR64-NEXT: 0000000000030560 0000000000000403 R_AARCH64_RELATIVE
+// RELR64-NEXT: Hex dump of section '.data':
+// RELR64-NEXT: 0x00030490 00000000 00000000 01000000 00000000 .
+// RELR64-NEXT: 0x000304a0 02000000 00000000 ffffffff ffffffff .
+// RELR64-NEXT: 0x000304b0 00000080 00000000 06000000 00000000 .
.data
-.align 2
+.balign 2
+.dc.a __ehdr_start
.dc.a __ehdr_start + 1
.dc.a __ehdr_start + 2
-.dc.a __ehdr_start + 3
-.dc.a __ehdr_start + 4
-.dc.a __ehdr_start + 5
+.dc.a __ehdr_start - 1
+.dc.a __ehdr_start + 0x80000000
.dc.a __ehdr_start + 6
.dc.a __ehdr_start + 7
.dc.a __ehdr_start + 8