1// RUN: llvm-mc -triple i386-apple-darwin9 %s -filetype=obj -o - | llvm-readobj --file-headers -S --sd -r --macho-segment --macho-version-min - | FileCheck %s 2 3 .section __TEXT,__text,regular,pure_instructions 4Leh_func_begin0: 5 .section __TEXT,__eh_frame,coalesced,no_toc+strip_static_syms+live_support 6Ltmp3: 7Ltmp4 = Leh_func_begin0-Ltmp3 8 .long Ltmp4 9 10// CHECK: File: <stdin> 11// CHECK-NEXT: Format: Mach-O 32-bit i386 12// CHECK-NEXT: Arch: i386 13// CHECK-NEXT: AddressSize: 32bit 14// CHECK-NEXT: MachHeader { 15// CHECK-NEXT: Magic: Magic (0xFEEDFACE) 16// CHECK-NEXT: CpuType: X86 (0x7) 17// CHECK-NEXT: CpuSubType: CPU_SUBTYPE_I386_ALL (0x3) 18// CHECK-NEXT: FileType: Relocatable (0x1) 19// CHECK-NEXT: NumOfLoadCommands: 2 20// CHECK-NEXT: SizeOfLoadCommands: 208 21// CHECK-NEXT: Flags [ (0x0) 22// CHECK-NEXT: ] 23// CHECK-NEXT: } 24// CHECK-NEXT: Sections [ 25// CHECK-NEXT: Section { 26// CHECK-NEXT: Index: 0 27// CHECK-NEXT: Name: __text (5F 5F 74 65 78 74 00 00 00 00 00 00 00 00 00 00) 28// CHECK-NEXT: Segment: __TEXT (5F 5F 54 45 58 54 00 00 00 00 00 00 00 00 00 00) 29// CHECK-NEXT: Address: 0x0 30// CHECK-NEXT: Size: 0x0 31// CHECK-NEXT: Offset: 236 32// CHECK-NEXT: Alignment: 0 33// CHECK-NEXT: RelocationOffset: 0x0 34// CHECK-NEXT: RelocationCount: 0 35// CHECK-NEXT: Type: Regular (0x0) 36// CHECK-NEXT: Attributes [ (0x800000) 37// CHECK-NEXT: PureInstructions (0x800000) 38// CHECK-NEXT: ] 39// CHECK-NEXT: Reserved1: 0x0 40// CHECK-NEXT: Reserved2: 0x0 41// CHECK-NEXT: SectionData ( 42// CHECK-NEXT: ) 43// CHECK-NEXT: } 44// CHECK-NEXT: Section { 45// CHECK-NEXT: Index: 1 46// CHECK-NEXT: Name: __eh_frame (5F 5F 65 68 5F 66 72 61 6D 65 00 00 00 00 00 00) 47// CHECK-NEXT: Segment: __TEXT (5F 5F 54 45 58 54 00 00 00 00 00 00 00 00 00 00) 48// CHECK-NEXT: Address: 0x0 49// CHECK-NEXT: Size: 0x4 50// CHECK-NEXT: Offset: 236 51// CHECK-NEXT: Alignment: 0 52// CHECK-NEXT: RelocationOffset: 0x0 53// CHECK-NEXT: RelocationCount: 0 54// CHECK-NEXT: Type: Coalesced (0xB) 55// CHECK-NEXT: Attributes [ (0x680000) 56// CHECK-NEXT: LiveSupport (0x80000) 57// CHECK-NEXT: NoTOC (0x400000) 58// CHECK-NEXT: StripStaticSyms (0x200000) 59// CHECK-NEXT: ] 60// CHECK-NEXT: Reserved1: 0x0 61// CHECK-NEXT: Reserved2: 0x0 62// CHECK-NEXT: SectionData ( 63// CHECK-NEXT: 0000: 00000000 |....| 64// CHECK-NEXT: ) 65// CHECK-NEXT: } 66// CHECK-NEXT: ] 67// CHECK-NEXT: Relocations [ 68// CHECK-NEXT: ] 69// CHECK-NEXT: Segment { 70// CHECK-NEXT: Cmd: LC_SEGMENT 71// CHECK-NEXT: Name: 72// CHECK-NEXT: Size: 192 73// CHECK-NEXT: vmaddr: 0x0 74// CHECK-NEXT: vmsize: 0x4 75// CHECK-NEXT: fileoff: 236 76// CHECK-NEXT: filesize: 4 77// CHECK-NEXT: maxprot: rwx 78// CHECK-NEXT: initprot: rwx 79// CHECK-NEXT: nsects: 2 80// CHECK-NEXT: flags: 0x0 81// CHECK-NEXT: } 82// CHECK-NEXT: MinVersion { 83// CHECK-NEXT: Cmd: LC_VERSION_MIN_MACOSX 84// CHECK-NEXT: Size: 16 85// CHECK-NEXT: Version: 10.5 86// CHECK-NEXT: SDK: n/a 87// CHECK-NEXT: } 88