]> CyberLeo.Net >> Repos - FreeBSD/FreeBSD.git/blob - test/ELF/x86-64-reloc-gotpc64.s
Vendor import of lld trunk r338150:
[FreeBSD/FreeBSD.git] / test / ELF / x86-64-reloc-gotpc64.s
1 // REQUIRES: x86
2 // RUN: llvm-mc -filetype=obj -triple=x86_64-pc-linux %s -o %t.o
3 // RUN: ld.lld %t.o -shared -o %t.so
4 // RUN: llvm-readelf -s %t.so | FileCheck %s -check-prefix=SECTION
5 // RUN: llvm-objdump -d %t.so | FileCheck %s
6
7 // SECTION: .got PROGBITS 0000000000003070 003070 000000
8
9 // 0x3070 (.got end) - 0x1000 = 8304
10 // CHECK: gotpc64:
11 // CHECK-NEXT: 1000: {{.*}} movabsq $8304, %r11
12 .global gotpc64
13 gotpc64:
14   movabsq $_GLOBAL_OFFSET_TABLE_-., %r11