[ThinLTO] Add code comment. NFC
[llvm-complete.git] / test / MC / MachO / x86_64-mergeable.s
blobb7933f92c0c4f2503d7ecd2f50a84451d2fdb32b
1 // RUN: llvm-mc -triple x86_64-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: X86_64_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: X86_64_RELOC_UNSIGNED (0)
34 // CHECK-NEXT: Section: __cstring (3)
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: X86_64_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: X86_64_RELOC_UNSIGNED (0)
48 // CHECK-NEXT: Section: __literal4 (2)
49 // CHECK-NEXT: }
50 // CHECK-NEXT: }
51 // CHECK-NEXT: ]