mirror of
https://github.com/shadps4-emu/shadPS4.git
synced 2024-12-29 11:06:07 +00:00
some elf improvements
This commit is contained in:
parent
f2f04142b0
commit
365ae2aac9
|
@ -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;
|
||||
|
|
|
@ -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
|
||||
|
|
|
@ -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{};
|
||||
|
|
Loading…
Reference in a new issue