3 ## --no-leading-lines needed for .tbd files.
4 # RUN: rm -rf %t; split-file --no-leading-lines %s %t
6 # RUN: llvm-mc -filetype=obj -triple=x86_64-apple-darwin %t/main.s -o %t/main.o
7 # RUN: %lld -o %t/main -L%t -lFoo -lBar -lSystem %t/main.o
8 # RUN: llvm-objdump --lazy-bind -d --no-show-raw-insn %t/main | FileCheck %s
10 # CHECK: callq 0x[[#%x,FOO_OFF:]]
11 # CHECK-NEXT: callq 0x[[#%x,BAR_OFF:]]
13 # CHECK: [[#%x,BAR_OFF]]: jmpq {{.*}} ## 0x[[#%x,BAR_BIND:]]
14 # CHECK: [[#%x,FOO_OFF]]: jmpq {{.*}} ## 0x[[#%x,FOO_BIND:]]
16 # CHECK-LABEL: Lazy bind table:
17 # CHECK-DAG: __DATA __la_symbol_ptr 0x[[#%x,FOO_BIND]] Foo _foo
18 # CHECK-DAG: __DATA __la_symbol_ptr 0x[[#%x,BAR_BIND]] Foo _bar
20 # RUN: llvm-nm -m %t/main | FileCheck --check-prefix=NM %s
22 # NM-DAG: _bar (from Foo)
23 # NM-DAG: _foo (from Foo)
25 # RUN: llvm-otool -L %t/main | FileCheck %s --check-prefix=LOAD
33 targets
: [ x86_64-macos
]
35 - target
: x86_64-macos
36 value
: 00000000-0000-0000-0000-000000000000
37 install-name
: 'Foo.dylib'
38 current-version
: 0001.001.1
40 - targets
: [ x86_64-macos
]
47 targets
: [ x86_64-macos
]
49 - target
: x86_64-macos
50 value
: 00000000-0000-0000-0000-000000000000
51 ## Also uses Foo.dylib as install-name!
52 ## Normally, this would happen conditionally via an $ld$ symbol.
53 install-name
: 'Foo.dylib'
54 current-version
: 0001.001.1
56 - targets
: [ x86_64-macos
]
61 .section __TEXT,__text
62 .globl _main, _foo, _bar