1// RUN: llvm-mc -triple i386-apple-darwin9 %s -filetype=obj -o - | llvm-readobj -file-headers -s -r -t -macho-segment -macho-dysymtab -macho-indirect-symbols | FileCheck %s 2 3 .comm sym_comm_B, 2 4 .comm sym_comm_A, 4 5 .comm sym_comm_C, 8, 2 6 .comm sym_comm_D, 2, 3 7 8 .no_dead_strip sym_comm_C 9 10// CHECK: File: <stdin> 11// CHECK: Format: Mach-O 32-bit i386 12// CHECK: Arch: i386 13// CHECK: AddressSize: 32bit 14// CHECK: MachHeader { 15// CHECK: Magic: Magic (0xFEEDFACE) 16// CHECK: CpuType: X86 (0x7) 17// CHECK: CpuSubType: CPU_SUBTYPE_I386_ALL (0x3) 18// CHECK: FileType: Relocatable (0x1) 19// CHECK: NumOfLoadCommands: 4 20// CHECK: SizeOfLoadCommands: 244 21// CHECK: Flags [ (0x0) 22// CHECK: ] 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: 0x0 31// CHECK: Offset: 272 32// CHECK: Alignment: 0 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: } 42// CHECK: ] 43// CHECK: Relocations [ 44// CHECK: ] 45// CHECK: Symbols [ 46// CHECK: Symbol { 47// CHECK: Name: sym_comm_A (34) 48// CHECK: Extern 49// CHECK: Type: Undef (0x0) 50// CHECK: Section: (0x0) 51// CHECK: RefType: UndefinedNonLazy (0x0) 52// CHECK: Flags [ (0x0) 53// CHECK: ] 54// CHECK: Value: 0x4 55// CHECK: } 56// CHECK: Symbol { 57// CHECK: Name: sym_comm_B (23) 58// CHECK: Extern 59// CHECK: Type: Undef (0x0) 60// CHECK: Section: (0x0) 61// CHECK: RefType: UndefinedNonLazy (0x0) 62// CHECK: Flags [ (0x0) 63// CHECK: ] 64// CHECK: Value: 0x2 65// CHECK: } 66// CHECK: Symbol { 67// CHECK: Name: sym_comm_C (12) 68// CHECK: Extern 69// CHECK: Type: Undef (0x0) 70// CHECK: Section: (0x0) 71// CHECK: RefType: UndefinedNonLazy (0x0) 72// CHECK: Flags [ (0x220) 73// CHECK: NoDeadStrip (0x20) 74// CHECK: ] 75// CHECK: Value: 0x8 76// CHECK: } 77// CHECK: Symbol { 78// CHECK: Name: sym_comm_D (1) 79// CHECK: Extern 80// CHECK: Type: Undef (0x0) 81// CHECK: Section: (0x0) 82// CHECK: RefType: UndefinedNonLazy (0x0) 83// CHECK: Flags [ (0x300) 84// CHECK: ] 85// CHECK: Value: 0x2 86// CHECK: } 87// CHECK: ] 88// CHECK: Indirect Symbols { 89// CHECK: Number: 0 90// CHECK: Symbols [ 91// CHECK: ] 92// CHECK: } 93// CHECK: Segment { 94// CHECK: Cmd: LC_SEGMENT 95// CHECK: Name: 96// CHECK: Size: 124 97// CHECK: vmaddr: 0x0 98// CHECK: vmsize: 0x0 99// CHECK: fileoff: 272 100// CHECK: filesize: 0 101// CHECK: maxprot: rwx 102// CHECK: initprot: rwx 103// CHECK: nsects: 1 104// CHECK: flags: 0x0 105// CHECK: } 106// CHECK: Dysymtab { 107// CHECK: ilocalsym: 0 108// CHECK: nlocalsym: 0 109// CHECK: iextdefsym: 0 110// CHECK: nextdefsym: 0 111// CHECK: iundefsym: 0 112// CHECK: nundefsym: 4 113// CHECK: tocoff: 0 114// CHECK: ntoc: 0 115// CHECK: modtaboff: 0 116// CHECK: nmodtab: 0 117// CHECK: extrefsymoff: 0 118// CHECK: nextrefsyms: 0 119// CHECK: indirectsymoff: 0 120// CHECK: nindirectsyms: 0 121// CHECK: extreloff: 0 122// CHECK: nextrel: 0 123// CHECK: locreloff: 0 124// CHECK: nlocrel: 0 125// CHECK: } 126