1# RUN: ld64.lld -arch x86_64 -print_atoms -r %s \
2# RUN: %p/Inputs/use-simple-dylib.yaml -o %t | FileCheck %s
3
4
5--- !mach-o
6arch:            x86_64
7file-type:       MH_OBJECT
8flags:           [  ]
9has-UUID:        false
10OS:              unknown
11sections:
12  - segment:         __TEXT
13    section:         __text
14    type:            S_REGULAR
15    attributes:      [ S_ATTR_PURE_INSTRUCTIONS ]
16    address:         0x0000000000000000
17    content:         [ 0x55, 0x48, 0x89, 0xE5, 0xE8, 0x00, 0x00, 0x00,
18                       0x00, 0xE8, 0x00, 0x00, 0x00, 0x00, 0xE8, 0x00,
19                       0x00, 0x00, 0x00, 0xE8, 0x00, 0x00, 0x00, 0x00,
20                       0xE8, 0x00, 0x00, 0x00, 0x00, 0x5D, 0xE9, 0x00,
21                       0x00, 0x00, 0x00 ]
22global-symbols:
23  - name:            _foo
24    type:            N_SECT
25    scope:           [ N_EXT ]
26    sect:            1
27    value:           0x0000000000000000
28undefined-symbols:
29  - name:            _myGlobal
30    type:            N_UNDF
31    scope:           [ N_EXT ]
32    value:           0x0000000000000000
33  - name:            _myGlobalWeak
34    type:            N_UNDF
35    scope:           [ N_EXT ]
36    value:           0x0000000000000000
37  - name:            _myHidden
38    type:            N_UNDF
39    scope:           [ N_EXT ]
40    value:           0x0000000000000000
41  - name:            _myHiddenWeak
42    type:            N_UNDF
43    scope:           [ N_EXT ]
44    value:           0x0000000000000000
45  - name:            _myResolver
46    type:            N_UNDF
47    scope:           [ N_EXT ]
48    value:           0x0000000000000000
49  - name:            _myStatic
50    type:            N_UNDF
51    scope:           [ N_EXT ]
52    value:           0x0000000000000000
53  - name:            _myVariablePreviouslyKnownAsPrivateExtern
54    type:            N_UNDF
55    scope:           [ N_EXT ]
56    value:           0x0000000000000000
57...
58
59
60# CHECK: undefined-atoms:
61# CHECK:   - name:            _myStatic
62# CHECK:   - name:            _myVariablePreviouslyKnownAsPrivateExtern
63# CHECK: shared-library-atoms:
64# CHECK:   - name:            _myGlobal
65# CHECK:     load-name:       libspecial.dylib
66# CHECK:   - name:            _myGlobalWeak
67# CHECK:     load-name:       libspecial.dylib
68# CHECK:   - name:            _myHidden
69# CHECK:     load-name:       libspecial.dylib
70# CHECK:   - name:            _myHiddenWeak
71# CHECK:     load-name:       libspecial.dylib
72# CHECK:   - name:            _myResolver
73# CHECK:     load-name:       libspecial.dylib
74