From 130b365e7c5cebf90fb73aeeac06f7d5709e0e27 Mon Sep 17 00:00:00 2001 From: ghidra1 Date: Tue, 15 Jul 2025 18:27:41 -0400 Subject: [PATCH] GP-5827 Corrected ELF MIPS 64-bit relocation processing error --- .../format/elf/relocation/MIPS_ElfRelocationContext.java | 9 ++++++--- .../format/elf/relocation/MIPS_ElfRelocationHandler.java | 7 +++---- 2 files changed, 9 insertions(+), 7 deletions(-) diff --git a/Ghidra/Processors/MIPS/src/main/java/ghidra/app/util/bin/format/elf/relocation/MIPS_ElfRelocationContext.java b/Ghidra/Processors/MIPS/src/main/java/ghidra/app/util/bin/format/elf/relocation/MIPS_ElfRelocationContext.java index 0fd09960ad..b0250ad0c2 100644 --- a/Ghidra/Processors/MIPS/src/main/java/ghidra/app/util/bin/format/elf/relocation/MIPS_ElfRelocationContext.java +++ b/Ghidra/Processors/MIPS/src/main/java/ghidra/app/util/bin/format/elf/relocation/MIPS_ElfRelocationContext.java @@ -72,8 +72,6 @@ class MIPS_ElfRelocationContext extends ElfRelocationContext>= 8; int nextRelocType = (n < 2) ? (typeId & 0xff) : 0; if (nextRelocType == MIPS_ElfRelocationType.R_MIPS_NONE.typeId) { - saveValueForNextReloc = false; + saveValueForNextReloc = nextRelocationHasSameOffset(relocation); + } + else { + saveValueForNextReloc = true; } RelocationResult result = @@ -117,6 +118,8 @@ class MIPS_ElfRelocationContext extends ElfRelocationContext