some elf improvements

This commit is contained in:
georgemoralis 2024-03-26 00:21:38 +02:00
parent f2f04142b0
commit 365ae2aac9
3 changed files with 12 additions and 0 deletions

View File

@ -20,6 +20,10 @@ struct EntryParams {
};
struct ModuleInfo {
bool operator==(const ModuleInfo& other) const {
return version_major == other.version_major && version_minor == other.version_minor &&
name == other.name;
}
std::string name;
union {
u64 value;
@ -34,6 +38,9 @@ struct ModuleInfo {
};
struct LibraryInfo {
bool operator==(const LibraryInfo& other) const {
return version == other.version && name == other.name;
}
std::string name;
union {
u64 value;

View File

@ -538,4 +538,8 @@ void Elf::LoadSegment(u64 virtual_addr, u64 file_offset, u64 size) {
UNREACHABLE();
}
bool Elf::IsSharedLib() {
return m_elf_header.e_type == ET_SCE_DYNAMIC;
}
} // namespace Core::Loader

View File

@ -490,6 +490,7 @@ public:
std::string ElfPheaderFlagsStr(u32 flags);
void LoadSegment(u64 virtual_addr, u64 file_offset, u64 size);
bool IsSharedLib();
private:
Common::FS::IOFile m_f{};