diff options
| author | Brandon Miller <brandon@vector35.com> | 2026-01-30 12:13:53 -0500 |
|---|---|---|
| committer | Brandon Miller <brandon@vector35.com> | 2026-01-30 14:29:58 -0500 |
| commit | c762640d97a6302e9e2a8a5afcc62a6b1a100e7b (patch) | |
| tree | 82f687ec8e4d72c2c3acded537c91d57446cd8c3 /view/elf/elfview.cpp | |
| parent | d634a5d6527f7ec203907f17cde8d0d807028fe3 (diff) | |
Force ELF view addr size to 4 bytes for x32 and ilp32
These binaries can be ELF64 or ELF32 format, if the user specifies
linux-x32 or linux-ilp32 platforms the BinaryView's default address size
needs to be 4, even if it's an ELF64
Diffstat (limited to 'view/elf/elfview.cpp')
| -rw-r--r-- | view/elf/elfview.cpp | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/view/elf/elfview.cpp b/view/elf/elfview.cpp index f09517d9..1279dead 100644 --- a/view/elf/elfview.cpp +++ b/view/elf/elfview.cpp @@ -66,7 +66,8 @@ ElfView::ElfView(BinaryView* data, bool parseOnly): BinaryView("ELF", data->GetF throw ElfFormatException(errorMsg); m_elf32 = m_ident.fileClass == 1; - m_addressSize = (m_ident.fileClass == 1 || (m_plat && m_plat->GetName() == "linux-32")) ? 4 : 8; + m_addressSize = (m_ident.fileClass == 1 || (m_plat && m_plat->GetName() == "linux-x32") || + (m_plat && m_plat->GetName() == "linux-ilp32")) ? 4 : 8; m_endian = endian; m_relocatable = m_commonHeader.type == ET_DYN || m_commonHeader.type == ET_REL; m_objectFile = m_commonHeader.type == ET_REL; |
