2020-08-19 06:46:21 +08:00
|
|
|
# REQUIRES: x86
|
|
|
|
# RUN: mkdir -p %t
|
|
|
|
|
|
|
|
## This test verifies that a non-TBD dylib can re-export a TBD library.
|
|
|
|
|
|
|
|
# RUN: echo "" | llvm-mc -filetype=obj -triple=x86_64-apple-darwin -o %t/reexporter.o
|
2020-09-19 12:40:12 +08:00
|
|
|
# RUN: %lld -dylib -lc++ -sub_library libc++ \
|
2020-08-19 06:46:21 +08:00
|
|
|
# RUN: %t/reexporter.o -o %t/libreexporter.dylib
|
|
|
|
# RUN: llvm-objdump --macho --all-headers %t/libreexporter.dylib | FileCheck %s --check-prefix=DYLIB-HEADERS
|
|
|
|
# DYLIB-HEADERS: cmd LC_REEXPORT_DYLIB
|
|
|
|
# DYLIB-HEADERS-NOT: Load command
|
|
|
|
# DYLIB-HEADERS: name /usr/lib/libc++.dylib
|
2020-08-14 04:48:47 +08:00
|
|
|
|
|
|
|
# RUN: llvm-mc -filetype obj -triple x86_64-apple-darwin %s -o %t/test.o
|
2020-09-19 12:40:12 +08:00
|
|
|
# RUN: %lld -o %t/test -lSystem -L%t -lreexporter %t/test.o
|
2020-08-14 04:48:47 +08:00
|
|
|
# RUN: llvm-objdump --bind --no-show-raw-insn -d %t/test | FileCheck %s
|
|
|
|
|
2020-12-10 07:08:05 +08:00
|
|
|
# CHECK: Bind table:
|
|
|
|
# CHECK-DAG: __DATA __data {{.*}} pointer 0 libc++abi ___gxx_personality_v0
|
2020-08-14 04:48:47 +08:00
|
|
|
|
|
|
|
.text
|
|
|
|
.globl _main
|
|
|
|
|
|
|
|
_main:
|
|
|
|
ret
|
|
|
|
|
|
|
|
.data
|
|
|
|
.quad ___gxx_personality_v0
|