[PATCH] D120939: [lld-macho][nfc] Decouple tapi-link.s test from libSystem
Jez Ng via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Thu Mar 3 16:49:16 PST 2022
This revision was automatically updated to reflect the committed changes.
Closed by commit rG070af48d1371: [lld-macho][nfc] Decouple tapi-link.s test from libSystem (authored by int3).
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D120939/new/
https://reviews.llvm.org/D120939
Files:
lld/test/MachO/Inputs/libReexportSystem.tbd
lld/test/MachO/tapi-link.s
Index: lld/test/MachO/tapi-link.s
===================================================================
--- lld/test/MachO/tapi-link.s
+++ lld/test/MachO/tapi-link.s
@@ -7,17 +7,13 @@
# RUN: %lld -o %t/test -lSystem -lc++ -framework CoreFoundation %t/libNested.tbd %t/test.o
# RUN: llvm-objdump --bind --no-show-raw-insn -d -r %t/test | FileCheck %s
-## libReexportSystem.tbd tests that we can reference symbols from a dylib,
-## re-exported by a top-level tapi document, which itself is re-exported by
-## another top-level tapi document.
-# RUN: %lld -o %t/with-reexport %S/Inputs/libReexportSystem.tbd -lc++ -framework CoreFoundation %t/libNested.tbd %t/test.o
+## libReexportSystem.tbd tests that we can reference symbols from a 2nd-level
+## tapi document, re-exported by a top-level tapi document, which itself is
+## re-exported by another top-level tapi document.
+# RUN: %lld -o %t/with-reexport -lSystem -L%t %t/libReexportNested.tbd -lc++ -framework CoreFoundation %t/test.o
# RUN: llvm-objdump --bind --no-show-raw-insn -d -r %t/with-reexport | FileCheck %s
-# CHECK: Disassembly of section __TEXT,__text:
-# CHECK: movq {{.*}} ## 0x[[ADDR:[0-9a-f]+]]
-
# CHECK: Bind table:
-# CHECK-DAG: __DATA_CONST __got 0x[[ADDR]] pointer 0 libSystem ___nan
# CHECK-DAG: __DATA __data {{.*}} pointer 0 CoreFoundation _OBJC_CLASS_$_NSObject
# CHECK-DAG: __DATA __data {{.*}} pointer 0 CoreFoundation _OBJC_METACLASS_$_NSObject
# CHECK-DAG: __DATA __data {{.*}} pointer 0 CoreFoundation _OBJC_IVAR_$_NSConstantArray._count
@@ -28,14 +24,7 @@
# RUN: llvm-otool -l %t/test | FileCheck --check-prefix=LOAD %s
# RUN: llvm-otool -l %t/with-reexport | \
-# RUN: FileCheck --check-prefixes=LOAD-REEXPORT,LOAD %s
-
-# LOAD-REEXPORT: cmd LC_LOAD_DYLIB
-# LOAD-REEXPORT-NEXT: cmdsize
-# LOAD-REEXPORT-NEXT: name /usr/lib/libReexportSystem.dylib
-# LOAD-REEXPORT-NEXT: time stamp
-# LOAD-REEXPORT-NEXT: current version 1.0.0
-# LOAD-REEXPORT-NEXT: compatibility version
+# RUN: FileCheck --check-prefixes=LOAD,LOAD-REEXPORT %s
# LOAD: cmd LC_LOAD_DYLIB
# LOAD-NEXT: cmdsize
@@ -44,13 +33,18 @@
# LOAD-NEXT: current version 1.1.1
# LOAD-NEXT: compatibility version
+# LOAD-REEXPORT: cmd LC_LOAD_DYLIB
+# LOAD-REEXPORT-NEXT: cmdsize
+# LOAD-REEXPORT-NEXT: name /usr/lib/libReexportNested.dylib
+# LOAD-REEXPORT-NEXT: time stamp
+# LOAD-REEXPORT-NEXT: current version 1.0.0
+# LOAD-REEXPORT-NEXT: compatibility version
+
#--- test.s
.section __TEXT,__text
.global _main
_main:
-## This symbol is defined in an inner TAPI document within libSystem.tbd.
- movq ___nan at GOTPCREL(%rip), %rax
ret
.data
@@ -58,6 +52,7 @@
.quad _OBJC_METACLASS_$_NSObject
.quad _OBJC_IVAR_$_NSConstantArray._count
.quad _OBJC_EHTYPE_$_NSException
+## This symbol is defined in an inner TAPI document within libNested.tbd.
.quad _deeply_nested
## This symbol is defined in libc++abi.tbd, but we are linking test.o against
@@ -94,3 +89,14 @@
- archs: [ x86_64 ]
symbols: [ _deeply_nested ]
...
+
+#--- libReexportNested.tbd
+--- !tapi-tbd-v3
+archs: [ i386, x86_64 ]
+uuids: [ 'i386: 00000000-0000-0000-0000-000000000000', 'x86_64: 00000000-0000-0000-0000-000000000001' ]
+platform: macosx
+install-name: '/usr/lib/libReexportNested.dylib'
+exports:
+ - archs: [ i386, x86_64 ]
+ re-exports: [ 'libNested.dylib' ]
+...
Index: lld/test/MachO/Inputs/libReexportSystem.tbd
===================================================================
--- lld/test/MachO/Inputs/libReexportSystem.tbd
+++ /dev/null
@@ -1,9 +0,0 @@
---- !tapi-tbd-v3
-archs: [ i386, x86_64 ]
-uuids: [ 'i386: 00000000-0000-0000-0000-000000000000', 'x86_64: 00000000-0000-0000-0000-000000000001' ]
-platform: macosx
-install-name: '/usr/lib/libReexportSystem.dylib'
-exports:
- - archs: [ i386, x86_64 ]
- re-exports: [ '/usr/lib/libSystem.dylib' ]
-...
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D120939.412867.patch
Type: text/x-patch
Size: 4081 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20220304/21b4f7f0/attachment.bin>
More information about the llvm-commits
mailing list