Run DCE after a LoopFlatten test to reduce spurious output [nfc]
[llvm-project.git] / lld / test / MachO / lc-dyld-exports-trie.yaml
blob224bc5207446a283e95ad5eb689941f920e3f7fd
1 # REQUIRES: x86
2 # RUN: rm -rf %t; split-file %s %t
3 # RUN: llvm-mc -filetype=obj -triple=x86_64-apple-macos -o %t/obj.o %t/obj.s
4 # RUN: yaml2obj %t/dylib.yaml -o %t/libdylib.dylib
5 # RUN: %lld -platform_version macos 12.0.0 12.0.0 -lSystem %t/obj.o %t/libdylib.dylib -o /dev/null
7 #--- obj.s
8   .globl _main
9 _main:
10   call _foo
12 #--- dylib.yaml
13 ## This yaml is from a dylib produced by ld64
14 ##   echo ".global _foo\n_foo" > dylib.s
15 ##   clang -target=x86_64-apple-macos12 -dynamiclib -isysroot Inputs/MacOSX.sdk dylib.s -o libdylib.dylib
16 ##   obj2yaml --raw-segment=data libdylib.dylib
17 --- !mach-o
18 FileHeader:
19   magic:           0xFEEDFACF
20   cputype:         0x1000007
21   cpusubtype:      0x3
22   filetype:        0x6
23   ncmds:           13
24   sizeofcmds:      568
25   flags:           0x100085
26   reserved:        0x0
27 LoadCommands:
28   - cmd:             LC_SEGMENT_64
29     cmdsize:         152
30     segname:         __TEXT
31     vmaddr:          0
32     vmsize:          16384
33     fileoff:         0
34     filesize:        16384
35     maxprot:         5
36     initprot:        5
37     nsects:          1
38     flags:           0
39     Sections:
40       - sectname:        __text
41         segname:         __TEXT
42         addr:            0x4000
43         size:            0
44         offset:          0x4000
45         align:           0
46         reloff:          0x0
47         nreloc:          0
48         flags:           0x80000400
49         reserved1:       0x0
50         reserved2:       0x0
51         reserved3:       0x0
52         content:         ''
53   - cmd:             LC_SEGMENT_64
54     cmdsize:         72
55     segname:         __LINKEDIT
56     vmaddr:          16384
57     vmsize:          16384
58     fileoff:         16384
59     filesize:        96
60     maxprot:         1
61     initprot:        1
62     nsects:          0
63     flags:           0
64   - cmd:             LC_ID_DYLIB
65     cmdsize:         48
66     dylib:
67       name:            24
68       timestamp:       1
69       current_version: 0
70       compatibility_version: 0
71     Content:         libdylib.dylib
72     ZeroPadBytes:    3
73   - cmd:             LC_DYLD_CHAINED_FIXUPS
74     cmdsize:         16
75     dataoff:         16384
76     datasize:        48
77   - cmd:             LC_DYLD_EXPORTS_TRIE
78     cmdsize:         16
79     dataoff:         16432
80     datasize:        16
81   - cmd:             LC_SYMTAB
82     cmdsize:         24
83     symoff:          16456
84     nsyms:           1
85     stroff:          16472
86     strsize:         8
87   - cmd:             LC_DYSYMTAB
88     cmdsize:         80
89     ilocalsym:       0
90     nlocalsym:       0
91     iextdefsym:      0
92     nextdefsym:      1
93     iundefsym:       1
94     nundefsym:       0
95     tocoff:          0
96     ntoc:            0
97     modtaboff:       0
98     nmodtab:         0
99     extrefsymoff:    0
100     nextrefsyms:     0
101     indirectsymoff:  0
102     nindirectsyms:   0
103     extreloff:       0
104     nextrel:         0
105     locreloff:       0
106     nlocrel:         0
107   - cmd:             LC_UUID
108     cmdsize:         24
109     uuid:            52409B91-DF59-346A-A63F-D4E6FFDC3E04
110   - cmd:             LC_BUILD_VERSION
111     cmdsize:         32
112     platform:        1
113     minos:           786432
114     sdk:             851968
115     ntools:          1
116     Tools:
117       - tool:            3
118         version:         53674242
119   - cmd:             LC_SOURCE_VERSION
120     cmdsize:         16
121     version:         0
122   - cmd:             LC_LOAD_DYLIB
123     cmdsize:         56
124     dylib:
125       name:            24
126       timestamp:       2
127       current_version: 65793
128       compatibility_version: 65536
129     Content:         '/usr/lib/libSystem.dylib'
130     ZeroPadBytes:    8
131   - cmd:             LC_FUNCTION_STARTS
132     cmdsize:         16
133     dataoff:         16448
134     datasize:        8
135   - cmd:             LC_DATA_IN_CODE
136     cmdsize:         16
137     dataoff:         16456
138     datasize:        0
139 __LINKEDIT:      00000000200000002C0000002C000000000000000100000000000000000000000200000000000000000000000000000000015F666F6F000804008080010000000000000000000000020000000F010000004000000000000020005F666F6F0000