summaryrefslogtreecommitdiff
path: root/view/elf/elfview.cpp
diff options
context:
space:
mode:
authorHongyu Chen <hongyu@vector35.com>2025-06-24 09:59:34 -0400
committerHongyu <hongyc4@uci.edu>2025-06-25 13:04:27 -0400
commitcdb6e62b649ea49b16350e57569df891ef7dfa34 (patch)
tree74daeb8a54ce95213cb68a355d4c53e81deaac4f /view/elf/elfview.cpp
parent1d77fc3074da561413a19622a25dcb325c2ea6d6 (diff)
[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
Diffstat (limited to 'view/elf/elfview.cpp')
-rw-r--r--view/elf/elfview.cpp2
1 files changed, 1 insertions, 1 deletions
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,