[llvm] [BOLT] Support computed goto and allow map addrs inside functions. (PR #120267)

Rin Dobrescu via llvm-commits llvm-commits at lists.llvm.org
Wed Dec 18 04:17:37 PST 2024


================
@@ -2439,6 +2439,14 @@ 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){
----------------
Rin18 wrote:

I've kept this as it is in order to check in the same if statement that the referenced address is not in constant island part of a function. 

https://github.com/llvm/llvm-project/pull/120267


More information about the llvm-commits mailing list