diff options
| author | Brian Potchik <brian@vector35.com> | 2025-03-04 13:29:24 -0500 |
|---|---|---|
| committer | Brian Potchik <brian@vector35.com> | 2025-03-04 13:29:24 -0500 |
| commit | 9f1c62e99e6dc797ee81716f7d3eb6b722b5270d (patch) | |
| tree | b4f45129d647ab51e512f76ce178f7b9d9172de7 /view/elf | |
| parent | 7125b1a3f07fd31acc15d1b24a9cf6917cd9c3fb (diff) | |
Use robust check for MIPS architecture when generating the lazy bind resolver symbol.
Diffstat (limited to 'view/elf')
| -rw-r--r-- | view/elf/elfview.cpp | 9 |
1 files changed, 4 insertions, 5 deletions
diff --git a/view/elf/elfview.cpp b/view/elf/elfview.cpp index 7caebd95..d6e9006e 100644 --- a/view/elf/elfview.cpp +++ b/view/elf/elfview.cpp @@ -650,7 +650,7 @@ 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_elfSections[i].flags & ELF_SHF_EXECINSTR) || In(sectionNames[i], readOnlyCodeSectionNames)) + 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)) semantics = ReadOnlyDataSectionSemantics; @@ -1693,8 +1693,7 @@ bool ElfView::Init() for (auto& s : gotSectionsToCreate) { - // Don't try creating a section if it starts in an already-created - // section. + // Don't try creating a section if it starts in an already-created section. if (GetSectionsAt(s.first).size() > 0) continue; @@ -2376,8 +2375,8 @@ bool ElfView::Init() DefineAutoSymbol(new Symbol(DataSymbol, "__elf_rela_table", m_relocaSection.offset, NoBinding)); } - // In 32-bit mips with .got, add .extern symbol "RTL_Resolve" - if (gotStart && In(m_arch->GetName(), {"mips32", "mipsel32", "mips64", "nanomips"})) + // Create resolver symbol for MIPS load files containing a global offset table + if (gotStart && (m_arch->GetName().find("mips") != std::string::npos)) { const char *name = "RTL_Resolve"; |
