[lld] 82c320c - [ELF,test] Remove --raw-relr from pack-dyn-relocs.s
Fangrui Song via llvm-commits
llvm-commits at lists.llvm.org
Fri Apr 19 09:51:35 PDT 2024
Author: Fangrui Song
Date: 2024-04-19T09:51:29-07:00
New Revision: 82c320ca59744b5082ef6e45dab6bab20cbd0795
URL: https://github.com/llvm/llvm-project/commit/82c320ca59744b5082ef6e45dab6bab20cbd0795
DIFF: https://github.com/llvm/llvm-project/commit/82c320ca59744b5082ef6e45dab6bab20cbd0795.diff
LOG: [ELF,test] Remove --raw-relr from pack-dyn-relocs.s
Added:
Modified:
lld/test/ELF/pack-dyn-relocs.s
Removed:
################################################################################
diff --git a/lld/test/ELF/pack-dyn-relocs.s b/lld/test/ELF/pack-dyn-relocs.s
index e267147759d4d4..3cbba687169720 100644
--- a/lld/test/ELF/pack-dyn-relocs.s
+++ b/lld/test/ELF/pack-dyn-relocs.s
@@ -117,79 +117,22 @@
// ANDROID32-NEXT: }
// RUN: ld.lld -pie --pack-dyn-relocs=relr %t.a32.o %t.a32.so -o %t4.a32
-// RUN: llvm-readobj -S --dynamic-table %t4.a32 | FileCheck --check-prefix=RELR32-HEADERS %s
-// RUN: llvm-readobj -r --raw-relr %t4.a32 | FileCheck --check-prefix=RAW-RELR32 %s
-// RUN: llvm-readobj -r %t4.a32 | FileCheck --check-prefix=RELR32 %s
-
-// RELR32-HEADERS: Index: 1
-// RELR32-HEADERS-NEXT: Name: .dynsym
-
-// RELR32-HEADERS: Name: .relr.dyn
-// RELR32-HEADERS-NEXT: Type: SHT_RELR
-// RELR32-HEADERS-NEXT: Flags [ (0x2)
-// RELR32-HEADERS-NEXT: SHF_ALLOC (0x2)
-// RELR32-HEADERS-NEXT: ]
-// RELR32-HEADERS-NEXT: Address: [[ADDR:.*]]
-// RELR32-HEADERS-NEXT: Offset: [[ADDR]]
-// RELR32-HEADERS-NEXT: Size: 8
-// RELR32-HEADERS-NEXT: Link: 0
-// RELR32-HEADERS-NEXT: Info: 0
-// RELR32-HEADERS-NEXT: AddressAlignment: 4
-// RELR32-HEADERS-NEXT: EntrySize: 4
-
-// RELR32-HEADERS: 0x00000024 RELR [[ADDR]]
-// RELR32-HEADERS: 0x00000023 RELRSZ 8 (bytes)
-// RELR32-HEADERS: 0x00000025 RELRENT 4 (bytes)
-
-/// SHT_RELR section contains address/bitmap entries
-/// encoding the offsets for relative relocation.
-// RAW-RELR32: Section ({{.+}}) .relr.dyn {
-// RAW-RELR32-NEXT: 0x30284
-// RAW-RELR32-NEXT: 0x7FCFEFF
-// RAW-RELR32-NEXT: }
+// RUN: llvm-readelf -Sdr %t4.a32 | FileCheck --check-prefix=RELR32 %s
-/// Decoded SHT_RELR section is same as UNPACKED,
-/// but contains only the relative relocations.
-/// Any relative relocations with odd offset stay in SHT_REL.
-// RELR32: Section ({{.+}}) .rel.dyn {
-// RELR32-NEXT: 0x302F1 R_ARM_RELATIVE -
-// RELR32-NEXT: 0x302A4 R_ARM_ABS32 bar2
-// RELR32-NEXT: 0x302C8 R_ARM_ABS32 bar2
-// RELR32-NEXT: 0x302F5 R_ARM_ABS32 bar2
-// RELR32-NEXT: 0x302F9 R_ARM_ABS32 bar2
-// RELR32-NEXT: 0x302FD R_ARM_ABS32 bar2
-// RELR32-NEXT: 0x30301 R_ARM_ABS32 bar2
-// RELR32-NEXT: 0x30305 R_ARM_ABS32 bar2
-// RELR32-NEXT: 0x302C4 R_ARM_ABS32 zed2
-// RELR32-NEXT: }
-// RELR32-NEXT: Section ({{.+}}) .relr.dyn {
-// RELR32-NEXT: 0x30284 R_ARM_RELATIVE -
-// RELR32-NEXT: 0x30288 R_ARM_RELATIVE -
-// RELR32-NEXT: 0x3028C R_ARM_RELATIVE -
-// RELR32-NEXT: 0x30290 R_ARM_RELATIVE -
-// RELR32-NEXT: 0x30294 R_ARM_RELATIVE -
-// RELR32-NEXT: 0x30298 R_ARM_RELATIVE -
-// RELR32-NEXT: 0x3029C R_ARM_RELATIVE -
-// RELR32-NEXT: 0x302A0 R_ARM_RELATIVE -
-
-// RELR32-NEXT: 0x302A8 R_ARM_RELATIVE -
-// RELR32-NEXT: 0x302AC R_ARM_RELATIVE -
-// RELR32-NEXT: 0x302B0 R_ARM_RELATIVE -
-// RELR32-NEXT: 0x302B4 R_ARM_RELATIVE -
-// RELR32-NEXT: 0x302B8 R_ARM_RELATIVE -
-// RELR32-NEXT: 0x302BC R_ARM_RELATIVE -
-// RELR32-NEXT: 0x302C0 R_ARM_RELATIVE -
-
-// RELR32-NEXT: 0x302CC R_ARM_RELATIVE -
-// RELR32-NEXT: 0x302D0 R_ARM_RELATIVE -
-// RELR32-NEXT: 0x302D4 R_ARM_RELATIVE -
-// RELR32-NEXT: 0x302D8 R_ARM_RELATIVE -
-// RELR32-NEXT: 0x302DC R_ARM_RELATIVE -
-// RELR32-NEXT: 0x302E0 R_ARM_RELATIVE -
-// RELR32-NEXT: 0x302E4 R_ARM_RELATIVE -
-// RELR32-NEXT: 0x302E8 R_ARM_RELATIVE -
-// RELR32-NEXT: 0x302EC R_ARM_RELATIVE -
-// RELR32-NEXT: }
+// RELR32: Name Type Address Off Size ES Flg Lk Inf Al
+// RELR32: .dynstr STRTAB {{.*}} 00 A 0 0 1
+// RELR32-NEXT: .rel.dyn REL {{.*}} 08 A 1 0 4
+// RELR32-NEXT: .relr.dyn RELR {{0*}}[[#%x,RELR:]] {{.*}} 04 A 0 0 4
+
+// RELR32: (RELCOUNT) 1
+// RELR32: (RELR) 0x[[#RELR]]
+// RELR32-NEXT: (RELRSZ) 8 (bytes)
+// RELR32-NEXT: (RELRENT) 4 (bytes)
+
+// RELR32: Relocation section '.relr.dyn' at offset {{.*}} contains 24 entries:
+// RELR32-NEXT: Index: Entry Address Symbolic Address
+// RELR32-NEXT: 0000: 00030284 {{.*}}
+// RELR32-NEXT: 0001: 07fcfeff {{.*}}
// RUN: llvm-mc -filetype=obj -triple=aarch64-unknown-linux %p/Inputs/shared2.s -o %t.a64.so.o
// RUN: ld.lld -shared %t.a64.so.o -soname=so -o %t.a64.so
@@ -292,7 +235,6 @@
// RUN: ld.lld -pie --pack-dyn-relocs=relr %t.a64.o %t.a64.so -o %t4.a64
// 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
// RELR64: Name Type Address Off Size ES Flg Lk Inf Al
// RELR64: .dynstr STRTAB {{.*}} 00 A 0 0 1
@@ -305,13 +247,6 @@
// RELR64-NEXT: (RELRSZ) 16 (bytes)
// RELR64-NEXT: (RELRENT) 8 (bytes)
-/// SHT_RELR section contains address/bitmap entries
-/// encoding the offsets for relative relocation.
-// RAW-RELR64: Section ({{.+}}) .relr.dyn {
-// RAW-RELR64-NEXT: 0x30490
-// RAW-RELR64-NEXT: 0x7FCFEFF
-// RAW-RELR64-NEXT: }
-
/// Decoded SHT_RELR section is same as UNPACKED,
/// but contains only the relative relocations.
/// Any relative relocations with odd offset stay in SHT_RELA.
More information about the llvm-commits
mailing list