mirror of
https://github.com/RPCSX/rpcsx.git
synced 2025-03-04 00:27:40 +00:00
[rpcsx-os] linker: do not ignore symbols
This commit is contained in:
parent
db39768d12
commit
9818f5dc62
@ -714,13 +714,10 @@ Ref<orbis::Module> rx::linker::loadModule(std::span<std::byte> image,
|
||||
symbol.libraryIndex = -1;
|
||||
symbol.moduleIndex = -1;
|
||||
} else {
|
||||
std::printf("ignored: (%s) - %lx\n",
|
||||
sceStrtab ? sceStrtab +
|
||||
static_cast<std::uint32_t>(sym.st_name)
|
||||
: "<no strtab>",
|
||||
sym.st_value);
|
||||
|
||||
continue;
|
||||
symbol.id =
|
||||
encodeFid(sceStrtab + static_cast<std::uint32_t>(sym.st_name));
|
||||
symbol.libraryIndex = -1;
|
||||
symbol.moduleIndex = -1;
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -42,7 +42,7 @@ orbis::SysResult mmap(orbis::Thread *thread, orbis::caddr_t addr,
|
||||
if (handle->mmap != nullptr) {
|
||||
result = handle->mmap(handle.get(), addr, len, prot, flags, pos);
|
||||
} else {
|
||||
std::printf("unimplemented mmap\n");
|
||||
std::printf("unimplemented mmap for fd %d\n", static_cast<int>(fd));
|
||||
result = rx::vm::map(addr, len, prot, flags);
|
||||
}
|
||||
}
|
||||
@ -70,7 +70,9 @@ orbis::SysResult msync(orbis::Thread *thread, orbis::ptr<void> addr,
|
||||
|
||||
orbis::SysResult mprotect(orbis::Thread *thread, orbis::ptr<const void> addr,
|
||||
orbis::size_t len, orbis::sint prot) {
|
||||
rx::vm::protect((void *)addr, len, prot);
|
||||
if (!rx::vm::protect((void *)addr, len, prot)) {
|
||||
return ErrorCode::INVAL;
|
||||
}
|
||||
return {};
|
||||
}
|
||||
|
||||
@ -398,7 +400,7 @@ orbis::SysResult dynlib_get_obj_member(orbis::Thread *thread,
|
||||
ptr<char> findSymbolById(orbis::Module *module, std::uint64_t id) {
|
||||
for (auto sym : module->symbols) {
|
||||
if (sym.id == id && sym.bind != orbis::SymbolBind::Local) {
|
||||
return (ptr<char>)module->base + sym.address;
|
||||
return sym.address != 0 ? (ptr<char>)module->base + sym.address : 0;
|
||||
}
|
||||
}
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user