summaryrefslogtreecommitdiff
path: root/view/elf/elfview.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'view/elf/elfview.cpp')
-rw-r--r--view/elf/elfview.cpp7
1 files changed, 4 insertions, 3 deletions
diff --git a/view/elf/elfview.cpp b/view/elf/elfview.cpp
index c61a5697..bcfcad7e 100644
--- a/view/elf/elfview.cpp
+++ b/view/elf/elfview.cpp
@@ -1152,13 +1152,14 @@ bool ElfView::Init()
Ref<Symbol> sym = GetSymbolByAddress(gotEntry);
if (entry.value && sym && (sym->GetType() == ImportAddressSymbol))
{
- Ref<Platform> targetPlatform = platform->GetAssociatedPlatformByAddress(entry.value);
- Ref<Function> func = AddFunctionForAnalysis(targetPlatform, entry.value);
+ uint64_t adjustedAddress = entry.value + imageBaseAdjustment;
+ Ref<Platform> targetPlatform = platform->GetAssociatedPlatformByAddress(adjustedAddress);
+ Ref<Function> func = AddFunctionForAnalysis(targetPlatform, adjustedAddress);
if (func)
{
Ref<Symbol> funcSym = new Symbol(ImportedFunctionSymbol,
sym->GetShortName(), sym->GetFullName(), sym->GetRawName(),
- entry.value, NoBinding, sym->GetNameSpace(), sym->GetOrdinal());
+ adjustedAddress, NoBinding, sym->GetNameSpace(), sym->GetOrdinal());
DefineAutoSymbol(funcSym);
func->ApplyImportedTypes(funcSym);
}