File tree Expand file tree Collapse file tree 7 files changed +22
-9
lines changed Expand file tree Collapse file tree 7 files changed +22
-9
lines changed Original file line number Diff line number Diff line change 22
33// REQUIRES: system-linux
44
5- // RUN: %clangxx %cxxflags -O1 -Wl,-q,-znow %s -o %t.exe
5+ // RUN: %clang %cflags -fpic -shared -xc /dev/null -o %t.so
6+ // Link against a DSO to ensure PLT entries.
7+ // RUN: %clangxx %cxxflags -O1 -Wl,-q,-znow %s %t.so -o %t.exe
68// RUN: llvm-bolt %t.exe -o %t.bolt.exe --plt=all --print-only=.*main.* \
79// RUN: --print-finalized 2>&1 | FileCheck %s
810
Original file line number Diff line number Diff line change 11// Verify that PLTCall optimization works.
22
3- RUN: %clang %cflags %p/../Inputs/plt-tailcall.c \
3+ RUN: %clang %cflags -fpic -shared -xc /dev/null -o %t.so
4+ // Link against a DSO to ensure PLT entries.
5+ RUN: %clang %cflags %p/../Inputs/plt-tailcall.c %t.so \
46RUN: -o %t -Wl,-q
57RUN: llvm-bolt %t -o %t.bolt --plt=all --print-plt --print-only=foo | FileCheck %s
68
Original file line number Diff line number Diff line change 11## Ensures that a call continuation fallthrough count is set when using
22## pre-aggregated perf data.
33
4- # RUN: %clangxx %cxxflags %s -o %t -Wl,-q -nostdlib
4+ # RUN: %clang %cflags -fpic -shared -xc /dev/null -o %t.so
5+ ## Link against a DSO to ensure PLT entries.
6+ # RUN: %clangxx %cxxflags %s %t.so -o %t -Wl,-q -nostdlib
57# RUN: link_fdata %s %t %t.pa1 PREAGG
68# RUN: link_fdata %s %t %t.pa2 PREAGG2
79# RUN: link_fdata %s %t %t.pa3 PREAGG3
Original file line number Diff line number Diff line change 33
44# RUN: llvm-mc -filetype=obj -triple x86_64-unknown-unknown %s -o %t.o
55# RUN: llvm-strip --strip-unneeded %t.o
6- # RUN: %clangxx %cflags %t.o -o %t.exe
6+ # RUN: %clang %cflags -fpic -shared -xc /dev/null -o %t.so
7+ ## Link against a DSO to ensure PLT entries.
8+ # RUN: %clangxx %cflags %t.o %t.so -o %t.exe
79# RUN: llvm-bolt %t.exe -o %t --reorder-blocks=cache --print-after-lowering \
810# RUN: --print-only=_Z10SolveCubicddddPiPd 2>&1 | FileCheck %s
911#
Original file line number Diff line number Diff line change 11// Verify that PLTCall optimization works.
22
3- RUN: %clang %cflags %p/../Inputs/plt-tailcall.c \
3+ RUN: %clang %cflags -fpic -shared -xc /dev/null -o %t.so
4+ // Link against a DSO to ensure PLT entries.
5+ RUN: %clang %cflags %p/../Inputs/plt-tailcall.c %t.so \
46RUN: -o %t -Wl,-q
57RUN: llvm-bolt %t -o %t.bolt --plt=all --print-plt --print-only=foo | FileCheck %s
68
Original file line number Diff line number Diff line change 22
33// REQUIRES: system-linux
44
5- // RUN: %clangxx %cxxflags -O1 -Wl,-q,-znow %s -o %t.exe
5+ // RUN: %clang %cflags -fpic -shared -xc /dev/null -o %t.so
6+ // Link against a DSO to ensure PLT entries.
7+ // RUN: %clangxx %cxxflags -O1 -Wl,-q,-znow %s %t.so -o %t.exe
68// RUN: llvm-bolt %t.exe -o %t.bolt.exe --plt=all
79// RUN: %t.bolt.exe
810
Original file line number Diff line number Diff line change 11// This test checks that the pointers to PLT are properly updated.
2- // The test is using lld linker.
2+ // The test uses lld and links against a DSO to ensure PLT entries.
3+ RUN: %clang %cflags -fpic -shared -xc /dev/null -o %t.so
34
45// Non-PIE:
5- RUN: %clang %cflags -no-pie %p/../Inputs/plt.c -fuse-ld=lld \
6+ RUN: %clang %cflags -no-pie %p/../Inputs/plt.c %t.so -fuse-ld=lld \
67RUN: -o %t.lld.exe -Wl,-q
78RUN: llvm-bolt %t.lld.exe -o %t.lld.bolt.exe --use-old-text=0 --lite=0
89RUN: %t.lld.bolt.exe | FileCheck %s
910
1011// PIE:
11- RUN: %clang %cflags -fPIC -pie %p/../Inputs/plt.c -fuse-ld=lld \
12+ RUN: %clang %cflags -fPIC -pie %p/../Inputs/plt.c %t.so -fuse-ld=lld \
1213RUN: -o %t.lld.pie.exe -Wl,-q
1314RUN: llvm-bolt %t.lld.pie.exe -o %t.lld.bolt.pie.exe --use-old-text=0 --lite=0
1415RUN: %t.lld.bolt.pie.exe | FileCheck %s
You can’t perform that action at this time.
0 commit comments