1// REQUIRES: x86 2 3// RUN: llvm-mc -filetype=obj -triple=x86_64-unknown-linux %p/Inputs/shared.s -o %t1.o 4// RUN: ld.lld -o %t.so -shared %t1.o -soname=so 5 6// RUN: llvm-mc -filetype=obj -triple=x86_64-unknown-linux %s -o %t2.o 7// RUN: ld.lld -o %t1.exe %t2.o %t.so -image-base=0xcafe00000000 8// RUN: llvm-objdump -s -j .got.plt %t1.exe | FileCheck %s 9 10// CHECK: Contents of section .got.plt: 11// CHECK-NEXT: cafe00003380 b0220000 feca0000 00000000 00000000 12// CHECK-NEXT: cafe00003390 00000000 00000000 a6120000 feca0000 13 14// RUN: llvm-mc -filetype=obj -triple=x86_64-unknown-linux %s -o %t2.o 15// RUN: ld.lld -o %t2.exe %t2.o %t.so -image-base=0xcafe00000000 -z retpolineplt 16// RUN: llvm-objdump -s -j .got.plt %t2.exe | FileCheck --check-prefix=RETPOLINE %s 17 18// RETPOLINE: Contents of section .got.plt: 19// RETPOLINE-NEXT: cafe000033b0 e0220000 feca0000 00000000 00000000 20// RETPOLINE-NEXT: cafe000033c0 00000000 00000000 d1120000 feca0000 21 22.global _start 23_start: 24 jmp bar@PLT 25