1; RUN: llvm-mc -triple arm64-apple-darwin10 %s -filetype=obj -o - | llvm-readobj -r --expand-relocs | FileCheck %s 2 3; Test that we produce an external relocation. This is a known and temporary bug 4; in ld64, where it mishandles pointer-sized internal relocations. We should be 5; able to remove this entirely soon. 6 7// CHECK: Relocations [ 8// CHECK-NEXT: Section __data { 9// CHECK-NEXT: Relocation { 10// CHECK-NEXT: Offset: 0x18 11// CHECK-NEXT: PCRel: 0 12// CHECK-NEXT: Length: 3 13// CHECK-NEXT: Type: ARM64_RELOC_UNSIGNED (0) 14// CHECK-NEXT: Symbol: Llit16 15// CHECK-NEXT: } 16// CHECK-NEXT: Relocation { 17// CHECK-NEXT: Offset: 0x10 18// CHECK-NEXT: PCRel: 0 19// CHECK-NEXT: Length: 3 20// CHECK-NEXT: Type: ARM64_RELOC_UNSIGNED (0) 21// CHECK-NEXT: Symbol: Llit8 22// CHECK-NEXT: } 23// CHECK-NEXT: Relocation { 24// CHECK-NEXT: Offset: 0x8 25// CHECK-NEXT: PCRel: 0 26// CHECK-NEXT: Length: 3 27// CHECK-NEXT: Type: ARM64_RELOC_UNSIGNED (0) 28// CHECK-NEXT: Symbol: Llit4 29// CHECK-NEXT: } 30// CHECK-NEXT: Relocation { 31// CHECK-NEXT: Offset: 0x0 32// CHECK-NEXT: PCRel: 0 33// CHECK-NEXT: Length: 3 34// CHECK-NEXT: Type: ARM64_RELOC_UNSIGNED (0) 35// CHECK-NEXT: Symbol: Lcfstring 36// CHECK-NEXT: } 37// CHECK-NEXT: } 38// CHECK-NEXT: ] 39 40 .section __DATA,__cfstring 41Lcfstring: 42 43 .section __DATA,__literal4,4byte_literals 44Llit4: 45 .word 42 46 47 .section __DATA,__literal8,8byte_literals 48Llit8: 49 .quad 42 50 51 .section __DATA,__literal16,16byte_literals 52Llit16: 53 .quad 42 54 .quad 42 55 56 .section __DATA,__data 57 .quad Lcfstring 58 .quad Llit4 59 .quad Llit8 60 .quad Llit16 61