view lld/test/ELF/x86-64-reloc-gotpc64.s @ 266:00f31e85ec16 default tip

Added tag current for changeset 31d058e83c98
author Shinji KONO <kono@ie.u-ryukyu.ac.jp>
date Sat, 14 Oct 2023 10:13:55 +0900
parents c4bab56944e8
children
line wrap: on
line source

// 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
// RUN: llvm-readelf -S %t.so | FileCheck %s -check-prefix=SECTION
// RUN: llvm-objdump --no-print-imm-hex -d %t.so | FileCheck %s

// SECTION: .got.plt PROGBITS 00000000000032f0 0002f0 000018

// 0x3300 (.got.plt) - 0x1274 = 8316
// CHECK: <gotpc64>:
// CHECK-NEXT: 1274: {{.*}} movabsq $8316, %r11
.global gotpc64
gotpc64:
  movabsq $_GLOBAL_OFFSET_TABLE_-., %r11