|
| 1 | +# REQUIRES: aarch64, shell |
| 2 | +# RUN: rm -rf %t; split-file %s %t |
| 3 | +# RUN: ln -s Versions/A/Developer %t/Developer/Library/Frameworks/Developer.framework/ |
| 4 | +# RUN: ln -s Versions/A/DeveloperCore %t/Developer/Library/PrivateFrameworks/DeveloperCore.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 -framework Developer -F %t/Developer/Library/Frameworks -L %t/Developer/usr/lib %t/test.o |
| 7 | +# RUN: llvm-objdump --bind --no-show-raw-insn -d %t/test | FileCheck %s |
| 8 | +# CHECK: Bind table: |
| 9 | +# CHECK-DAG: __DATA __data {{.*}} pointer 0 Developer _funcPublic |
| 10 | +# CHECK-DAG: __DATA __data {{.*}} pointer 0 Developer _funcCore |
| 11 | +# CHECK-DAG: __DATA __data {{.*}} pointer 0 libDeveloperSupport _funcSupport |
| 12 | + |
| 13 | +#--- Developer/Library/Frameworks/Developer.framework/Versions/A/Developer |
| 14 | +{ |
| 15 | + "tapi_tbd_version": 5, |
| 16 | + "main_library": { |
| 17 | + "target_info": [ |
| 18 | + { |
| 19 | + "target": "arm64-macos" |
| 20 | + } |
| 21 | + ], |
| 22 | + "install_names": [ |
| 23 | + { |
| 24 | + "name": "@rpath/Developer.framework/Versions/A/Developer" |
| 25 | + } |
| 26 | + ], |
| 27 | + "rpaths": [ |
| 28 | + { |
| 29 | + "paths": [ |
| 30 | + "@loader_path/../../../../PrivateFrameworks/" |
| 31 | + ] |
| 32 | + } |
| 33 | + ], |
| 34 | + "reexported_libraries": [ |
| 35 | + { |
| 36 | + "names": [ |
| 37 | + "@rpath/DeveloperCore.framework/Versions/A/DeveloperCore" |
| 38 | + ] |
| 39 | + } |
| 40 | + ], |
| 41 | + "exported_symbols": [ |
| 42 | + { |
| 43 | + "text": { |
| 44 | + "global": ["_funcPublic"] |
| 45 | + } |
| 46 | + } |
| 47 | + ] |
| 48 | + } |
| 49 | +} |
| 50 | +#--- Developer/Library/PrivateFrameworks/DeveloperCore.framework/Versions/A/DeveloperCore |
| 51 | +{ |
| 52 | + "tapi_tbd_version": 5, |
| 53 | + "main_library": { |
| 54 | + "target_info": [ |
| 55 | + { |
| 56 | + "target": "arm64-macos" |
| 57 | + } |
| 58 | + ], |
| 59 | + "install_names": [ |
| 60 | + { |
| 61 | + "name": "@rpath/DeveloperCore.framework/Versions/A/DeveloperCore" |
| 62 | + } |
| 63 | + ], |
| 64 | + "allowable_clients": [ |
| 65 | + { |
| 66 | + "clients": ["Developer"] |
| 67 | + } |
| 68 | + ], |
| 69 | + "exported_symbols": [ |
| 70 | + { |
| 71 | + "text": { |
| 72 | + "global": ["_funcCore"] |
| 73 | + } |
| 74 | + } |
| 75 | + ] |
| 76 | + } |
| 77 | +} |
| 78 | +#--- Developer/usr/lib/libDeveloperSupport.tbd |
| 79 | +{ |
| 80 | + "tapi_tbd_version": 5, |
| 81 | + "main_library": { |
| 82 | + "target_info": [ |
| 83 | + { |
| 84 | + "target": "arm64-macos" |
| 85 | + } |
| 86 | + ], |
| 87 | + "install_names": [ |
| 88 | + { |
| 89 | + "name": "@rpath/libDeveloperSupport.dylib" |
| 90 | + } |
| 91 | + ], |
| 92 | + "reexported_libraries": [ |
| 93 | + { |
| 94 | + "names": [ |
| 95 | + "@rpath/Developer.framework/Versions/A/Developer" |
| 96 | + ] |
| 97 | + } |
| 98 | + ], |
| 99 | + "exported_symbols": [ |
| 100 | + { |
| 101 | + "text": { |
| 102 | + "global": ["_funcSupport"] |
| 103 | + } |
| 104 | + } |
| 105 | + ] |
| 106 | + } |
| 107 | +} |
| 108 | +#--- test.s |
| 109 | +.text |
| 110 | +.globl _main |
| 111 | +.linker_option "-lDeveloperSupport" |
| 112 | + |
| 113 | +_main: |
| 114 | + ret |
| 115 | + |
| 116 | +.data |
| 117 | + .quad _funcPublic |
| 118 | + .quad _funcCore |
| 119 | + .quad _funcSupport |
0 commit comments