[PATCH] D122039: [BOLT] Fix plt relocations symbol match

Amir Ayupov via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Mon Mar 21 06:50:23 PDT 2022


Amir added a comment.

Can you please follow the example of compiler-rt to check that bfd is available on the test system and only enable the new test if it is?
Check here: compiler-rt/cmake/config-ix.cmake: `GNU_LD_EXECUTABLE`
And here: compiler-rt/test/lit.common.cfg.py: `config.available_features.add('binutils_lto')`



================
Comment at: bolt/lib/Rewrite/RewriteInstance.cpp:1890
+      if ((!BD) && ((End = SymbolName.find("@")) != std::string::npos)) {
+        // The symbol might contain its versioning in name
+        SymbolName = SymbolName.substr(0, End);
----------------
Can you please add an example of a full symbol name with versioning?


================
Comment at: bolt/test/runtime/AArch64/plt.c:5
 
-// RUN: %clang %cflags %s -fuse-ld=lld \
+// RUN: %clang %cflags %s -fuse-ld=bfd \
 // RUN:    -o %t.exe -Wl,-q
----------------
Can you please keep lld here and add invocation with bfd below as an extra test?


Repository:
  rG LLVM Github Monorepo

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D122039/new/

https://reviews.llvm.org/D122039



More information about the llvm-commits mailing list