blob: 0902a3477b5582c0d841fcf5d6b5a5809d37f654 [file] [log] [blame]
Davide Italianoddedd722015-09-10 01:50:00 +00001// RUN: llvm-mc -triple i386-apple-darwin9 %s -filetype=obj -o - | llvm-readobj -file-headers -s -sd -r -t -macho-segment -macho-dysymtab -macho-indirect-symbols | FileCheck %s
Daniel Dunbarb7b796c2010-05-17 21:19:59 +00002
3 movl $a, b
4
Davide Italianoddedd722015-09-10 01:50:00 +00005// CHECK: File: <stdin>
6// CHECK: Format: Mach-O 32-bit i386
7// CHECK: Arch: i386
8// CHECK: AddressSize: 32bit
9// CHECK: MachHeader {
10// CHECK: Magic: Magic (0xFEEDFACE)
11// CHECK: CpuType: X86 (0x7)
12// CHECK: CpuSubType: CPU_SUBTYPE_I386_ALL (0x3)
13// CHECK: FileType: Relocatable (0x1)
14// CHECK: NumOfLoadCommands: 4
15// CHECK: SizeOfLoadCommands: 244
16// CHECK: Flags [ (0x0)
17// CHECK: ]
18// CHECK: }
19// CHECK: Sections [
20// CHECK: Section {
21// CHECK: Index: 0
22// CHECK: Name: __text (5F 5F 74 65 78 74 00 00 00 00 00 00 00 00 00 00)
23// CHECK: Segment: __TEXT (5F 5F 54 45 58 54 00 00 00 00 00 00 00 00 00 00)
24// CHECK: Address: 0x0
25// CHECK: Size: 0xA
26// CHECK: Offset: 272
27// CHECK: Alignment: 0
28// CHECK: RelocationOffset: 0x11C
29// CHECK: RelocationCount: 2
30// CHECK: Type: 0x0
31// CHECK: Attributes [ (0x800004)
32// CHECK: PureInstructions (0x800000)
33// CHECK: SomeInstructions (0x4)
34// CHECK: ]
35// CHECK: Reserved1: 0x0
36// CHECK: Reserved2: 0x0
37// CHECK: SectionData (
38// CHECK: 0000: C7050000 00000000 0000 |..........|
39// CHECK: )
40// CHECK: }
41// CHECK: ]
42// CHECK: Relocations [
43// CHECK: Section __text {
44// CHECK: 0x6 0 2 1 GENERIC_RELOC_VANILLA 0 a
45// CHECK: 0x2 0 2 1 GENERIC_RELOC_VANILLA 0 b
46// CHECK: }
47// CHECK: ]
48// CHECK: Symbols [
49// CHECK: Symbol {
50// CHECK: Name: a (3)
51// CHECK: Extern
52// CHECK: Type: Undef (0x0)
53// CHECK: Section: (0x0)
54// CHECK: RefType: UndefinedNonLazy (0x0)
55// CHECK: Flags [ (0x0)
56// CHECK: ]
57// CHECK: Value: 0x0
58// CHECK: }
59// CHECK: Symbol {
60// CHECK: Name: b (1)
61// CHECK: Extern
62// CHECK: Type: Undef (0x0)
63// CHECK: Section: (0x0)
64// CHECK: RefType: UndefinedNonLazy (0x0)
65// CHECK: Flags [ (0x0)
66// CHECK: ]
67// CHECK: Value: 0x0
68// CHECK: }
69// CHECK: ]
70// CHECK: Indirect Symbols {
71// CHECK: Number: 0
72// CHECK: Symbols [
73// CHECK: ]
74// CHECK: }
75// CHECK: Segment {
76// CHECK: Cmd: LC_SEGMENT
77// CHECK: Name:
78// CHECK: Size: 124
79// CHECK: vmaddr: 0x0
80// CHECK: vmsize: 0xA
81// CHECK: fileoff: 272
82// CHECK: filesize: 10
83// CHECK: maxprot: rwx
84// CHECK: initprot: rwx
85// CHECK: nsects: 1
86// CHECK: flags: 0x0
87// CHECK: }
88// CHECK: Dysymtab {
89// CHECK: ilocalsym: 0
90// CHECK: nlocalsym: 0
91// CHECK: iextdefsym: 0
92// CHECK: nextdefsym: 0
93// CHECK: iundefsym: 0
94// CHECK: nundefsym: 2
95// CHECK: tocoff: 0
96// CHECK: ntoc: 0
97// CHECK: modtaboff: 0
98// CHECK: nmodtab: 0
99// CHECK: extrefsymoff: 0
100// CHECK: nextrefsyms: 0
101// CHECK: indirectsymoff: 0
102// CHECK: nindirectsyms: 0
103// CHECK: extreloff: 0
104// CHECK: nextrel: 0
105// CHECK: locreloff: 0
106// CHECK: nlocrel: 0
107// CHECK: }