aboutsummaryrefslogtreecommitdiff
path: root/lld/test/mach-o/use-dylib.yaml
blob: 7436e180c29fa6949c6c3b19f51612caf26fed01 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
# RUN: ld64.lld -arch x86_64 %s \
# RUN: %p/Inputs/use-simple-dylib.yaml %p/Inputs/x86_64/libSystem.yaml -dylib -o %t.dylib
# RUN: llvm-objdump --private-headers %t.dylib | FileCheck %s

# This test ensures that we have a LC_LOAD_DYLIB for libspecial.dylib even though we don't
# use any atoms from it.  This matches the ld64 behaviour.
--- !mach-o
arch:            x86_64
file-type:       MH_OBJECT
flags:           [  ]
has-UUID:        false
OS:              unknown
sections:
  - segment:         __TEXT
    section:         __text
    type:            S_REGULAR
    attributes:      [ S_ATTR_PURE_INSTRUCTIONS ]
    address:         0x0000000000000000
    content:         [ 0x55, 0x48, 0x89, 0xE5, 0xE8, 0x00, 0x00, 0x00,
                       0x00, 0xE8, 0x00, 0x00, 0x00, 0x00, 0xE8, 0x00,
                       0x00, 0x00, 0x00, 0xE8, 0x00, 0x00, 0x00, 0x00,
                       0xE8, 0x00, 0x00, 0x00, 0x00, 0x5D, 0xE9, 0x00,
                       0x00, 0x00, 0x00 ]
global-symbols:
  - name:            _foo
    type:            N_SECT
    scope:           [ N_EXT ]
    sect:            1
    value:           0x0000000000000000


# CHECK:           cmd LC_LOAD_DYLIB
# CHECK:          name libspecial.dylib (offset 24)
# CHECK:       current version 1.0.0
# CHECK: compatibility version 1.0.0
# CHECK:           cmd LC_LOAD_DYLIB
# CHECK:          name /usr/lib/libSystem.B.dylib (offset 24)
# CHECK:       current version 1.0.0
# CHECK: compatibility version 1.0.0