Files
clang-p2996/bolt/test/X86/plt-sec.test
Maksim Panchenko 89a2e16037 [BOLT] Support PLT sections with variable entry sizes
Summary:
The linker can generate 8- or 16-byte entries in .plt.got and .plt.sec
sections. On X86, the main differentiator is the presence of endbr64
instruction at the beginning of the entry. Detect the instruction and
adjust the size accordingly.

(cherry picked from FBD29847639)
2021-07-14 01:35:34 -07:00

12 lines
544 B
Plaintext

## Check that llvm-bolt correctly identifies functions in .plt.sec
# RUN: yaml2obj %p/Inputs/plt-sec.yaml &> %t.exe
# RUN: llvm-bolt %t.exe -print-cfg -print-only=foo -o %t.out | FileCheck %s
## Check that llvm-bolt correctly identifies functions in .plt.got that has
## endbr instruction at the start of its entries.
# RUN: yaml2obj %p/Inputs/plt-got-sec.yaml &> %t.exe
# RUN: llvm-bolt %t.exe -print-cfg -print-only=foo -o %t.out | FileCheck %s
## The only call instruction in function foo() should be a call to PLT.
CHECK: callq puts@PLT