mirror of
https://github.com/shadps4-emu/shadPS4.git
synced 2025-07-23 10:35:03 +00:00
linker : iterator for running non shared libs
This commit is contained in:
parent
88b790d846
commit
ab04333ebd
@ -659,8 +659,11 @@ void Linker::Execute() {
|
||||
p.argc = 1;
|
||||
p.argv[0] = "eboot.bin"; //hmm should be ok?
|
||||
|
||||
const auto& module = m_modules.at(0);
|
||||
run_main_entry(module.elf.GetElfEntry() + module.base_virtual_addr, &p, ProgramExitFunc);
|
||||
for (auto& m : m_modules) {
|
||||
if (!m.elf.IsSharedLib()) {
|
||||
run_main_entry(m.elf.GetElfEntry() + m.base_virtual_addr, &p, ProgramExitFunc);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
} // namespace Core
|
||||
|
@ -434,4 +434,6 @@ void Elf::LoadSegment(u64 virtual_addr, u64 file_offset, u64 size) {
|
||||
BREAKPOINT(); // Hmm we didn't return something...
|
||||
}
|
||||
|
||||
bool Elf::IsSharedLib() { return m_elf_header.e_type == ET_SCE_DYNAMIC; }
|
||||
|
||||
} // namespace Core::Loader
|
||||
|
@ -490,6 +490,7 @@ class Elf {
|
||||
std::string ElfPheaderFlagsStr(u32 flags);
|
||||
|
||||
void LoadSegment(u64 virtual_addr, u64 file_offset, u64 size);
|
||||
bool IsSharedLib();
|
||||
|
||||
private:
|
||||
void Reset();
|
||||
|
Loading…
Reference in New Issue
Block a user