Run DCE after a LoopFlatten test to reduce spurious output [nfc]
[llvm-project.git] / llvm / test / MC / MachO / AArch64 / ld64-workaround.s
blob8e59b07c9ea5773b27e1a1e362d0d754b258e892
1 ; RUN: llvm-mc -triple arm64-apple-darwin10 %s -filetype=obj -o - | llvm-readobj -r --expand-relocs - | FileCheck %s
3 /// To work around an ld64 arm64 bug before 2015, we used to disable local
4 /// relocations for many pointer-sized relocations. Test that the workaround
5 /// is dropped and the behavior now matches x86-64.
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: Section: __literal16
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: Section: __literal8
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: Section: __literal4
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: ]
40 .section __DATA,__cfstring
41 Lcfstring:
43 .section __DATA,__literal4,4byte_literals
44 Llit4:
45 .word 42
47 .section __DATA,__literal8,8byte_literals
48 Llit8:
49 .quad 42
51 .section __DATA,__literal16,16byte_literals
52 Llit16:
53 .quad 42
54 .quad 42
56 .section __DATA,__data
57 .quad Lcfstring
58 .quad Llit4
59 .quad Llit8
60 .quad Llit16