llvm-project
48 строк · 1.7 Кб
1# REQUIRES: aarch64
2# RUN: rm -rf %t; split-file %s %t
3# RUN: ln -s Versions/A/FrameworkPublic.tbd %t/System/Library/Frameworks/FrameworkPublic.framework/
4# RUN: ln -s Versions/A/FrameworkPrivate.tbd %t/System/Library/Frameworks/FrameworkPrivate.framework/
5# RUN: llvm-mc -filetype obj -triple arm64-apple-macos11.0 %t/test.s -o %t/test.o
6# RUN: %lld -arch arm64 -platform_version macos 11.0 11.0 -o %t/test -syslibroot %t -framework FrameworkPublic %t/test.o
7
8# RUN: llvm-objdump --bind --no-show-raw-insn -d %t/test | FileCheck %s
9# CHECK: Bind table:
10# CHECK-DAG: __DATA __data {{.*}} pointer 0 FrameworkPublic _funcPublic
11# CHECK-DAG: __DATA __data {{.*}} pointer 0 FrameworkPublic _funcPrivate
12
13#--- System/Library/Frameworks/FrameworkPublic.framework/Versions/A/FrameworkPublic.tbd
14--- !tapi-tbd
15tbd-version: 4
16targets: [ arm64-macos ]
17install-name: '/System/Library/Frameworks/FrameworkPublic.framework/Versions/A/FrameworkPublic'
18current-version: 1.0.0
19reexported-libraries:
20- targets: [ arm64-macos ]
21libraries: [ '/System/Library/Frameworks/FrameworkPrivate.framework/Versions/A/FrameworkPrivate' ]
22exports:
23- targets: [ arm64-macos ]
24symbols: [ '_funcPublic' ]
25...
26#--- System/Library/Frameworks/FrameworkPrivate.framework/Versions/A/FrameworkPrivate.tbd
27--- !tapi-tbd
28tbd-version: 4
29targets: [ arm64-macos ]
30install-name: '/System/Library/Frameworks/FrameworkPrivate.framework/Versions/A/FrameworkPrivate'
31current-version: 1.0.0
32allowable-clients:
33- targets: [ arm64-macos ]
34clients: [ FrameworkPublic ]
35exports:
36- targets: [ arm64-macos ]
37symbols: [ '_funcPrivate' ]
38...
39#--- test.s
40.text
41.globl _main
42
43_main:
44ret
45
46.data
47.quad _funcPublic
48.quad _funcPrivate
49