34 lines · plain
1# REQUIRES: x862 3## Test canonical PLT can be created for -no-pie and -pie.4 5# RUN: llvm-mc -filetype=obj -triple=x86_64 %s -o %t.o6# RUN: llvm-mc -filetype=obj -triple=x86_64 %p/Inputs/canonical-plt-pcrel.s -o %t1.o7# RUN: ld.lld %t1.o -o %t1.so -shared -soname=so8 9# RUN: ld.lld %t.o %t1.so -o %t10# RUN: llvm-readobj -r %t | FileCheck %s11# RUN: llvm-objdump -d %t | FileCheck --check-prefix=DISASM %s12 13# RUN: ld.lld %t.o %t1.so -o %t -pie14# RUN: llvm-readobj -r %t | FileCheck %s15# RUN: llvm-objdump -d %t | FileCheck --check-prefix=DISASM %s16 17# CHECK: Relocations [18# CHECK-NEXT: .rela.plt {19# CHECK-NEXT: R_X86_64_JUMP_SLOT func 0x020# CHECK-NEXT: R_X86_64_JUMP_SLOT ifunc 0x021# CHECK-NEXT: }22# CHECK-NEXT: ]23 24# DISASM: <_start>:25# DISASM-NEXT: callq {{.*}} <func@plt>26# DISASM-NEXT: callq {{.*}} <ifunc@plt>27 28.globl _start29_start:30 .byte 0xe831 .long func - . -4 # STT_FUNC32 .byte 0xe833 .long ifunc - . -4 # STT_GNU_IFUNC34