Skip to content

Commit 7b5b319

Browse files
committed
Set ELF view address size to 4 for linux-x32 plat
This allows relocations to be handled correctly
1 parent 7532fdb commit 7b5b319

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

view/elf/elfview.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -54,7 +54,7 @@ ElfView::ElfView(BinaryView* data, bool parseOnly): BinaryView("ELF", data->GetF
5454
CreateLogger("BinaryView");
5555
m_logger = CreateLogger("BinaryView.ElfView");
5656
m_elf32 = m_ident.fileClass == 1;
57-
m_addressSize = (m_ident.fileClass == 1) ? 4 : 8;
57+
m_addressSize = (m_ident.fileClass == 1 || (m_plat && m_plat->GetName() == "linux-32")) ? 4 : 8;
5858
m_endian = endian;
5959
m_relocatable = m_commonHeader.type == ET_DYN || m_commonHeader.type == ET_REL;
6060
m_objectFile = m_commonHeader.type == ET_REL;

0 commit comments

Comments
 (0)