1// REQUIRES: x86 2// RUN: llvm-mc -filetype=obj -triple=x86_64-unknown-linux %s -o %t.o 3// RUN: ld.lld %t.o -o %t -shared 4// RUN: llvm-readobj -S -d -r %t | FileCheck %s 5// RUN: llvm-objdump -d --no-show-raw-insn %t | FileCheck --check-prefix=DISASM %s 6 7bar: 8 call foo@gotpcrel 9 10 .hidden foo 11 .global foo 12foo: 13 nop 14 15// 0x22E0 - 0x1228 - 5 = 4275 16// DISASM: <bar>: 17// DISASM-NEXT: 1228: callq 0x22e0 18 19// DISASM: <foo>: 20// DISASM-NEXT: 122d: nop 21 22// CHECK: Name: .got 23// CHECK-NEXT: Type: SHT_PROGBITS 24// CHECK-NEXT: Flags [ 25// CHECK-NEXT: SHF_ALLOC 26// CHECK-NEXT: SHF_WRITE 27// CHECK-NEXT: ] 28// CHECK-NEXT: Address: 0x22E0 29// CHECK-NEXT: Offset: 30// CHECK-NEXT: Size: 8 31 32// CHECK: 0x000000006FFFFFF9 RELACOUNT 1 33 34// CHECK: Relocations [ 35// CHECK-NEXT: Section ({{.*}}) .rela.dyn { 36// CHECK-NEXT: 0x22E0 R_X86_64_RELATIVE - 0x122D 37// CHECK-NEXT: } 38// CHECK-NEXT: ] 39