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 5 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 9 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: ] 15 16.weak foo 17 18.globl _start 19_start: 20# DISASM: <_start>: 21# DISASM-NEXT: movq {{.*}}(%rip), %rax 22mov foo@gotpcrel(%rip), %rax 23