Fix bug with patch recompilation when a non-relocatable reference section has the same index as the patch elf's event section

This commit is contained in:
Mr-Wiseguy 2025-08-28 22:53:40 -04:00
parent a13e5cff96
commit 6db56f597d
1 changed files with 5 additions and 0 deletions

View File

@ -646,6 +646,11 @@ int main(int argc, char** argv) {
continue;
}
// Ignore R_MIPS_NONE relocs, which get produced during symbol parsing for non-relocatable reference sections.
if (reloc.type == N64Recomp::RelocType::R_MIPS_NONE) {
continue;
}
// Check if the reloc points to the event section.
if (reloc.target_section == event_section_index) {
// It does, so find the function it's pointing at.