408 lines · plain
1// RUN: llvm-mc -triple i386-apple-darwin9 %s -filetype=obj -o - | llvm-readobj --file-headers -S -r --symbols --macho-segment --macho-dysymtab --macho-indirect-symbols - | FileCheck %s2 3 .reference sym_ref_A4 .reference sym_ref_def_A5sym_ref_def_A:6sym_ref_def_C: 7 .reference sym_ref_def_C8 .reference sym_ref_def_D9 .globl sym_ref_def_D10 .globl sym_ref_def_E11 .reference sym_ref_def_E12 13 .weak_reference sym_weak_ref_A14 .weak_reference sym_weak_ref_def_A15sym_weak_ref_def_A: 16sym_weak_ref_def_B:17 .weak_reference sym_weak_ref_def_B18 19 .data20 .globl sym_weak_def_A21 .weak_definition sym_weak_def_A 22sym_weak_def_A:23sym_weak_def_B:24 .weak_definition sym_weak_def_B25 .globl sym_weak_def_B26 .weak_definition sym_weak_def_C27sym_weak_def_C:28 .globl sym_weak_def_C29 30 .lazy_reference sym_lazy_ref_A31 .lazy_reference sym_lazy_ref_B32sym_lazy_ref_B:33sym_lazy_ref_C:34 .lazy_reference sym_lazy_ref_C35 .lazy_reference sym_lazy_ref_D36 .globl sym_lazy_ref_D37 .globl sym_lazy_ref_E38 .lazy_reference sym_lazy_ref_E39 40 .private_extern sym_private_ext_A41 .private_extern sym_private_ext_B42sym_private_ext_B:43sym_private_ext_C:44 .private_extern sym_private_ext_C45 .private_extern sym_private_ext_D46 .globl sym_private_ext_D47 .globl sym_private_ext_E48 .private_extern sym_private_ext_E49 50 .no_dead_strip sym_no_dead_strip_A51 52sym_symbol_resolver_A:53 .symbol_resolver sym_symbol_resolver_A54 55 .reference sym_ref_A56 .desc sym_ref_A, 157 .desc sym_ref_A, 0x123458 59 .desc sym_desc_flags,0x4760sym_desc_flags:61 62// CHECK: File: <stdin>63// CHECK: Format: Mach-O 32-bit i38664// CHECK: Arch: i38665// CHECK: AddressSize: 32bit66// CHECK: MachHeader {67// CHECK: Magic: Magic (0xFEEDFACE)68// CHECK: CpuType: X86 (0x7)69// CHECK: CpuSubType: CPU_SUBTYPE_I386_ALL (0x3)70// CHECK: FileType: Relocatable (0x1)71// CHECK: NumOfLoadCommands: 472// CHECK: SizeOfLoadCommands: 31273// CHECK: Flags [ (0x0)74// CHECK: ]75// CHECK: }76// CHECK: Sections [77// CHECK: Section {78// CHECK: Index: 079// CHECK: Name: __text (5F 5F 74 65 78 74 00 00 00 00 00 00 00 00 00 00)80// CHECK: Segment: __TEXT (5F 5F 54 45 58 54 00 00 00 00 00 00 00 00 00 00)81// CHECK: Address: 0x082// CHECK: Size: 0x083// CHECK: Offset: 34084// CHECK: Alignment: 085// CHECK: RelocationOffset: 0x086// CHECK: RelocationCount: 087// CHECK: Type: Regular (0x0)88// CHECK: Attributes [ (0x800000)89// CHECK: PureInstructions (0x800000)90// CHECK: ]91// CHECK: Reserved1: 0x092// CHECK: Reserved2: 0x093// CHECK: }94// CHECK: Section {95// CHECK: Index: 196// CHECK: Name: __data (5F 5F 64 61 74 61 00 00 00 00 00 00 00 00 00 00)97// CHECK: Segment: __DATA (5F 5F 44 41 54 41 00 00 00 00 00 00 00 00 00 00)98// CHECK: Address: 0x099// CHECK: Size: 0x0100// CHECK: Offset: 340101// CHECK: Alignment: 0102// CHECK: RelocationOffset: 0x0103// CHECK: RelocationCount: 0104// CHECK: Type: Regular (0x0)105// CHECK: Attributes [ (0x0)106// CHECK: ]107// CHECK: Reserved1: 0x0108// CHECK: Reserved2: 0x0109// CHECK: }110// CHECK: ]111// CHECK: Relocations [112// CHECK: ]113// CHECK: Symbols [114// CHECK: Symbol {115// CHECK: Name: sym_ref_def_A (354)116// CHECK: Type: Section (0xE)117// CHECK: Section: __text (0x1)118// CHECK: RefType: UndefinedNonLazy (0x0)119// CHECK: Flags [ (0x20)120// CHECK: NoDeadStrip (0x20)121// CHECK: ]122// CHECK: Value: 0x0123// CHECK: }124// CHECK: Symbol {125// CHECK: Name: sym_ref_def_C (158)126// CHECK: Type: Section (0xE)127// CHECK: Section: __text (0x1)128// CHECK: RefType: UndefinedNonLazy (0x0)129// CHECK: Flags [ (0x20)130// CHECK: NoDeadStrip (0x20)131// CHECK: ]132// CHECK: Value: 0x0133// CHECK: }134// CHECK: Symbol {135// CHECK: Name: sym_weak_ref_def_A (368)136// CHECK: Type: Section (0xE)137// CHECK: Section: __text (0x1)138// CHECK: RefType: UndefinedNonLazy (0x0)139// CHECK: Flags [ (0x40)140// CHECK: WeakRef (0x40)141// CHECK: ]142// CHECK: Value: 0x0143// CHECK: }144// CHECK: Symbol {145// CHECK: Name: sym_weak_ref_def_B (220)146// CHECK: Type: Section (0xE)147// CHECK: Section: __text (0x1)148// CHECK: RefType: UndefinedNonLazy (0x0)149// CHECK: Flags [ (0x0)150// CHECK: ]151// CHECK: Value: 0x0152// CHECK: }153// CHECK: Symbol {154// CHECK: Name: sym_lazy_ref_B (190)155// CHECK: Type: Section (0xE)156// CHECK: Section: __data (0x2)157// CHECK: RefType: UndefinedNonLazy (0x0)158// CHECK: Flags [ (0x20)159// CHECK: NoDeadStrip (0x20)160// CHECK: ]161// CHECK: Value: 0x0162// CHECK: }163// CHECK: Symbol {164// CHECK: Name: sym_lazy_ref_C (128)165// CHECK: Type: Section (0xE)166// CHECK: Section: __data (0x2)167// CHECK: RefType: UndefinedNonLazy (0x0)168// CHECK: Flags [ (0x20)169// CHECK: NoDeadStrip (0x20)170// CHECK: ]171// CHECK: Value: 0x0172// CHECK: }173// CHECK: Symbol {174// CHECK: Name: sym_symbol_resolver_A (257)175// CHECK: Type: Section (0xE)176// CHECK: Section: __data (0x2)177// CHECK: RefType: UndefinedNonLazy (0x0)178// CHECK: Flags [ (0x100)179// CHECK: ]180// CHECK: Value: 0x0181// CHECK: }182// CHECK: Symbol {183// CHECK: Name: sym_desc_flags (1)184// CHECK: Type: Section (0xE)185// CHECK: Section: __data (0x2)186// CHECK: RefType: UndefinedNonLazy (0x0)187// CHECK: Flags [ (0x40)188// CHECK: WeakRef (0x40)189// CHECK: ]190// CHECK: Value: 0x0191// CHECK: }192// CHECK: Symbol {193// CHECK: Name: sym_private_ext_B (172)194// CHECK: PrivateExtern195// CHECK: Extern196// CHECK: Type: Section (0xE)197// CHECK: Section: __data (0x2)198// CHECK: RefType: UndefinedNonLazy (0x0)199// CHECK: Flags [ (0x0)200// CHECK: ]201// CHECK: Value: 0x0202// CHECK: }203// CHECK: Symbol {204// CHECK: Name: sym_private_ext_C (110)205// CHECK: PrivateExtern206// CHECK: Extern207// CHECK: Type: Section (0xE)208// CHECK: Section: __data (0x2)209// CHECK: RefType: UndefinedNonLazy (0x0)210// CHECK: Flags [ (0x0)211// CHECK: ]212// CHECK: Value: 0x0213// CHECK: }214// CHECK: Symbol {215// CHECK: Name: sym_weak_def_A (339)216// CHECK: Extern217// CHECK: Type: Section (0xE)218// CHECK: Section: __data (0x2)219// CHECK: RefType: UndefinedNonLazy (0x0)220// CHECK: Flags [ (0x80)221// CHECK: WeakDef (0x80)222// CHECK: ]223// CHECK: Value: 0x0224// CHECK: }225// CHECK: Symbol {226// CHECK: Name: sym_weak_def_B (205)227// CHECK: Extern228// CHECK: Type: Section (0xE)229// CHECK: Section: __data (0x2)230// CHECK: RefType: UndefinedNonLazy (0x0)231// CHECK: Flags [ (0x80)232// CHECK: WeakDef (0x80)233// CHECK: ]234// CHECK: Value: 0x0235// CHECK: }236// CHECK: Symbol {237// CHECK: Name: sym_weak_def_C (143)238// CHECK: Extern239// CHECK: Type: Section (0xE)240// CHECK: Section: __data (0x2)241// CHECK: RefType: UndefinedNonLazy (0x0)242// CHECK: Flags [ (0x80)243// CHECK: WeakDef (0x80)244// CHECK: ]245// CHECK: Value: 0x0246// CHECK: }247// CHECK: Symbol {248// CHECK: Name: sym_lazy_ref_A (299)249// CHECK: Extern250// CHECK: Type: Undef (0x0)251// CHECK: Section: (0x0)252// CHECK: RefType: ReferenceFlagUndefinedLazy (0x1)253// CHECK: Flags [ (0x20)254// CHECK: NoDeadStrip (0x20)255// CHECK: ]256// CHECK: Value: 0x0257// CHECK: }258// CHECK: Symbol {259// CHECK: Name: sym_lazy_ref_D (81)260// CHECK: Extern261// CHECK: Type: Undef (0x0)262// CHECK: Section: (0x0)263// CHECK: RefType: UndefinedNonLazy (0x0)264// CHECK: Flags [ (0x20)265// CHECK: NoDeadStrip (0x20)266// CHECK: ]267// CHECK: Value: 0x0268// CHECK: }269// CHECK: Symbol {270// CHECK: Name: sym_lazy_ref_E (34)271// CHECK: Extern272// CHECK: Type: Undef (0x0)273// CHECK: Section: (0x0)274// CHECK: RefType: ReferenceFlagUndefinedLazy (0x1)275// CHECK: Flags [ (0x20)276// CHECK: NoDeadStrip (0x20)277// CHECK: ]278// CHECK: Value: 0x0279// CHECK: }280// CHECK: Symbol {281// CHECK: Name: sym_no_dead_strip_A (279)282// CHECK: Extern283// CHECK: Type: Undef (0x0)284// CHECK: Section: (0x0)285// CHECK: RefType: UndefinedNonLazy (0x0)286// CHECK: Flags [ (0x20)287// CHECK: NoDeadStrip (0x20)288// CHECK: ]289// CHECK: Value: 0x0290// CHECK: }291// CHECK: Symbol {292// CHECK: Name: sym_private_ext_A (239)293// CHECK: PrivateExtern294// CHECK: Extern295// CHECK: Type: Undef (0x0)296// CHECK: Section: (0x0)297// CHECK: RefType: UndefinedNonLazy (0x0)298// CHECK: Flags [ (0x0)299// CHECK: ]300// CHECK: Value: 0x0301// CHECK: }302// CHECK: Symbol {303// CHECK: Name: sym_private_ext_D (63)304// CHECK: PrivateExtern305// CHECK: Extern306// CHECK: Type: Undef (0x0)307// CHECK: Section: (0x0)308// CHECK: RefType: UndefinedNonLazy (0x0)309// CHECK: Flags [ (0x0)310// CHECK: ]311// CHECK: Value: 0x0312// CHECK: }313// CHECK: Symbol {314// CHECK: Name: sym_private_ext_E (16)315// CHECK: PrivateExtern316// CHECK: Extern317// CHECK: Type: Undef (0x0)318// CHECK: Section: (0x0)319// CHECK: RefType: UndefinedNonLazy (0x0)320// CHECK: Flags [ (0x0)321// CHECK: ]322// CHECK: Value: 0x0323// CHECK: }324// CHECK: Symbol {325// CHECK: Name: sym_ref_A (314)326// CHECK: Extern327// CHECK: Type: Undef (0x0)328// CHECK: Section: (0x0)329// CHECK: RefType: ReferenceFlagPrivateUndefinedNonLazy (0x4)330// CHECK: Flags [ (0x1230)331// CHECK: NoDeadStrip (0x20)332// CHECK: ReferencedDynamically (0x10)333// CHECK: ]334// CHECK: Value: 0x0335// CHECK: }336// CHECK: Symbol {337// CHECK: Name: sym_ref_def_D (96)338// CHECK: Extern339// CHECK: Type: Undef (0x0)340// CHECK: Section: (0x0)341// CHECK: RefType: UndefinedNonLazy (0x0)342// CHECK: Flags [ (0x20)343// CHECK: NoDeadStrip (0x20)344// CHECK: ]345// CHECK: Value: 0x0346// CHECK: }347// CHECK: Symbol {348// CHECK: Name: sym_ref_def_E (49)349// CHECK: Extern350// CHECK: Type: Undef (0x0)351// CHECK: Section: (0x0)352// CHECK: RefType: UndefinedNonLazy (0x0)353// CHECK: Flags [ (0x20)354// CHECK: NoDeadStrip (0x20)355// CHECK: ]356// CHECK: Value: 0x0357// CHECK: }358// CHECK: Symbol {359// CHECK: Name: sym_weak_ref_A (324)360// CHECK: Extern361// CHECK: Type: Undef (0x0)362// CHECK: Section: (0x0)363// CHECK: RefType: UndefinedNonLazy (0x0)364// CHECK: Flags [ (0x40)365// CHECK: WeakRef (0x40)366// CHECK: ]367// CHECK: Value: 0x0368// CHECK: }369// CHECK: ]370// CHECK: Indirect Symbols {371// CHECK: Number: 0372// CHECK: Symbols [373// CHECK: ]374// CHECK: }375// CHECK: Segment {376// CHECK: Cmd: LC_SEGMENT377// CHECK: Name: 378// CHECK: Size: 192379// CHECK: vmaddr: 0x0380// CHECK: vmsize: 0x0381// CHECK: fileoff: 340382// CHECK: filesize: 0383// CHECK: maxprot: rwx384// CHECK: initprot: rwx385// CHECK: nsects: 2386// CHECK: flags: 0x0387// CHECK: }388// CHECK: Dysymtab {389// CHECK: ilocalsym: 0390// CHECK: nlocalsym: 8391// CHECK: iextdefsym: 8392// CHECK: nextdefsym: 5393// CHECK: iundefsym: 13394// CHECK: nundefsym: 11395// CHECK: tocoff: 0396// CHECK: ntoc: 0397// CHECK: modtaboff: 0398// CHECK: nmodtab: 0399// CHECK: extrefsymoff: 0400// CHECK: nextrefsyms: 0401// CHECK: indirectsymoff: 0402// CHECK: nindirectsyms: 0403// CHECK: extreloff: 0404// CHECK: nextrel: 0405// CHECK: locreloff: 0406// CHECK: nlocrel: 0407// CHECK: }408