[PATCH] D120940: [lld-macho][nfc] Avoid using absolute addresses in cgprofile-icf.s

Jez Ng via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Thu Mar 3 14:06:44 PST 2022


int3 created this revision.
int3 added reviewers: lld-macho, lgrey.
Herald added projects: lld-macho, All.
int3 requested review of this revision.
Herald added a project: LLVM.
Herald added a subscriber: llvm-commits.

If we fix https://github.com/llvm/llvm-project/issues/54184, the
`dyld_stub_binder` symbol will get included in every output dylib. This
would cause the addresses of the other symbols to shift, breaking the
test as it currently stands. Let's make the test more flexible.


Repository:
  rG LLVM Github Monorepo

https://reviews.llvm.org/D120940

Files:
  lld/test/MachO/cgprofile-icf.s


Index: lld/test/MachO/cgprofile-icf.s
===================================================================
--- lld/test/MachO/cgprofile-icf.s
+++ lld/test/MachO/cgprofile-icf.s
@@ -34,13 +34,12 @@
 
 .subsections_via_symbols
 
-# CHECK:      0000000100000290 T A
-# CHECK-NEXT: 0000000100000298 T C
-# CHECK-NEXT: 0000000100000298 T D
-# CHECK-NEXT: 00000001000002a0 T B
-
-# NOICF:      0000000100000290 T A
-# NOICF-NEXT: 0000000100000298 T B
-# NOICF-NEXT: 00000001000002a0 T C
-# NOICF-NEXT: 00000001000002a8 T D
-
+# CHECK:      [[#%.16x,A:]]   T A
+# CHECK-NEXT: [[#%.16x,A+8]]  T C
+# CHECK-NEXT: [[#%.16x,A+8]]  T D
+# CHECK-NEXT: [[#%.16x,A+16]] T B
+
+# NOICF:      [[#%.16x,A:]]   T A
+# NOICF-NEXT: [[#%.16x,A+8]]  T B
+# NOICF-NEXT: [[#%.16x,A+16]] T C
+# NOICF-NEXT: [[#%.16x,A+24]] T D


-------------- next part --------------
A non-text attachment was scrubbed...
Name: D120940.412836.patch
Type: text/x-patch
Size: 800 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20220303/0a6624bc/attachment.bin>


More information about the llvm-commits mailing list