[PATCH] D122039: [BOLT] Fix plt relocations symbol match
Maksim Panchenko via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Tue Mar 22 12:07:25 PDT 2022
maksfb added inline comments.
================
Comment at: bolt/lib/Rewrite/RewriteInstance.cpp:1886-1897
if (!SymbolAddress && IsAArch64) {
BinaryData *BD = BC->getBinaryDataByName(SymbolName + "@PLT");
+ size_t End;
+ if ((!BD) && ((End = SymbolName.find("@")) != std::string::npos)) {
+ // The symbol might contain its versioning in name e.g.
+ // memcpy@@GLIBC_2.17
+ SymbolName = SymbolName.substr(0, End);
----------------
Could you please factor out the code above? Why is it AArch64-specific?
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