1 ## Check how llvm-dwarfdump calculates section sizes
2 ## with --show-section-sizes for Mach-O objects.
4 # RUN: yaml2obj %s | llvm-dwarfdump - --show-section-sizes \
5 # RUN: | FileCheck %s --match-full-lines --strict-whitespace
7 # CHECK:----------------------------------------------------
8 # CHECK-NEXT:file: {{.*}}
9 # CHECK-NEXT:----------------------------------------------------
10 # CHECK-NEXT:SECTION SIZE (b)
11 # CHECK-NEXT:---------------- --------
12 # CHECK-NEXT:__debug_str 183 (9.78%)
13 # CHECK-NEXT:__debug_abbrev 58 (3.10%)
14 # CHECK-NEXT:__debug_info 83 (4.43%)
15 # CHECK-NEXT:__apple_names 60 (3.21%)
16 # CHECK-NEXT:__apple_objc 36 (1.92%)
17 # CHECK-NEXT:__apple_namespac 36 (1.92%)
18 # CHECK-NEXT:__apple_types 71 (3.79%)
19 # CHECK-NEXT:__debug_line 61 (3.26%)
21 # CHECK-NEXT: Total Size: 588 (31.41%)
22 # CHECK-NEXT: Total File Size: 1872
23 # CHECK-NEXT:----------------------------------------------------
29 cpusubtype: 0x00000003
48 ## This is a debug section following the ELF naming style, and is used
49 ## to show that such sections are not included in the report.
50 - sectname: .debug_line
52 addr: 0x0000000000000000
62 content: 554889E531C0C745FC000000005DC3
63 - sectname: __debug_str
65 addr: 0x000000000000000F
75 - sectname: __debug_abbrev
77 addr: 0x00000000000000C6
87 - sectname: __debug_info
89 addr: 0x0000000000000100
100 - address: 0x00000033
108 - address: 0x00000026
116 - sectname: __apple_names
118 addr: 0x0000000000000153
125 reserved1: 0x00000000
126 reserved2: 0x00000000
127 reserved3: 0x00000000
128 content: 485341480100000001000000010000000C000000000000000100000001000600000000006A7F9A7C2C000000AE000000010000003200000000000000
129 - sectname: __apple_objc
131 addr: 0x000000000000018F
138 reserved1: 0x00000000
139 reserved2: 0x00000000
140 reserved3: 0x00000000
141 content: 485341480100000001000000000000000C000000000000000100000001000600FFFFFFFF
142 - sectname: __apple_namespac
144 addr: 0x00000000000001B3
151 reserved1: 0x00000000
152 reserved2: 0x00000000
153 reserved3: 0x00000000
154 content: 485341480100000001000000000000000C000000000000000100000001000600FFFFFFFF
155 - sectname: __apple_types
157 addr: 0x00000000000001D7
164 reserved1: 0x00000000
165 reserved2: 0x00000000
166 reserved3: 0x00000000
167 content: 48534148010000000100000001000000140000000000000003000000010006000300050004000B00000000003080880B34000000B3000000010000004B00000024000000000000
168 - sectname: __compact_unwind
170 addr: 0x0000000000000220
177 reserved1: 0x00000000
178 reserved2: 0x00000000
179 reserved3: 0x00000000
180 content: 00000000000000000F0000000000000100000000000000000000000000000000
182 - address: 0x00000000
190 - sectname: __eh_frame
192 addr: 0x0000000000000240
199 reserved1: 0x00000000
200 reserved2: 0x00000000
201 reserved3: 0x00000000
202 content: 1400000000000000017A520001781001100C070890010000240000001C000000A0FDFFFFFFFFFFFF0F0000000000000000410E108602430D0600000000000000
203 - sectname: __debug_line
205 addr: 0x0000000000000280
212 reserved1: 0x00000000
213 reserved2: 0x00000000
214 reserved3: 0x00000000
216 - address: 0x0000002B
224 - cmd: LC_BUILD_VERSION