Run DCE after a LoopFlatten test to reduce spurious output [nfc]
[llvm-project.git] / lld / test / ELF / weak-undef-got-pie.s
blobc695ecdbafb12ef20cbbe26b593f8ff1028f72fd
1 # REQUIRES: x86
2 # RUN: llvm-mc -filetype=obj -triple=x86_64 %p/Inputs/dummy-shared.s -o %t1.o
3 # RUN: ld.lld %t1.o -shared -o %t1.so
4 # RUN: llvm-mc -filetype=obj -relax-relocations=false -triple=x86_64 %s -o %t.o
6 # RUN: ld.lld -pie %t.o %t1.so -o %t
7 # RUN: llvm-readobj -r %t | FileCheck --check-prefix=RELOCS %s
8 # RUN: llvm-objdump -d --no-show-raw-insn %t | FileCheck --check-prefix=DISASM %s
10 # RELOCS: Relocations [
11 # RELOCS-NEXT: Section ({{.*}}) .rela.dyn {
12 # RELOCS-NEXT: R_X86_64_GLOB_DAT foo 0x0
13 # RELOCS-NEXT: }
14 # RELOCS-NEXT: ]
16 .weak foo
18 .globl _start
19 _start:
20 # DISASM: <_start>:
21 # DISASM-NEXT: movq {{.*}}(%rip), %rax
22 mov foo@gotpcrel(%rip), %rax