]> CyberLeo.Net >> Repos - FreeBSD/FreeBSD.git/blob - test/mach-o/use-dylib.yaml
Vendor import of lld trunk r338150:
[FreeBSD/FreeBSD.git] / test / mach-o / use-dylib.yaml
1 # RUN: ld64.lld -arch x86_64 %s \
2 # RUN: %p/Inputs/use-simple-dylib.yaml %p/Inputs/x86_64/libSystem.yaml -dylib -o %t.dylib
3 # RUN: llvm-objdump -private-headers %t.dylib | FileCheck %s
4
5 # This test ensures that we have a LC_LOAD_DYLIB for libspecial.dylib even though we don't
6 # use any atoms from it.  This matches the ld64 behaviour.
7 --- !mach-o
8 arch:            x86_64
9 file-type:       MH_OBJECT
10 flags:           [  ]
11 has-UUID:        false
12 OS:              unknown
13 sections:
14   - segment:         __TEXT
15     section:         __text
16     type:            S_REGULAR
17     attributes:      [ S_ATTR_PURE_INSTRUCTIONS ]
18     address:         0x0000000000000000
19     content:         [ 0x55, 0x48, 0x89, 0xE5, 0xE8, 0x00, 0x00, 0x00,
20                        0x00, 0xE8, 0x00, 0x00, 0x00, 0x00, 0xE8, 0x00,
21                        0x00, 0x00, 0x00, 0xE8, 0x00, 0x00, 0x00, 0x00,
22                        0xE8, 0x00, 0x00, 0x00, 0x00, 0x5D, 0xE9, 0x00,
23                        0x00, 0x00, 0x00 ]
24 global-symbols:
25   - name:            _foo
26     type:            N_SECT
27     scope:           [ N_EXT ]
28     sect:            1
29     value:           0x0000000000000000
30
31
32 # CHECK:           cmd LC_LOAD_DYLIB
33 # CHECK:          name libspecial.dylib (offset 24)
34 # CHECK:       current version 1.0.0
35 # CHECK: compatibility version 1.0.0
36 # CHECK:           cmd LC_LOAD_DYLIB
37 # CHECK:          name /usr/lib/libSystem.B.dylib (offset 24)
38 # CHECK:       current version 1.0.0
39 # CHECK: compatibility version 1.0.0