1// RUN: llvm-mc -n -triple x86_64-apple-darwin9 %s -filetype=obj -o - | llvm-readobj --file-headers -S --sd -r --macho-segment - | FileCheck %s 2 3// Test case for rdar://10062261 4 5// Must be no base, non-temporary, symbol before the reference to Lbar at the 6// start of the section. What we are testing for is that the reference does not 7// create a relocation entry. 8.text 9Ladd: 10 nop 11 jmp Lbar 12 .byte 0x0f,0x1f,0x40,0x00 13 .byte 0x0f,0x1f,0x40,0x00 14Lbar: 15 mov $1, %eax 16 ret 17 18// CHECK: File: <stdin> 19// CHECK: Format: Mach-O 64-bit x86-64 20// CHECK: Arch: x86_64 21// CHECK: AddressSize: 64bit 22// CHECK: MachHeader { 23// CHECK: Magic: Magic64 (0xFEEDFACF) 24// CHECK: CpuType: X86-64 (0x1000007) 25// CHECK: CpuSubType: CPU_SUBTYPE_X86_64_ALL (0x3) 26// CHECK: FileType: Relocatable (0x1) 27// CHECK: NumOfLoadCommands: 2 28// CHECK: SizeOfLoadCommands: 168 29// CHECK: Flags [ (0x0) 30// CHECK: ] 31// CHECK: Reserved: 0x0 32// CHECK: } 33// CHECK: Sections [ 34// CHECK: Section { 35// CHECK: Index: 0 36// CHECK: Name: __text (5F 5F 74 65 78 74 00 00 00 00 00 00 00 00 00 00) 37// CHECK: Segment: __TEXT (5F 5F 54 45 58 54 00 00 00 00 00 00 00 00 00 00) 38// CHECK: Address: 0x0 39// CHECK: Size: 0x11 40// CHECK: Offset: 200 41// CHECK: Alignment: 0 42// CHECK: RelocationOffset: 0x0 43// CHECK: RelocationCount: 0 44// CHECK: Type: Regular (0x0) 45// CHECK: Attributes [ (0x800004) 46// CHECK: PureInstructions (0x800000) 47// CHECK: SomeInstructions (0x4) 48// CHECK: ] 49// CHECK: Reserved1: 0x0 50// CHECK: Reserved2: 0x0 51// CHECK: Reserved3: 0x0 52// CHECK: SectionData ( 53// CHECK: 0000: 90EB080F 1F40000F 1F4000B8 01000000 |.....@...@......| 54// CHECK: 0010: C3 |.| 55// CHECK: ) 56// CHECK: } 57// CHECK: ] 58// CHECK: Relocations [ 59// CHECK: ] 60// CHECK: Segment { 61// CHECK: Cmd: LC_SEGMENT_64 62// CHECK: Name: 63// CHECK: Size: 152 64// CHECK: vmaddr: 0x0 65// CHECK: vmsize: 0x11 66// CHECK: fileoff: 200 67// CHECK: filesize: 17 68// CHECK: maxprot: rwx 69// CHECK: initprot: rwx 70// CHECK: nsects: 1 71// CHECK: flags: 0x0 72// CHECK: } 73