1 // RUN
: llvm-mc
-triple i386-apple-darwin9
%s
-filetype
=obj
-o
- | llvm-readobj
--file-headers
-S
--sd
-r
--symbols
--macho-segment
--macho-dysymtab
--macho-indirect-symbols | FileCheck
%s
5 // This file has size
2, the tail padding doesn
't count.
6 .zerofill __DATA, __bss, sym_a, 1
8 // CHECK: File: <stdin>
9 // CHECK: Format: Mach-O 32-bit i386
11 // CHECK: AddressSize: 32bit
12 // CHECK: MachHeader {
13 // CHECK: Magic: Magic (0xFEEDFACE)
14 // CHECK: CpuType: X86 (0x7)
15 // CHECK: CpuSubType: CPU_SUBTYPE_I386_ALL (0x3)
16 // CHECK: FileType: Relocatable (0x1)
17 // CHECK: NumOfLoadCommands: 4
18 // CHECK: SizeOfLoadCommands: 312
19 // CHECK: Flags [ (0x0)
25 // CHECK: Name: __text (5F 5F 74 65 78 74 00 00 00 00 00 00 00 00 00 00)
26 // CHECK: Segment: __TEXT (5F 5F 54 45 58 54 00 00 00 00 00 00 00 00 00 00)
27 // CHECK: Address: 0x0
30 // CHECK: Alignment: 0
31 // CHECK: RelocationOffset: 0x0
32 // CHECK: RelocationCount: 0
33 // CHECK: Type: Regular (0x0)
34 // CHECK: Attributes [ (0x800000)
35 // CHECK: PureInstructions (0x800000)
37 // CHECK: Reserved1: 0x0
38 // CHECK: Reserved2: 0x0
39 // CHECK: SectionData (
40 // CHECK: 0000: 00 |.|
45 // CHECK: Name: __bss (5F 5F 62 73 73 00 00 00 00 00 00 00 00 00 00 00)
46 // CHECK: Segment: __DATA (5F 5F 44 41 54 41 00 00 00 00 00 00 00 00 00 00)
47 // CHECK: Address: 0x1
50 // CHECK: Alignment: 0
51 // CHECK: RelocationOffset: 0x0
52 // CHECK: RelocationCount: 0
53 // CHECK: Type: ZeroFill (0x1)
54 // CHECK: Attributes [ (0x0)
56 // CHECK: Reserved1: 0x0
57 // CHECK: Reserved2: 0x0
60 // CHECK: Relocations [
64 // CHECK: Name: sym_a (1)
65 // CHECK: Type: Section (0xE)
66 // CHECK: Section: __bss (0x2)
67 // CHECK: RefType: UndefinedNonLazy (0x0)
68 // CHECK: Flags [ (0x0)
73 // CHECK: Indirect Symbols {
79 // CHECK: Cmd: LC_SEGMENT
84 // CHECK: fileoff: 340
86 // CHECK: maxprot: rwx
87 // CHECK: initprot: rwx
92 // CHECK: ilocalsym: 0
93 // CHECK: nlocalsym: 1
94 // CHECK: iextdefsym: 1
95 // CHECK: nextdefsym: 0
96 // CHECK: iundefsym: 1
97 // CHECK: nundefsym: 0
100 // CHECK: modtaboff: 0
102 // CHECK: extrefsymoff: 0
103 // CHECK: nextrefsyms: 0
104 // CHECK: indirectsymoff: 0
105 // CHECK: nindirectsyms: 0
106 // CHECK: extreloff: 0
108 // CHECK: locreloff: 0