mirror of
https://github.com/RPCSX/rpcsx.git
synced 2026-04-04 22:19:02 +00:00
PRX loader: Fix libfs_155.sprx loading
Fix relocations' segments referencing when there are "empty" (memsize=0) LOAD segments.
This commit is contained in:
parent
03ad5c6830
commit
7eb16e13bb
6 changed files with 29 additions and 12 deletions
|
|
@ -70,6 +70,7 @@ PPUTranslator::PPUTranslator(LLVMContext& context, Module* _module, const ppu_mo
|
|||
// Create segment variables
|
||||
for (const auto& seg : m_info.segs)
|
||||
{
|
||||
if (!seg.addr) continue;
|
||||
auto gv = new GlobalVariable(*_module, GetType<u64>(), true, GlobalValue::ExternalLinkage, 0, fmt::format("__seg%u_%x", m_segs.size(), gsuffix));
|
||||
gv->setInitializer(ConstantInt::get(GetType<u64>(), seg.addr));
|
||||
gv->setExternallyInitialized(true);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue