2018-06-13 04:18:41 +08:00
|
|
|
// REQUIRES: x86
|
|
|
|
// RUN: llvm-mc -filetype=obj -triple=x86_64-pc-linux %s -o %t.o
|
|
|
|
// RUN: ld.lld %t.o -shared -o %t.so
|
2018-11-06 04:39:06 +08:00
|
|
|
// RUN: llvm-readelf -S %t.so | FileCheck %s -check-prefix=SECTION
|
2018-06-13 04:18:41 +08:00
|
|
|
// RUN: llvm-objdump -d %t.so | FileCheck %s
|
|
|
|
|
2019-09-16 15:05:34 +08:00
|
|
|
// SECTION: .got.plt PROGBITS 00000000000032f0 0002f0 000018
|
2018-06-13 04:18:41 +08:00
|
|
|
|
2019-09-16 15:05:34 +08:00
|
|
|
// 0x3300 (.got.plt) - 0x1274 = 8316
|
2018-06-13 04:18:41 +08:00
|
|
|
// CHECK: gotpc64:
|
2019-09-16 15:05:34 +08:00
|
|
|
// CHECK-NEXT: 1274: {{.*}} movabsq $8316, %r11
|
2018-06-13 04:18:41 +08:00
|
|
|
.global gotpc64
|
|
|
|
gotpc64:
|
|
|
|
movabsq $_GLOBAL_OFFSET_TABLE_-., %r11
|