1# RUN: ld64.lld -arch x86_64 -macosx_version_min 10.8 \
2# RUN:      %s %p/Inputs/x86_64/libSystem.yaml -o %t  && \
3# RUN: llvm-objdump --macho --exports-trie %t | FileCheck %s
4#
5#
6# Tests that exports trie builds properly.
7#
8
9--- !mach-o
10arch:            x86_64
11file-type:       MH_OBJECT
12flags:           [ MH_SUBSECTIONS_VIA_SYMBOLS ]
13sections:
14  - segment:         __TEXT
15    section:         __text
16    type:            S_REGULAR
17    attributes:      [ S_ATTR_PURE_INSTRUCTIONS, S_ATTR_SOME_INSTRUCTIONS ]
18    address:         0x0000000000000000
19    content:         [ 0xC3, 0xC3, 0xC3, 0xC3 ]
20global-symbols:
21  - name:            _myHidden
22    type:            N_SECT
23    scope:           [ N_EXT, N_PEXT ]
24    sect:            1
25    value:           0x0000000000000000
26  - name:            _myRegular
27    type:            N_SECT
28    scope:           [ N_EXT ]
29    sect:            1
30    value:           0x0000000000000001
31  - name:            _myWeak
32    type:            N_SECT
33    scope:           [ N_EXT ]
34    sect:            1
35    desc:            [ N_WEAK_DEF ]
36    value:           0x0000000000000002
37  - name:            _main
38    type:            N_SECT
39    scope:           [ N_EXT ]
40    sect:            1
41    value:           0x0000000000000003
42...
43
44# CHECK-NOT:  _myHidden
45# CHECK:      0x100000FFD  _myRegular
46# CHECK:      0x100000FFE  _myWeak [weak_def]
47