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
26 .reloc ., R_X86_64_32, .text-1