From: Jez Ng Date: Thu, 3 Mar 2022 23:58:08 +0000 (-0500) Subject: [lld-macho][nfc] Avoid using absolute addresses in cgprofile-icf.s X-Git-Tag: upstream/15.0.7~14665 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=f7547558c9f1b27d2fbc282ddd78e051b238db17;p=platform%2Fupstream%2Fllvm.git [lld-macho][nfc] Avoid using absolute addresses in cgprofile-icf.s 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. Reviewed By: lgrey Differential Revision: https://reviews.llvm.org/D120940 --- diff --git a/lld/test/MachO/cgprofile-icf.s b/lld/test/MachO/cgprofile-icf.s index 3d34b93..f9034ee 100644 --- a/lld/test/MachO/cgprofile-icf.s +++ b/lld/test/MachO/cgprofile-icf.s @@ -34,13 +34,12 @@ A: .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