brintos

brintos / llvm-project-archived public Read only

0
0
Text · 3.4 KiB · f4689f5 Raw
94 lines · plain
1# REQUIRES: x862 3# RUN: rm -rf %t; split-file --no-leading-lines %s %t4# RUN: llvm-mc -filetype=obj -triple=x86_64-apple-darwin %t/ref-all.s -o %t/ref-all.o5# RUN: llvm-mc -filetype=obj -triple=x86_64-apple-darwin %t/ref-reexported.s -o %t/ref-reexported.o6 7## Check that the hidden symbols(foo11) can't be referenced from HideFoo.tbd when current version is 11.8# RUN: not %lld -o /dev/null %t/libHideFoo.tbd %t/ref-all.o -dylib -platform_version macos 11.0.0 11.0.0 2>&1 | FileCheck %s --check-prefix=ERROR9 10## Check that the hidden symbol(foo11) can be referenced when the current version is NOT 11.11# RUN: %lld -o %t/ref-foo-12.dylib %t/libHideFoo.tbd %t/ref-all.o -dylib -platform_version macos 12.0.0 12.0.012# RUN: llvm-objdump --macho --bind %t/ref-foo-12.dylib | FileCheck %s --check-prefix=HAS-FOO13 14## Check that when we link multiple tbd files, foo11 comes from the tbd where it is visible.15# RUN: %lld -o %t/ref-all.dylib %t/libHideFoo.tbd %t/libHasFoo.tbd %t/ref-all.o -dylib -platform_version macos 11.0.0 11.0.016# RUN: llvm-objdump --macho --bind %t/ref-all.dylib | FileCheck %s --check-prefix=FOO17 18## Check that '$hide$' has no effect on reexported symbols.19# RUN: %lld -o %t/reexport.dylib %t/libReexportSystem2.tbd %t/ref-reexported.o -dylib -platform_version macos 11.0.0 11.0.020# RUN: llvm-objdump --macho --bind %t/reexport.dylib | FileCheck %s --check-prefix=REEXP21 22# ERROR:  error: undefined symbol: _OBJC_CLASS_$_foo1123 24# HAS-FOO: __DATA __data              {{.*}} pointer         0 /HideFoo         _OBJC_CLASS_$_foo1125 26# FOO:      segment  section            address    type       addend dylib            symbol27# FOO-DAG: __DATA   __data               {{.*}} pointer         0 /HideFoo         _OBJC_CLASS_$_bar28# FOO-DAG: __DATA   __data               {{.*}} pointer         0 /HideFoo         _OBJC_CLASS_$_foo1029# FOO-DAG: __DATA   __data               {{.*}} pointer         0 /HasFoo          _OBJC_CLASS_$_foo1130# FOO-DAG: __DATA   __data               {{.*}} pointer         0 /HideFoo         _xxx31 32# REEXP: __DATA   __data             {{.*}} pointer         0 libSystem        ___nan33 34#--- ref-all.s35.data36.quad	_xxx37.quad _OBJC_CLASS_$_foo1138.quad _OBJC_CLASS_$_foo1039.quad _OBJC_CLASS_$_bar40 41#--- ref-reexported.s42.data43.quad   ___nan44 45#--- libHideFoo.tbd46--- !tapi-tbd47tbd-version: 448targets: [ x86_64-macos ]49uuids:50  - target: x86_64-macos51    value:  2E994C7F-3F03-3A07-879C-55690D22BEDA52install-name: '/HideFoo'53current-version: 954compatibility-version: 4.5.655exports:56  - targets:         [ x86_64-macos ]57    symbols: [ '$ld$hide$os11.0$_OBJC_CLASS_$_foo11', '$ld$hide$os10.0$_OBJC_CLASS_$_foo10',  _xxx ]58    objc-classes: [foo10, foo11, bar]59...60 61#--- libHasFoo.tbd62--- !tapi-tbd63tbd-version: 464targets: [ x86_64-macos ]65uuids:66  - target: x86_64-macos67    value:  2E994C7F-3F03-3A07-879C-55690D22BEDB68install-name: '/HasFoo'69current-version: 970compatibility-version: 4.5.671exports:72  - targets: [ x86_64-macos ]73    symbols: [  _xxx ]74    objc-classes: [foo10, foo11, bar]75...76 77#--- libReexportSystem2.tbd78--- !tapi-tbd79tbd-version:     480targets: [ x86_64-macos ]81uuids:82  - target:  x86_64-macos83    value:   00000000-0000-0000-0000-00000000000284install-name:    '/libReexportSystem2'85current-version: 986exports:87  - targets: [ x86_64-macos ]88    symbols: [  '$ld$hide$___nan' ]89reexported-libraries:90  - targets:   [ x86_64-macos ]91    libraries: [ '/usr/lib/libSystem.dylib' ]92...93 94