Rafael Espindola | 6fcbbcb | 2016-06-17 17:01:38 +0000 | [diff] [blame] | 1 | # RUN: llvm-mc -filetype=obj -relax-relocations=false -triple=x86_64-unknown-linux %s -o %t.o |
Peter Collingbourne | 1f71d74 | 2016-04-13 02:24:48 +0000 | [diff] [blame] | 2 | # 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) |
| 16 | mov foo@gotpcrel(%rip), %rax |