Run DCE after a LoopFlatten test to reduce spurious output [nfc]
[llvm-project.git] / lld / test / ELF / x86-64-reloc-32.s
blob70a46301ad24a4b42508af6b712bf259cbfa463b
1 # REQUIRES: x86
2 # RUN: rm -rf %t && split-file %s %t
4 ## Check recompile with -fPIC error message
5 # RUN: llvm-mc -filetype=obj -triple=x86_64-unknown-linux %t/shared.s -o %t/shared.o
6 # RUN: not ld.lld -shared %t/shared.o -o /dev/null 2>&1 | FileCheck %s
8 # CHECK: error: relocation R_X86_64_32 cannot be used against symbol '_shared'; recompile with -fPIC
9 # CHECK: >>> defined in {{.*}}
10 # CHECK: >>> referenced by {{.*}}:(.data+0x0)
12 ## Check patching of negative addends
13 # RUN: llvm-mc -filetype=obj -triple=x86_64 %t/addend.s -o %t/addend.o
14 # RUN: not ld.lld --section-start=.text=0x0 %t/addend.o -o /dev/null 2>&1 | FileCheck %s --check-prefix RANGE
16 # RANGE: relocation R_X86_64_32 out of range
18 #--- shared.s
19 .data
20 .long _shared
22 #--- addend.s
23 .text
24 .globl _start
25 _start:
26 .reloc ., R_X86_64_32, .text-1
27 .space 4