1# REQUIRES: x86
2# RUN: llvm-mc -filetype=obj -triple=x86_64-unknown-linux %s -o %t.o
3# RUN: ld.lld -z retpolineplt -z now %t.o -o %t
4# RUN: llvm-objdump -d --no-show-raw-insn %t | FileCheck %s
5
6#0x2011a9+5 + 34 = 0x2011d0 (foo@plt)
7# CHECK:      <_start>:
8# CHECK-NEXT:  2011a9:       callq   0x2011d0
9
10#Static IPLT header due to -z retpolineplt
11# CHECK:       00000000002011b0 <.plt>:
12# CHECK-NEXT:  2011b0:       callq   0x2011c0 <.plt+0x10>
13# CHECK-NEXT:  2011b5:       pause
14# CHECK-NEXT:  2011b7:       lfence
15#foo@plt
16# CHECK:       2011d0:       movq    4105(%rip), %r11
17# CHECK-NEXT:  2011d7:       jmp     0x2011b0 <.plt>
18
19.type foo STT_GNU_IFUNC
20.globl foo
21foo:
22  ret
23
24.globl _start
25_start:
26  call foo
27