[PATCH] D92598: [lld][test] Handle long build path
Thomas Preud'homme via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Thu Dec 3 12:16:12 PST 2020
thopre created this revision.
thopre added reviewers: shenhan, espindola, ruiu, pcc.
Herald added a subscriber: emaste.
thopre requested review of this revision.
Herald added a subscriber: MaskRay.
Herald added a project: LLVM.
LLD test ELF/copy-relocation-zero-nonabs-addr.s fails when the build
path is too long. This is because the DT_NEEDED entry for the shared
library containing object foo encodes the full path to the library. When
the path gets too big, it pushes the beginning of .bss.rel.ro beyond the
expected address of the test and thus the section gets aligned to the
next suitable address.
Since the point of the test is to check the alignment of foo, this
commit changes the check to only look at the 10 least significant bit of
the address.
Repository:
rG LLVM Github Monorepo
https://reviews.llvm.org/D92598
Files:
lld/test/ELF/copy-relocation-zero-nonabs-addr.s
Index: lld/test/ELF/copy-relocation-zero-nonabs-addr.s
===================================================================
--- lld/test/ELF/copy-relocation-zero-nonabs-addr.s
+++ lld/test/ELF/copy-relocation-zero-nonabs-addr.s
@@ -21,9 +21,10 @@
// CHECKSO-NEXT: Section: .text
// When foo has st_value == 0, it carries the section alignment.
-// In this case, section alignment is 2^10, 0x202400 meets the requirement.
+// In this case, section alignment is 2^10, an address ending in 000, 400, 800
+// or C00 meets the requirement.
// CHECK: Name: foo
-// CHECK-NEXT: Value: 0x202400
+// CHECK-NEXT: Value: 0x{{[0-9A-F]+[048C]}}00
// CHECK-NEXT: Size: 4
// CHECK-NEXT: Binding: Global
// CHECK-NEXT: Type: Object
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D92598.309332.patch
Type: text/x-patch
Size: 728 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20201203/652a935b/attachment.bin>
More information about the llvm-commits
mailing list