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 > %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 PayloadString: '/usr/lib/dyld'
159 uuid: B6EE4FB7-4E1E-3C7A-80D3-CFBD89DBC0FE
160 - cmd: LC_BUILD_VERSION
169 - cmd: LC_SOURCE_VERSION
181 current_version: 82115073
182 compatibility_version: 65536
183 PayloadString: '/usr/lib/libSystem.B.dylib'
185 - cmd: LC_FUNCTION_STARTS
189 - cmd: LC_DATA_IN_CODE
198 Flags: 0x0000000000000000
199 Address: 0x0000000000000000
200 Other: 0x0000000000000000
206 Flags: 0x0000000000000000
207 Address: 0x0000000000000000
208 Other: 0x0000000000000000
213 Name: _mh_execute_header
214 Flags: 0x0000000000000000
215 Address: 0x0000000000000000
216 Other: 0x0000000000000000
221 Flags: 0x0000000000000000
222 Address: 0x0000000000000F70
223 Other: 0x0000000000000000
228 Flags: 0x0000000000000000
229 Address: 0x0000000000000F90
230 Other: 0x0000000000000000
235 Flags: 0x0000000000000000
236 Address: 0x0000000000001000
237 Other: 0x0000000000000000
242 Flags: 0x0000000000000000
243 Address: 0x0000000000001004
244 Other: 0x0000000000000000
279 - __mh_execute_header
287 # CHECK: FileType: Executable (0x2)
288 # CHECK: Name: __text
289 # CHECK: Name: __unwind_info
290 # CHECK: Name: __data
291 # CHECK: Name: __common