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