• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1# RUN: ld64.lld -arch x86_64 -r -print_atoms %s -o %t  | FileCheck %s
2#
3# Test multiple labels to same address parse into aliases.
4#
5
6--- !mach-o
7arch:            x86_64
8file-type:       MH_OBJECT
9flags:           [ MH_SUBSECTIONS_VIA_SYMBOLS ]
10has-UUID:        false
11OS:              unknown
12sections:
13  - segment:         __TEXT
14    section:         __text
15    type:            S_REGULAR
16    attributes:      [ S_ATTR_PURE_INSTRUCTIONS, S_ATTR_SOME_INSTRUCTIONS ]
17    alignment:       4
18    address:         0x0000000000000000
19    content:         [ 0xCC, 0xC3 ]
20local-symbols:
21  - name:            _pad
22    type:            N_SECT
23    scope:           [ N_EXT ]
24    sect:            1
25    value:           0x0000000000000000
26  - name:            _myStaticAlias1
27    type:            N_SECT
28    sect:            1
29    value:           0x0000000000000001
30  - name:            _myStaticAlias3
31    type:            N_SECT
32    sect:            1
33    value:           0x0000000000000001
34  - name:            _myStaticAlias2
35    type:            N_SECT
36    sect:            1
37    value:           0x0000000000000001
38global-symbols:
39  - name:            _myGlobalFunc1
40    type:            N_SECT
41    scope:           [ N_EXT ]
42    sect:            1
43    value:           0x0000000000000001
44  - name:            _myGlobalFunc2
45    type:            N_SECT
46    scope:           [ N_EXT ]
47    sect:            1
48    value:           0x0000000000000001
49  - name:            _myGlobalFunc3
50    type:            N_SECT
51    scope:           [ N_EXT ]
52    sect:            1
53    value:           0x0000000000000001
54  - name:            _myHiddenAlias1
55    type:            N_SECT
56    scope:           [ N_EXT, N_PEXT ]
57    sect:            1
58    value:           0x0000000000000001
59  - name:            _myHiddenAlias2
60    type:            N_SECT
61    scope:           [ N_EXT, N_PEXT ]
62    sect:            1
63    value:           0x0000000000000001
64  - name:            _myHiddenAlias3
65    type:            N_SECT
66    scope:           [ N_EXT, N_PEXT ]
67    sect:            1
68    value:           0x0000000000000001
69...
70
71# CHECK: defined-atoms:
72# CHECK:   - name:            _pad
73# CHECK:     scope:           global
74# CHECK:     content:         [ CC ]
75# CHECK:   - name:            _myStaticAlias1
76# CHECK:   - name:            _myStaticAlias2
77# CHECK:   - name:            _myStaticAlias3
78# CHECK:   - name:            _myHiddenAlias1
79# CHECK:     scope:           hidden
80# CHECK:   - name:            _myHiddenAlias2
81# CHECK:     scope:           hidden
82# CHECK:   - name:            _myHiddenAlias3
83# CHECK:     scope:           hidden
84# CHECK:   - name:            _myGlobalFunc1
85# CHECK:     scope:           global
86# CHECK:   - name:            _myGlobalFunc2
87# CHECK:     scope:           global
88# CHECK:   - name:            _myGlobalFunc3
89# CHECK:     scope:           global
90# CHECK:     content:         [ C3 ]
91