llvm.org GIT mirror llvm / 5a82951
[obj2yaml] [yaml2obj] Adding a test for r270124 This test covers strings after load command structs and zero fill bytes. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@270159 91177308-0d34-0410-b5e6-96231b3b80d8 Chris Bieneman 3 years ago
1 changed file(s) with 62 addition(s) and 0 deletion(s). Raw diff Collapse all Expand all
0 # RUN: yaml2obj -format=macho %s | obj2yaml | FileCheck %s
1
2 --- !mach-o
3 FileHeader:
4 magic: 0xFEEDFACF
5 cputype: 0x01000007
6 cpusubtype: 0x80000003
7 filetype: 0x00000002
8 ncmds: 3
9 sizeofcmds: 106
10 flags: 0x00218085
11 reserved: 0x00000000
12 LoadCommands:
13 - cmd: LC_LOAD_DYLINKER
14 cmdsize: 32
15 name: 12
16 PayloadString: /usr/lib/dyld
17 ZeroPadBytes: 7
18 - cmd: LC_LOAD_DYLIB
19 cmdsize: 48
20 dylib:
21 name: 24
22 timestamp: 2
23 current_version: 7864576
24 compatibility_version: 65536
25 PayloadString: '/usr/lib/libc++.1.dylib'
26 ZeroPadBytes: 1
27 - cmd: LC_LOAD_DYLIB
28 cmdsize: 56
29 dylib:
30 name: 24
31 timestamp: 2
32 current_version: 80349697
33 compatibility_version: 65536
34 PayloadString: /usr/lib/libSystem.B.dylib
35 ZeroPadBytes: 6
36 ...
37
38 #CHECK: LoadCommands:
39 #CHECK: - cmd: LC_LOAD_DYLINKER
40 #CHECK: cmdsize: 32
41 #CHECK: name: 12
42 #CHECK: PayloadString: /usr/lib/dyld
43 #CHECK: ZeroPadBytes: 7
44 #CHECK: - cmd: LC_LOAD_DYLIB
45 #CHECK: cmdsize: 48
46 #CHECK: dylib:
47 #CHECK: name: 24
48 #CHECK: timestamp: 2
49 #CHECK: current_version: 7864576
50 #CHECK: compatibility_version: 65536
51 #CHECK: PayloadString: '/usr/lib/libc++.1.dylib'
52 #CHECK: ZeroPadBytes: 1
53 #CHECK: - cmd: LC_LOAD_DYLIB
54 #CHECK: cmdsize: 56
55 #CHECK: dylib:
56 #CHECK: name: 24
57 #CHECK: timestamp: 2
58 #CHECK: current_version: 80349697
59 #CHECK: compatibility_version: 65536
60 #CHECK: PayloadString: /usr/lib/libSystem.B.dylib
61 #CHECK: ZeroPadBytes: 6