blob: e74bcdfc09c0a81f61316ff2050816532619508c [file] [log] [blame]
Rafael Espindola6fcbbcb2016-06-17 17:01:38 +00001# RUN: llvm-mc -filetype=obj -relax-relocations=false -triple=x86_64-unknown-linux %s -o %t.o
Peter Collingbourne1f71d742016-04-13 02:24:48 +00002# RUN: ld.lld -pie %t.o -o %t
3# RUN: llvm-readobj -r %t | FileCheck --check-prefix=RELOCS %s
4# RUN: llvm-objdump -d %t | FileCheck --check-prefix=DISASM %s
5
6# RELOCS: Relocations [
7# RELOCS-NEXT: ]
8
9.weak foo
10
11.globl _start
12_start:
13# DISASM: _start:
14# DISASM-NEXT: 1000: 48 8b 05 69 10 00 00 movq 4201(%rip), %rax
15# ^ .got - (.text + 7)
16mov foo@gotpcrel(%rip), %rax