[llvm] [BOLT] Support computed goto and allow map addrs inside functions (PR #120267)
Ash Dobrescu via llvm-commits
llvm-commits at lists.llvm.org
Fri Jan 31 06:40:52 PST 2025
================
@@ -2439,6 +2439,13 @@ void RewriteInstance::readDynamicRelocations(const SectionRef &Section,
if (Symbol)
SymbolIndex[Symbol] = getRelocationSymbol(InputFile, Rel);
+ const uint64_t SymAddress = SymbolAddress + Addend;
+ BinaryFunction *Func = BC->getBinaryFunctionContainingAddress(SymAddress);
+ if (Func && !Func->isInConstantIsland(SymAddress)) {
+ if (const uint64_t SymOffset = SymAddress - Func->getAddress())
+ Func->addEntryPointAtOffset(SymOffset);
+ }
----------------
Rin18 wrote:
I'll look into adding more checks.
https://github.com/llvm/llvm-project/pull/120267
More information about the llvm-commits
mailing list