[memprof] Remove an unused using directive (#117004)
[llvm-project.git] / lld / test / ELF / canonical-plt-pcrel.s
blobe2c0b1e2e1be0eb768beba77d3fcf5569bb0bda1
1 # REQUIRES: x86
3 ## Test canonical PLT can be created for -no-pie and -pie.
5 # RUN: llvm-mc -filetype=obj -triple=x86_64 %s -o %t.o
6 # RUN: llvm-mc -filetype=obj -triple=x86_64 %p/Inputs/canonical-plt-pcrel.s -o %t1.o
7 # RUN: ld.lld %t1.o -o %t1.so -shared -soname=so
9 # RUN: ld.lld %t.o %t1.so -o %t
10 # RUN: llvm-readobj -r %t | FileCheck %s
11 # RUN: llvm-objdump -d %t | FileCheck --check-prefix=DISASM %s
13 # RUN: ld.lld %t.o %t1.so -o %t -pie
14 # RUN: llvm-readobj -r %t | FileCheck %s
15 # RUN: llvm-objdump -d %t | FileCheck --check-prefix=DISASM %s
17 # CHECK: Relocations [
18 # CHECK-NEXT: .rela.plt {
19 # CHECK-NEXT: R_X86_64_JUMP_SLOT func 0x0
20 # CHECK-NEXT: R_X86_64_JUMP_SLOT ifunc 0x0
21 # CHECK-NEXT: }
22 # CHECK-NEXT: ]
24 # DISASM: <_start>:
25 # DISASM-NEXT: callq {{.*}} <func@plt>
26 # DISASM-NEXT: callq {{.*}} <ifunc@plt>
28 .globl _start
29 _start:
30 .byte 0xe8
31 .long func - . -4 # STT_FUNC
32 .byte 0xe8
33 .long ifunc - . -4 # STT_GNU_IFUNC