18 lines · plain
1// This test checks that the pointers to PLT are properly updated.2// The test uses lld and links against a DSO to ensure PLT entries.3RUN: %clang %cflags -fpic -shared -xc /dev/null -o %t.so4 5// Non-PIE:6RUN: %clang %cflags -no-pie %p/../Inputs/plt.c %t.so -fuse-ld=lld \7RUN: -o %t.lld.exe -Wl,-q8RUN: llvm-bolt %t.lld.exe -o %t.lld.bolt.exe --use-old-text=0 --lite=09RUN: %t.lld.bolt.exe | FileCheck %s10 11// PIE:12RUN: %clang %cflags -fPIC -pie %p/../Inputs/plt.c %t.so -fuse-ld=lld \13RUN: -o %t.lld.pie.exe -Wl,-q14RUN: llvm-bolt %t.lld.pie.exe -o %t.lld.bolt.pie.exe --use-old-text=0 --lite=015RUN: %t.lld.bolt.pie.exe | FileCheck %s16 17CHECK: Test completed18