From cdb6e62b649ea49b16350e57569df891ef7dfa34 Mon Sep 17 00:00:00 2001 From: Hongyu Chen Date: Tue, 24 Jun 2025 09:59:34 -0400 Subject: [view][elf] Fixed duplicate NOTE section loading in address space. NOTE sections were being treated as loadable segments when they should be metadata-only. The NOTE section had the allocatable flag set. The program correctly checked for SHF_ALLOC but didn't exclude NOTE sections explicitly. NOTE sections consumed 0x50 bytes at the base address --- view/elf/elfview.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'view/elf/elfview.cpp') diff --git a/view/elf/elfview.cpp b/view/elf/elfview.cpp index 5c045682..d8a0a112 100644 --- a/view/elf/elfview.cpp +++ b/view/elf/elfview.cpp @@ -632,7 +632,7 @@ bool ElfView::Init() } // Add sections that aren't in the virtual address space only to the raw parent view - if (!(m_elfSections[i].flags & ELF_SHF_ALLOC)) + if (!(m_elfSections[i].flags & ELF_SHF_ALLOC) || m_elfSections[i].type == ELF_SHT_NOTE) { if (m_elfSections[i].size != 0 && m_elfSections[i].type != ELF_SHT_NOBITS) GetParentView()->AddAutoSection(sectionNames[i], m_elfSections[i].offset, m_elfSections[i].size, DefaultSectionSemantics, -- cgit v1.3.1