• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1// RUN: llvm-mc -triple x86_64-apple-darwin9 %s -filetype=obj -o - | llvm-readobj -file-headers -s -sd -r -t --macho-segment --macho-dysymtab --macho-indirect-symbols | FileCheck %s
2
3	.text
4	.align	3
5	.long	2
6
7        .zerofill __DATA,__bss,_g0,8,3
8
9// CHECK: File: <stdin>
10// CHECK: Format: Mach-O 64-bit x86-64
11// CHECK: Arch: x86_64
12// CHECK: AddressSize: 64bit
13// CHECK: MachHeader {
14// CHECK:   Magic: Magic64 (0xFEEDFACF)
15// CHECK:   CpuType: X86-64 (0x1000007)
16// CHECK:   CpuSubType: CPU_SUBTYPE_X86_64_ALL (0x3)
17// CHECK:   FileType: Relocatable (0x1)
18// CHECK:   NumOfLoadCommands: 4
19// CHECK:   SizeOfLoadCommands: 352
20// CHECK:   Flags [ (0x0)
21// CHECK:   ]
22// CHECK:   Reserved: 0x0
23// CHECK: }
24// CHECK: Sections [
25// CHECK:   Section {
26// CHECK:     Index: 0
27// CHECK:     Name: __text (5F 5F 74 65 78 74 00 00 00 00 00 00 00 00 00 00)
28// CHECK:     Segment: __TEXT (5F 5F 54 45 58 54 00 00 00 00 00 00 00 00 00 00)
29// CHECK:     Address: 0x0
30// CHECK:     Size: 0x4
31// CHECK:     Offset: 384
32// CHECK:     Alignment: 3
33// CHECK:     RelocationOffset: 0x0
34// CHECK:     RelocationCount: 0
35// CHECK:     Type: 0x0
36// CHECK:     Attributes [ (0x800000)
37// CHECK:       PureInstructions (0x800000)
38// CHECK:     ]
39// CHECK:     Reserved1: 0x0
40// CHECK:     Reserved2: 0x0
41// CHECK:     Reserved3: 0x0
42// CHECK:     SectionData (
43// CHECK:       0000: 02000000                             |....|
44// CHECK:     )
45// CHECK:   }
46// CHECK:   Section {
47// CHECK:     Index: 1
48// CHECK:     Name: __bss (5F 5F 62 73 73 00 00 00 00 00 00 00 00 00 00 00)
49// CHECK:     Segment: __DATA (5F 5F 44 41 54 41 00 00 00 00 00 00 00 00 00 00)
50// CHECK:     Address: 0x8
51// CHECK:     Size: 0x8
52// CHECK:     Offset: 0
53// CHECK:     Alignment: 3
54// CHECK:     RelocationOffset: 0x0
55// CHECK:     RelocationCount: 0
56// CHECK:     Type: LocReloc (0x1)
57// CHECK:     Attributes [ (0x0)
58// CHECK:     ]
59// CHECK:     Reserved1: 0x0
60// CHECK:     Reserved2: 0x0
61// CHECK:     Reserved3: 0x0
62// CHECK:   }
63// CHECK: ]
64// CHECK: Relocations [
65// CHECK: ]
66// CHECK: Symbols [
67// CHECK:   Symbol {
68// CHECK:     Name: _g0 (1)
69// CHECK:     Type: Section (0xE)
70// CHECK:     Section: __bss (0x2)
71// CHECK:     RefType: UndefinedNonLazy (0x0)
72// CHECK:     Flags [ (0x0)
73// CHECK:     ]
74// CHECK:     Value: 0x8
75// CHECK:   }
76// CHECK: ]
77// CHECK: Indirect Symbols {
78// CHECK:   Number: 0
79// CHECK:   Symbols [
80// CHECK:   ]
81// CHECK: }
82// CHECK: Segment {
83// CHECK:   Cmd: LC_SEGMENT_64
84// CHECK:   Name:
85// CHECK:   Size: 232
86// CHECK:   vmaddr: 0x0
87// CHECK:   vmsize: 0x10
88// CHECK:   fileoff: 384
89// CHECK:   filesize: 4
90// CHECK:   maxprot: rwx
91// CHECK:   initprot: rwx
92// CHECK:   nsects: 2
93// CHECK:   flags: 0x0
94// CHECK: }
95// CHECK: Dysymtab {
96// CHECK:   ilocalsym: 0
97// CHECK:   nlocalsym: 1
98// CHECK:   iextdefsym: 1
99// CHECK:   nextdefsym: 0
100// CHECK:   iundefsym: 1
101// CHECK:   nundefsym: 0
102// CHECK:   tocoff: 0
103// CHECK:   ntoc: 0
104// CHECK:   modtaboff: 0
105// CHECK:   nmodtab: 0
106// CHECK:   extrefsymoff: 0
107// CHECK:   nextrefsyms: 0
108// CHECK:   indirectsymoff: 0
109// CHECK:   nindirectsyms: 0
110// CHECK:   extreloff: 0
111// CHECK:   nextrel: 0
112// CHECK:   locreloff: 0
113// CHECK:   nlocrel: 0
114// CHECK: }
115