[PATCH] D141024: [lld-macho][test] Simplify classrefs test
Jez Ng via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Thu Jan 5 10:30:45 PST 2023
This revision was automatically updated to reflect the committed changes.
Closed by commit rG4228ab009fa7: [lld-macho][test] Simplify classrefs test (authored by int3).
Changed prior to commit:
https://reviews.llvm.org/D141024?vs=486452&id=486626#toc
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D141024/new/
https://reviews.llvm.org/D141024
Files:
lld/test/MachO/objc-classrefs-dedup.s
Index: lld/test/MachO/objc-classrefs-dedup.s
===================================================================
--- lld/test/MachO/objc-classrefs-dedup.s
+++ lld/test/MachO/objc-classrefs-dedup.s
@@ -5,19 +5,15 @@
# RUN: llvm-mc -filetype=obj -triple=x86_64-apple-darwin %t/refs2.s -o %t/refs2.o
# RUN: %lld -lSystem -dylib %t/defs.o -o %t/libdefs.dylib
# RUN: %lld -lSystem -dylib --icf=all %t/refs1.o %t/refs2.o %t/libdefs.dylib -o %t/out
-# RUN: llvm-objdump --macho --section-headers --bind %t/out | FileCheck %s \
-# RUN: --implicit-check-not __objc_classrefs
-
-## Check that we only have 3 (unique) entries
-# CHECK: Sections:
-# CHECK-NEXT: Idx Name Size
-# CHECK: __objc_classrefs 00000018
-
-## And only two binds
-# CHECK: Bind table:
-# CHECK-NEXT: segment section address type addend dylib symbol
-# CHECK-DAG: __DATA __objc_classrefs {{.*}} pointer 0 libdefs _OBJC_CLASS_$_Bar
-# CHECK-DAG: __DATA __objc_classrefs {{.*}} pointer 0 libdefs _OBJC_CLASS_$_Foo
+# RUN: llvm-otool -o %t/out | FileCheck %s
+
+## Check that we only have 3 (unique) entries, of which two are bound at runtime
+## (i.e. they are entries that have a static value of 0x0).
+# CHECK: Contents of (__DATA,__objc_classrefs) section
+# CHECK-NEXT: 0000000000001008 0x0 _OBJC_CLASS_$_Foo
+# CHECK-NEXT: 0000000000001010 0x0 _OBJC_CLASS_$_Bar
+# CHECK-NEXT: 0000000000001018 0x1000 _OBJC_CLASS_$_Baz
+# CHECK-EMPTY:
#--- defs.s
.globl _OBJC_CLASS_$_Foo, _OBJC_CLASS_$_Bar
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D141024.486626.patch
Type: text/x-patch
Size: 1559 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20230105/abc6b03f/attachment.bin>
More information about the llvm-commits
mailing list