Skip to content

Commit 311be98

Browse files
committed
[ELF] Improve performance of loading binaries with many sections not mapped into the address space
These sections are added to the parent view. Do the work within a bulk segment modification to significantly reduce the overhead of adding sections.
1 parent 2aba9ea commit 311be98

1 file changed

Lines changed: 2 additions & 0 deletions

File tree

view/elf/elfview.cpp

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -615,6 +615,7 @@ bool ElfView::Init()
615615
Elf64SectionHeader symbolTableSection;
616616

617617
BeginBulkAddSegments();
618+
GetParentView()->BeginBulkAddSegments();
618619
uint64_t segmentStart = 0;
619620
for (size_t i = 1; i < m_elfSections.size(); i++)
620621
{
@@ -736,6 +737,7 @@ bool ElfView::Init()
736737
}
737738
}
738739

740+
GetParentView()->EndBulkAddSegments();
739741
EndBulkAddSegments();
740742
// Apply architecture and platform
741743
if (!m_arch)

0 commit comments

Comments
 (0)