mirror of
https://github.com/hrydgard/ppsspp.git
synced 2026-12-03 11:13:44 +01:00
Module: Correct detection of executable sections.
This commit is contained in:
1 parent
690a409dac
commit
30b2d05bac
4 files changed
+39
-25
No files matched your search
@@ -633,6 +633,17 @@ u32 ElfReader::GetTotalSectionSizeByPrefix(const std::string &prefix) const {
|
||||
return total;
|
||||
}
|
||||
|
||||
std::vector<SectionID> ElfReader::GetCodeSections() const {
|
||||
std::vector<SectionID> ids;
|
||||
for (int i = 0; i < GetNumSections(); ++i) {
|
||||
u32 flags = sections[i].sh_flags;
|
||||
if ((flags & (SHF_ALLOC | SHF_EXECINSTR)) == (SHF_ALLOC | SHF_EXECINSTR)) {
|
||||
ids.push_back(i);
|
||||
}
|
||||
}
|
||||
return ids;
|
||||
}
|
||||
|
||||
bool ElfReader::LoadSymbols()
|
||||
{
|
||||
bool hasSymbols = false;
|
||||
|
||||
Reference in new issue
Block a user