Home | History | Annotate | Download | only in AArch64
      1 // RUN: llvm-mc -triple aarch64-apple-darwin14 %s -filetype=obj -o - | llvm-readobj -r --expand-relocs | FileCheck %s
      2 // FIXME: the final relocation should be internal, but the linker doesn't
      3 // currently handle the it correctly.
      4 
      5 // Test that we "S + K" produce a relocation with a symbol, but just S produces
      6 // a relocation with the section.
      7 
      8 	.section	__TEXT,__literal4,4byte_literals
      9 L0:
     10 	.long	42
     11 
     12 	.section	__TEXT,__cstring,cstring_literals
     13 L1:
     14 	.asciz	"42"
     15 
     16 	.section	__DATA,__data
     17 	.quad	L0
     18 	.quad	L0 + 1
     19 	.quad	L1
     20 	.quad	L1 + 1
     21 
     22 // CHECK:      Relocations [
     23 // CHECK-NEXT:   Section __data {
     24 // CHECK-NEXT:     Relocation {
     25 // CHECK-NEXT:       Offset: 0x18
     26 // CHECK-NEXT:       PCRel: 0
     27 // CHECK-NEXT:       Length: 3
     28 // CHECK-NEXT:       Type: ARM64_RELOC_UNSIGNED (0)
     29 // CHECK-NEXT:       Symbol: L1
     30 // CHECK-NEXT:     }
     31 // CHECK-NEXT:     Relocation {
     32 // CHECK-NEXT:       Offset: 0x10
     33 // CHECK-NEXT:       PCRel: 0
     34 // CHECK-NEXT:       Length: 3
     35 // CHECK-NEXT:       Type: ARM64_RELOC_UNSIGNED (0)
     36 // CHECK-NEXT:       Symbol: L1
     37 // CHECK-NEXT:     }
     38 // CHECK-NEXT:     Relocation {
     39 // CHECK-NEXT:       Offset: 0x8
     40 // CHECK-NEXT:       PCRel: 0
     41 // CHECK-NEXT:       Length: 3
     42 // CHECK-NEXT:       Type: ARM64_RELOC_UNSIGNED (0)
     43 // CHECK-NEXT:       Symbol: L0
     44 // CHECK-NEXT:     }
     45 // CHECK-NEXT:     Relocation {
     46 // CHECK-NEXT:       Offset: 0x0
     47 // CHECK-NEXT:       PCRel: 0
     48 // CHECK-NEXT:       Length: 3
     49 // CHECK-NEXT:       Type: ARM64_RELOC_UNSIGNED (0)
     50 // CHECK-NEXT:       Symbol: L0
     51 // CHECK-NEXT:     }
     52 // CHECK-NEXT:   }
     53 // CHECK-NEXT: ]
     54