darwin-m.test
3.32 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
## Show that -m/--format=darwin produces darwin-style output.
# RUN: yaml2obj %s --docnum=1 -o %t
# RUN: yaml2obj %s --docnum=2 -o %t2
# RUN: llvm-size -m %t \
# RUN: | FileCheck --check-prefix=DARWIN %s --implicit-check-not={{.}} \
# RUN: --strict-whitespace --match-full-lines
# RUN: llvm-size -m %t %t2 \
# RUN: | FileCheck --check-prefixes=DARWIN,DARWIN2 %s --implicit-check-not={{.}} \
# RUN: -DFILE1=%t -DFILE2=%t2 --strict-whitespace --match-full-lines
# RUN: llvm-size --format=darwin %t \
# RUN: | FileCheck --check-prefix=DARWIN %s --implicit-check-not={{.}} \
# RUN: --strict-whitespace --match-full-lines
# RUN: llvm-size --format=darwin %t %t2 \
# RUN: | FileCheck --check-prefixes=DARWIN,DARWIN2 %s --implicit-check-not={{.}} \
# RUN: -DFILE1=%t -DFILE2=%t2 --strict-whitespace --match-full-lines
# DARWIN2:[[FILE1]]:
# DARWIN:Segment : 12
# DARWIN-NEXT: Section (__TEXT, __text): 4
# DARWIN-NEXT: Section (__DATA, __data): 8
# DARWIN-NEXT: total 12
# DARWIN-NEXT:total 12
# DARWIN2:[[FILE2]]:
# DARWIN2-NEXT:Segment : 48
# DARWIN2-NEXT: Section (__TEXT, __text): 16
# DARWIN2-NEXT: Section (__DATA, __data): 32
# DARWIN2-NEXT: total 48
# DARWIN2-NEXT:total 48
--- !mach-o
FileHeader:
magic: 0xFEEDFACE
cputype: 0x0000000C
cpusubtype: 0x00000009
filetype: 0x00000001
ncmds: 1
sizeofcmds: 192
flags: 0x00000000
LoadCommands:
- cmd: LC_SEGMENT
cmdsize: 192
segname: ''
vmaddr: 0
vmsize: 12
fileoff: 220
filesize: 12
maxprot: 7
initprot: 7
nsects: 2
flags: 0
Sections:
- sectname: __text
segname: __TEXT
addr: 0x0000000000000000
size: 4
offset: 0x000000DC
align: 0
reloff: 0x00000000
nreloc: 0
flags: 0x80000000
reserved1: 0x00000000
reserved2: 0x00000000
reserved3: 0x00000000
- sectname: __data
segname: __DATA
addr: 0x0000000000000004
size: 8
offset: 0x000000E0
align: 0
reloff: 0x00000000
nreloc: 0
flags: 0x00000000
reserved1: 0x00000000
reserved2: 0x00000000
reserved3: 0x00000000
--- !mach-o
FileHeader:
magic: 0xFEEDFACE
cputype: 0x0000000C
cpusubtype: 0x00000009
filetype: 0x00000001
ncmds: 1
sizeofcmds: 192
flags: 0x00000000
LoadCommands:
- cmd: LC_SEGMENT
cmdsize: 192
segname: ''
vmaddr: 0
vmsize: 48
fileoff: 220
filesize: 48
maxprot: 7
initprot: 7
nsects: 2
flags: 0
Sections:
- sectname: __text
segname: __TEXT
addr: 0x0000000000000000
size: 16
offset: 0x000000DC
align: 0
reloff: 0x00000000
nreloc: 0
flags: 0x80000000
reserved1: 0x00000000
reserved2: 0x00000000
reserved3: 0x00000000
- sectname: __data
segname: __DATA
addr: 0x0000000000000010
size: 32
offset: 0x000000EC
align: 0
reloff: 0x00000000
nreloc: 0
flags: 0x00000000
reserved1: 0x00000000
reserved2: 0x00000000
reserved3: 0x00000000