We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent b4d4a66 commit 4edbaccCopy full SHA for 4edbacc
view/elf/elfview.cpp
@@ -451,16 +451,15 @@ bool ElfView::Init()
451
bool initialImageBaseSet = false;
452
for (const auto& i : m_programHeaders)
453
{
454
- if ((i.type != ELF_PT_LOAD) || (!i.fileSize))
+ // Skip segments that are not loadable or have no memory size
455
+ if ((i.type != ELF_PT_LOAD) || (i.memorySize == 0))
456
continue;
457
- if (!initialImageBaseSet)
458
+ if (!initialImageBaseSet || (i.virtualAddress < initialImageBase))
459
460
initialImageBase = i.virtualAddress;
461
initialImageBaseSet = true;
462
}
- else if (i.virtualAddress < initialImageBase)
463
- initialImageBase = i.virtualAddress;
464
465
466
SetOriginalImageBase(initialImageBase);
0 commit comments