[X86][MC,LLD][NFC] Rename R_X86_64_REX2_GOTPCRELX (#116737)
[llvm-project.git] / llvm / test / MC / MachO / AArch64 / mergeable.s
blob4aa2d0136eed27039add0676bbc87b1c6881de11
1 // RUN: llvm-mc -triple aarch64-apple-darwin14 %s -filetype=obj -o - | llvm-readobj -r --expand-relocs - | FileCheck %s
3 // Test that we "S + K" produce a relocation with a symbol, but just S produces
4 // a relocation with the section.
6 .section __TEXT,__literal4,4byte_literals
7 L0:
8 .long 42
10 .section __TEXT,__cstring,cstring_literals
11 L1:
12 .asciz "42"
14 .section __DATA,__data
15 .quad L0
16 .quad L0 + 1
17 .quad L1
18 .quad L1 + 1
20 // CHECK: Relocations [
21 // CHECK-NEXT: Section __data {
22 // CHECK-NEXT: Relocation {
23 // CHECK-NEXT: Offset: 0x18
24 // CHECK-NEXT: PCRel: 0
25 // CHECK-NEXT: Length: 3
26 // CHECK-NEXT: Type: ARM64_RELOC_UNSIGNED (0)
27 // CHECK-NEXT: Symbol: L1
28 // CHECK-NEXT: }
29 // CHECK-NEXT: Relocation {
30 // CHECK-NEXT: Offset: 0x10
31 // CHECK-NEXT: PCRel: 0
32 // CHECK-NEXT: Length: 3
33 // CHECK-NEXT: Type: ARM64_RELOC_UNSIGNED (0)
34 // CHECK-NEXT: Symbol: L1
35 // CHECK-NEXT: }
36 // CHECK-NEXT: Relocation {
37 // CHECK-NEXT: Offset: 0x8
38 // CHECK-NEXT: PCRel: 0
39 // CHECK-NEXT: Length: 3
40 // CHECK-NEXT: Type: ARM64_RELOC_UNSIGNED (0)
41 // CHECK-NEXT: Symbol: L0
42 // CHECK-NEXT: }
43 // CHECK-NEXT: Relocation {
44 // CHECK-NEXT: Offset: 0x0
45 // CHECK-NEXT: PCRel: 0
46 // CHECK-NEXT: Length: 3
47 // CHECK-NEXT: Type: ARM64_RELOC_UNSIGNED (0)
48 // CHECK-NEXT: Section: __literal4
49 // CHECK-NEXT: }
50 // CHECK-NEXT: }
51 // CHECK-NEXT: ]