73 lines · plain
1// RUN: llvm-mc -n -triple x86_64-apple-darwin9 %s -filetype=obj -o - | llvm-readobj --file-headers -S --sd -r --macho-segment - | FileCheck %s2 3// Test case for rdar://100622614 5// Must be no base, non-temporary, symbol before the reference to Lbar at the6// start of the section. What we are testing for is that the reference does not7// create a relocation entry.8.text9Ladd:10 nop11 jmp Lbar12 .byte 0x0f,0x1f,0x40,0x0013 .byte 0x0f,0x1f,0x40,0x0014Lbar: 15 mov $1, %eax16 ret17 18// CHECK: File: <stdin>19// CHECK: Format: Mach-O 64-bit x86-6420// CHECK: Arch: x86_6421// CHECK: AddressSize: 64bit22// 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: 228// CHECK: SizeOfLoadCommands: 16829// CHECK: Flags [ (0x0)30// CHECK: ]31// CHECK: Reserved: 0x032// CHECK: }33// CHECK: Sections [34// CHECK: Section {35// CHECK: Index: 036// 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: 0x039// CHECK: Size: 0x1140// CHECK: Offset: 20041// CHECK: Alignment: 042// CHECK: RelocationOffset: 0x043// CHECK: RelocationCount: 044// CHECK: Type: Regular (0x0)45// CHECK: Attributes [ (0x800004)46// CHECK: PureInstructions (0x800000)47// CHECK: SomeInstructions (0x4)48// CHECK: ]49// CHECK: Reserved1: 0x050// CHECK: Reserved2: 0x051// CHECK: Reserved3: 0x052// 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_6462// CHECK: Name: 63// CHECK: Size: 15264// CHECK: vmaddr: 0x065// CHECK: vmsize: 0x1166// CHECK: fileoff: 20067// CHECK: filesize: 1768// CHECK: maxprot: rwx69// CHECK: initprot: rwx70// CHECK: nsects: 171// CHECK: flags: 0x072// CHECK: }73