[InstCombine] Signed saturation patterns
[llvm-complete.git] / test / MC / MachO / weakdef.s
blob497aad844282ef9a5bb7ad858b1241a21591f595
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
3 .section __DATA,__datacoal_nt,coalesced
4 .section __TEXT,__const_coal,coalesced
5 .globl __ZTS3optIbE ## @_ZTS3optIbE
6 .weak_definition __ZTS3optIbE
7 __ZTS3optIbE:
10 .section __DATA,__datacoal_nt,coalesced
11 .globl __ZTI3optIbE ## @_ZTI3optIbE
12 .weak_definition __ZTI3optIbE
14 __ZTI3optIbE:
15 .long __ZTS3optIbE
17 // CHECK: File: <stdin>
18 // CHECK-NEXT: Format: Mach-O 32-bit i386
19 // CHECK-NEXT: Arch: i386
20 // CHECK-NEXT: AddressSize: 32bit
21 // CHECK-NEXT: MachHeader {
22 // CHECK-NEXT: Magic: Magic (0xFEEDFACE)
23 // CHECK-NEXT: CpuType: X86 (0x7)
24 // CHECK-NEXT: CpuSubType: CPU_SUBTYPE_I386_ALL (0x3)
25 // CHECK-NEXT: FileType: Relocatable (0x1)
26 // CHECK-NEXT: NumOfLoadCommands: 4
27 // CHECK-NEXT: SizeOfLoadCommands: 380
28 // CHECK-NEXT: Flags [ (0x0)
29 // CHECK-NEXT: ]
30 // CHECK-NEXT: }
31 // CHECK-NEXT: Sections [
32 // CHECK-NEXT: Section {
33 // CHECK-NEXT: Index: 0
34 // CHECK-NEXT: Name: __text (5F 5F 74 65 78 74 00 00 00 00 00 00 00 00 00 00)
35 // CHECK-NEXT: Segment: __TEXT (5F 5F 54 45 58 54 00 00 00 00 00 00 00 00 00 00)
36 // CHECK-NEXT: Address: 0x0
37 // CHECK-NEXT: Size: 0x0
38 // CHECK-NEXT: Offset: 408
39 // CHECK-NEXT: Alignment: 0
40 // CHECK-NEXT: RelocationOffset: 0x0
41 // CHECK-NEXT: RelocationCount: 0
42 // CHECK-NEXT: Type: Regular (0x0)
43 // CHECK-NEXT: Attributes [ (0x800000)
44 // CHECK-NEXT: PureInstructions (0x800000)
45 // CHECK-NEXT: ]
46 // CHECK-NEXT: Reserved1: 0x0
47 // CHECK-NEXT: Reserved2: 0x0
48 // CHECK-NEXT: SectionData (
49 // CHECK-NEXT: )
50 // CHECK-NEXT: }
51 // CHECK-NEXT: Section {
52 // CHECK-NEXT: Index: 1
53 // CHECK-NEXT: Name: __datacoal_nt (5F 5F 64 61 74 61 63 6F 61 6C 5F 6E 74 00 00 00)
54 // CHECK-NEXT: Segment: __DATA (5F 5F 44 41 54 41 00 00 00 00 00 00 00 00 00 00)
55 // CHECK-NEXT: Address: 0x0
56 // CHECK-NEXT: Size: 0x4
57 // CHECK-NEXT: Offset: 408
58 // CHECK-NEXT: Alignment: 0
59 // CHECK-NEXT: RelocationOffset: 0x19C
60 // CHECK-NEXT: RelocationCount: 1
61 // CHECK-NEXT: Type: Coalesced (0xB)
62 // CHECK-NEXT: Attributes [ (0x0)
63 // CHECK-NEXT: ]
64 // CHECK-NEXT: Reserved1: 0x0
65 // CHECK-NEXT: Reserved2: 0x0
66 // CHECK-NEXT: SectionData (
67 // CHECK-NEXT: 0000: 00000000 |....|
68 // CHECK-NEXT: )
69 // CHECK-NEXT: }
70 // CHECK-NEXT: Section {
71 // CHECK-NEXT: Index: 2
72 // CHECK-NEXT: Name: __const_coal (5F 5F 63 6F 6E 73 74 5F 63 6F 61 6C 00 00 00 00)
73 // CHECK-NEXT: Segment: __TEXT (5F 5F 54 45 58 54 00 00 00 00 00 00 00 00 00 00)
74 // CHECK-NEXT: Address: 0x4
75 // CHECK-NEXT: Size: 0x0
76 // CHECK-NEXT: Offset: 412
77 // CHECK-NEXT: Alignment: 0
78 // CHECK-NEXT: RelocationOffset: 0x0
79 // CHECK-NEXT: RelocationCount: 0
80 // CHECK-NEXT: Type: Coalesced (0xB)
81 // CHECK-NEXT: Attributes [ (0x0)
82 // CHECK-NEXT: ]
83 // CHECK-NEXT: Reserved1: 0x0
84 // CHECK-NEXT: Reserved2: 0x0
85 // CHECK-NEXT: SectionData (
86 // CHECK-NEXT: )
87 // CHECK-NEXT: }
88 // CHECK-NEXT: ]
89 // CHECK-NEXT: Relocations [
90 // CHECK-NEXT: Section __datacoal_nt {
91 // CHECK-NEXT: 0x0 0 2 1 GENERIC_RELOC_VANILLA 0 __ZTS3optIbE
92 // CHECK-NEXT: }
93 // CHECK-NEXT: ]
94 // CHECK-NEXT: Symbols [
95 // CHECK-NEXT: Symbol {
96 // CHECK-NEXT: Name: __ZTI3optIbE (14)
97 // CHECK-NEXT: Extern
98 // CHECK-NEXT: Type: Section (0xE)
99 // CHECK-NEXT: Section: __datacoal_nt (0x2)
100 // CHECK-NEXT: RefType: UndefinedNonLazy (0x0)
101 // CHECK-NEXT: Flags [ (0x80)
102 // CHECK-NEXT: WeakDef (0x80)
103 // CHECK-NEXT: ]
104 // CHECK-NEXT: Value: 0x0
105 // CHECK-NEXT: }
106 // CHECK-NEXT: Symbol {
107 // CHECK-NEXT: Name: __ZTS3optIbE (1)
108 // CHECK-NEXT: Extern
109 // CHECK-NEXT: Type: Section (0xE)
110 // CHECK-NEXT: Section: __const_coal (0x3)
111 // CHECK-NEXT: RefType: UndefinedNonLazy (0x0)
112 // CHECK-NEXT: Flags [ (0x80)
113 // CHECK-NEXT: WeakDef (0x80)
114 // CHECK-NEXT: ]
115 // CHECK-NEXT: Value: 0x4
116 // CHECK-NEXT: }
117 // CHECK-NEXT: ]
118 // CHECK-NEXT: Indirect Symbols {
119 // CHECK-NEXT: Number: 0
120 // CHECK-NEXT: Symbols [
121 // CHECK-NEXT: ]
122 // CHECK-NEXT: }
123 // CHECK-NEXT: Segment {
124 // CHECK-NEXT: Cmd: LC_SEGMENT
125 // CHECK-NEXT: Name:
126 // CHECK-NEXT: Size: 260
127 // CHECK-NEXT: vmaddr: 0x0
128 // CHECK-NEXT: vmsize: 0x4
129 // CHECK-NEXT: fileoff: 408
130 // CHECK-NEXT: filesize: 4
131 // CHECK-NEXT: maxprot: rwx
132 // CHECK-NEXT: initprot: rwx
133 // CHECK-NEXT: nsects: 3
134 // CHECK-NEXT: flags: 0x0
135 // CHECK-NEXT: }
136 // CHECK-NEXT: Dysymtab {
137 // CHECK-NEXT: ilocalsym: 0
138 // CHECK-NEXT: nlocalsym: 0
139 // CHECK-NEXT: iextdefsym: 0
140 // CHECK-NEXT: nextdefsym: 2
141 // CHECK-NEXT: iundefsym: 2
142 // CHECK-NEXT: nundefsym: 0
143 // CHECK-NEXT: tocoff: 0
144 // CHECK-NEXT: ntoc: 0
145 // CHECK-NEXT: modtaboff: 0
146 // CHECK-NEXT: nmodtab: 0
147 // CHECK-NEXT: extrefsymoff: 0
148 // CHECK-NEXT: nextrefsyms: 0
149 // CHECK-NEXT: indirectsymoff: 0
150 // CHECK-NEXT: nindirectsyms: 0
151 // CHECK-NEXT: extreloff: 0
152 // CHECK-NEXT: nextrel: 0
153 // CHECK-NEXT: locreloff: 0
154 // CHECK-NEXT: nlocrel: 0
155 // CHECK-NEXT: }