Run DCE after a LoopFlatten test to reduce spurious output [nfc]
[llvm-project.git] / lld / test / ELF / x86-64-dyn-rel-error.s
blob8f41f1493dde7b278441ccb975b2aa6b6a77802b
1 // REQUIRES: x86
2 // RUN: llvm-mc -filetype=obj -triple=x86_64-pc-linux %s -o %t.o
3 // RUN: llvm-mc -filetype=obj -triple=x86_64-pc-linux %p/Inputs/shared.s -o %t2.o
4 // RUN: ld.lld %t2.o -shared -o %t2.so
5 // RUN: not ld.lld -shared %t.o %t2.so -o /dev/null 2>&1 | FileCheck %s
7 .global _start
8 _start:
9 .data
10 .long zed
12 // CHECK: error: relocation R_X86_64_32 cannot be used against symbol 'zed'; recompile with -fPIC
14 // RUN: ld.lld --noinhibit-exec %t.o %t2.so -o /dev/null 2>&1 | FileCheck --check-prefix=WARN %s
15 // RUN: not ld.lld --export-dynamic --unresolved-symbols=ignore-all %t.o -o /dev/null 2>&1 | FileCheck --check-prefix=WARN %s
17 // WARN: relocation R_X86_64_32 cannot be used against symbol 'zed'; recompile with -fPIC