1 ## This test verifies that llvm-objcopy copies an executable properly. It
2 ## uses llvm-readobj instead of cmp because some parts of the object
3 ## (e.g., the string table) are not identical; the output file is correct but
4 ## some offsets differ from the input file.
5 # RUN: yaml2obj %s -o %t
6 # RUN: llvm-objcopy %t %t2
7 # RUN: llvm-readobj --file-headers --sections %t2 | FileCheck %s
13 cpusubtype: 0x80000003
45 addr: 0x0000000100000F70
55 - sectname: __unwind_info
57 addr: 0x0000000100000FAC
81 addr: 0x0000000100001000
93 addr: 0x0000000100001004
100 reserved1: 0x00000000
101 reserved2: 0x00000000
102 reserved3: 0x00000000
114 - cmd: LC_DYLD_INFO_ONLY
152 - cmd: LC_LOAD_DYLINKER
155 Content: '/usr/lib/dyld'
159 uuid: B6EE4FB7-4E1E-3C7A-80D3-CFBD89DBC0FE
160 - cmd: LC_BUILD_VERSION
169 - cmd: LC_SOURCE_VERSION
172 - cmd: LC_LINKER_OPTIMIZATION_HINT
185 current_version: 82115073
186 compatibility_version: 65536
187 Content: '/usr/lib/libSystem.B.dylib'
189 - cmd: LC_FUNCTION_STARTS
193 - cmd: LC_DATA_IN_CODE
202 Flags: 0x0000000000000000
203 Address: 0x0000000000000000
204 Other: 0x0000000000000000
210 Flags: 0x0000000000000000
211 Address: 0x0000000000000000
212 Other: 0x0000000000000000
217 Name: _mh_execute_header
218 Flags: 0x0000000000000000
219 Address: 0x0000000000000000
220 Other: 0x0000000000000000
225 Flags: 0x0000000000000000
226 Address: 0x0000000000000F70
227 Other: 0x0000000000000000
232 Flags: 0x0000000000000000
233 Address: 0x0000000000000F90
234 Other: 0x0000000000000000
239 Flags: 0x0000000000000000
240 Address: 0x0000000000001000
241 Other: 0x0000000000000000
246 Flags: 0x0000000000000000
247 Address: 0x0000000000001004
248 Other: 0x0000000000000000
283 - __mh_execute_header
291 # CHECK: FileType: Executable (0x2)
292 # CHECK: Name: __text
293 # CHECK: Name: __unwind_info
294 # CHECK: Name: __data
295 # CHECK: Name: __common