diff options
| author | Brandon Miller <brandon@vector35.com> | 2025-09-15 11:19:42 -0400 |
|---|---|---|
| committer | Brandon Miller <brandon@vector35.com> | 2025-09-29 07:07:41 -0400 |
| commit | 87975c6620347671352c65b7fa518635180809c6 (patch) | |
| tree | 6088b9ca9984065fd479fdf0e34094ccb5fe161e /view | |
| parent | 1060a72be93a4a229f60e931a003d065beb727e2 (diff) | |
Treat .got.plt as read-only for Hexagon
This allows types to propagate to thunks in cases where there are
GOT entries for internal functions
Diffstat (limited to 'view')
| -rw-r--r-- | view/elf/elfview.cpp | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/view/elf/elfview.cpp b/view/elf/elfview.cpp index 2b898ad6..2a138722 100644 --- a/view/elf/elfview.cpp +++ b/view/elf/elfview.cpp @@ -653,6 +653,9 @@ bool ElfView::Init() vector<string> readWriteDataSectionNames = {".data", ".bss"}; vector<string> readOnlyDataSectionNames = {".rodata", ".dynamic", ".dynsym", ".dynstr", ".ehframe", ".ctors", ".dtors", ".got", ".got2", ".data.rel.ro", ".gnu.hash"}; + if (m_arch && m_arch->GetName() == "hexagon") { + readOnlyDataSectionNames.emplace_back(".got.plt"); + } if ((m_elfSections[i].flags & ELF_SHF_EXECINSTR) || In(sectionNames[i], readOnlyCodeSectionNames)) semantics = ReadOnlyCodeSectionSemantics; else if (!(m_elfSections[i].flags & ELF_SHF_WRITE) || In(sectionNames[i], readOnlyDataSectionNames)) @@ -2561,7 +2564,7 @@ void ElfView::DefineElfSymbol(BNSymbolType type, const string& incomingName, uin } } - if (!typeRef && m_arch->GetName() == "hexagon") + if (!typeRef && m_arch && m_arch->GetName() == "hexagon") { // Apply platform types for statically linked Hexagon binaries typeRef = GetDefaultPlatform()->GetFunctionByName(rawName); |
