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.
5 // Test that we "S + K" produce a relocation with a symbol, but just S produces
6 // a relocation with the section.
8 .section __TEXT,__literal4,4byte_literals
12 .section __TEXT,__cstring,cstring_literals
16 .section __DATA,__data
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
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
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
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