Files
clang-p2996/bolt/test/runtime/plt-gnu-ld.test
Vladislav Khmelevsky 4956e0e197 [BOLT] Fix plt relocations symbol match
The bfd linker adds the symbol versioning string to the symbol name in symtab.
Skip the versioning part in order to find the registered PLT function.

Vladislav Khmelevsky,
Advanced Software Technology Lab, Huawei

Differential Revision: https://reviews.llvm.org/D122039
2022-04-05 15:57:26 +03:00

13 lines
429 B
Plaintext

// This test checks that the pointers to PLT are properly updated.
// The test is using bfd linker, since it may add versioning string
// to the symbol name e.g. memcpy@@GLIBC_2.17
// REQUIRES: gnu_ld
// RUN: %clang %cflags %p/../Inputs/plt.c -fuse-ld=bfd \
// RUN: -o %t.bfd.exe -Wl,-q
// RUN: llvm-bolt %t.bfd.exe -o %t.bfd.bolt.exe -use-old-text=0 -lite=0
// RUN: %t.bfd.bolt.exe | FileCheck %s
// CHECK: Test completed