1# REQUIRES: x86 2# RUN: llvm-mc -filetype=obj -relax-relocations=false -triple=x86_64-unknown-linux %s -o %t.o 3# RUN: ld.lld --hash-style=sysv -pie %t.o -o %t 4# RUN: llvm-readobj -r %t | FileCheck --check-prefix=RELOCS %s 5# RUN: llvm-objdump -d %t | FileCheck --check-prefix=DISASM %s 6 7# RELOCS: Relocations [ 8# RELOCS-NEXT: Section ({{.*}}) .rela.dyn { 9# RELOCS-NEXT: R_X86_64_GLOB_DAT foo 0x0 10# RELOCS-NEXT: } 11# RELOCS-NEXT: ] 12 13.weak foo 14 15.globl _start 16_start: 17# DISASM: _start: 18# DISASM-NEXT: 1000: 48 8b 05 99 10 00 00 movq 4249(%rip), %rax 19# ^ .got - (.text + 7) 20mov foo@gotpcrel(%rip), %rax 21