[llvm] [BOLT][AArch64] Create entry points for addresses referenced by dynamic relocations and allow getNewFunctionOrDataAddress to map addrs inside functions. (PR #120267)

Amir Ayupov via llvm-commits llvm-commits at lists.llvm.org
Tue Dec 17 14:00:58 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){
----------------
aaupov wrote:

```suggestion
    if (BinaryFunction *Func = BC->getBinaryFunctionContainingAddress(SymAddress))
```

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


More information about the llvm-commits mailing list