[PATCH] D111071: [ELF][test] Enhance relative dynamic relocation tests
Andrew Ng via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Tue Oct 5 03:35:55 PDT 2021
This revision was automatically updated to reflect the committed changes.
Closed by commit rG3334b9d70bc8: [ELF][test] Enhance relative dynamic relocation tests (authored by andrewng).
Herald added a project: LLVM.
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D111071/new/
https://reviews.llvm.org/D111071
Files:
lld/test/ELF/relative-dynamic-reloc-pie.s
lld/test/ELF/relative-dynamic-reloc.s
Index: lld/test/ELF/relative-dynamic-reloc.s
===================================================================
--- lld/test/ELF/relative-dynamic-reloc.s
+++ lld/test/ELF/relative-dynamic-reloc.s
@@ -9,11 +9,12 @@
// CHECK: Relocations [
// CHECK-NEXT: Section ({{.*}}) .rela.dyn {
// CHECK-NEXT: 0x[[FOO_ADDR:.*]] R_X86_64_RELATIVE - 0x[[FOO_ADDR]]
-// CHECK-NEXT: 0x[[BAR_ADDR:.*]] R_X86_64_RELATIVE - 0x[[BAR_ADDR]]
-// CHECK-NEXT: 0x{{[0-9A-F]+}} R_X86_64_RELATIVE - 0x{{[0-9A-F]+}}
-// CHECK-NEXT: 0x{{.*}} R_X86_64_RELATIVE - 0x[[ZED_ADDR:.*]]
-// CHECK-NEXT: 0x{{.*}} R_X86_64_RELATIVE - 0x[[FOO_ADDR]]
-// CHECK-NEXT: 0x{{[0-9A-F]+}} R_X86_64_64 external 0x0
+// CHECK-NEXT: 0x[[#%X,BAR_ADDR:]] R_X86_64_RELATIVE
+// CHECK-SAME: - 0x[[#BAR_ADDR]]
+// CHECK-NEXT: 0x[[#BAR_ADDR + 8]] R_X86_64_RELATIVE - 0x[[#BAR_ADDR + 1]]
+// CHECK-NEXT: 0x[[#BAR_ADDR + 16]] R_X86_64_RELATIVE - 0x[[ZED_ADDR:.*]]
+// CHECK-NEXT: 0x[[#BAR_ADDR + 24]] R_X86_64_RELATIVE - 0x[[FOO_ADDR]]
+// CHECK-NEXT: 0x[[#BAR_ADDR + 32]] R_X86_64_64 external 0x0
// CHECK-NEXT: }
// CHECK-NEXT: ]
@@ -21,7 +22,7 @@
// CHECK: Name: foo
// CHECK-NEXT: Value: 0x[[FOO_ADDR]]
// CHECK: Name: bar
-// CHECK-NEXT: Value: 0x[[BAR_ADDR]]
+// CHECK-NEXT: Value: 0x[[#BAR_ADDR]]
// CHECK: Name: zed
// CHECK-NEXT: Value: 0x[[ZED_ADDR]]
// CHECK: ]
Index: lld/test/ELF/relative-dynamic-reloc-pie.s
===================================================================
--- lld/test/ELF/relative-dynamic-reloc-pie.s
+++ lld/test/ELF/relative-dynamic-reloc-pie.s
@@ -6,9 +6,10 @@
## Test that we create R_X86_64_RELATIVE relocations with -pie.
# CHECK: Relocations [
# CHECK-NEXT: Section ({{.*}}) .rela.dyn {
-# CHECK-NEXT: 0x3368 R_X86_64_RELATIVE - 0x3368
-# CHECK-NEXT: 0x3370 R_X86_64_RELATIVE - 0x3370
-# CHECK-NEXT: 0x3378 R_X86_64_RELATIVE - 0x3371
+# CHECK-NEXT: 0x[[FOO_ADDR:.*]] R_X86_64_RELATIVE - 0x[[FOO_ADDR]]
+# CHECK-NEXT: 0x[[#%X,BAR_ADDR:]] R_X86_64_RELATIVE
+# CHECK-SAME: - 0x[[#BAR_ADDR]]
+# CHECK-NEXT: 0x[[#BAR_ADDR + 8]] R_X86_64_RELATIVE - 0x[[#BAR_ADDR + 1]]
# CHECK-NEXT: }
# CHECK-NEXT: ]
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D111071.377144.patch
Type: text/x-patch
Size: 2233 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20211005/c773805c/attachment.bin>
More information about the llvm-commits
mailing list