PPU LLVM: Fix compilation of PRX with no relocations

This commit is contained in:
Elad 2025-01-31 14:09:22 +02:00
parent a1a0333e56
commit 86b7078464
4 changed files with 6 additions and 4 deletions

View file

@ -4713,7 +4713,7 @@ bool ppu_initialize(const ppu_module<lv2_obj>& info, bool check_only, u64 file_s
usz module_counter = 0;
// Difference between function name and current location
const u32 reloc = info.relocs.empty() ? 0 : ::at32(info.segs, 0).addr;
const u32 reloc = info.is_relocatable ? ::at32(info.segs, 0).addr : 0;
// Info sent to threads
std::vector<std::pair<std::string, ppu_module<lv2_obj>>> workload;
@ -5622,7 +5622,7 @@ static void ppu_initialize2(jit_compiler& jit, const ppu_module<lv2_obj>& module
}, false);
// Difference between function name and current location
const u32 reloc = module_part.get_relocs().empty() ? 0 : ::at32(module_part.segs, 0).addr;
const u32 reloc = module_part.is_relocatable ? ::at32(module_part.segs, 0).addr : 0;
// Initialize function list
for (const auto& func : module_part.get_funcs())