[Scummvm-git-logs] scummvm master -> bfd7f91d5cca9da75a891a22f7376fe2d69c24fa
phcoder
noreply at scummvm.org
Tue Dec 13 12:41:27 UTC 2022
This automated email contains information about 1 new commit which have been
pushed to the 'scummvm' repo located at https://github.com/scummvm/scummvm .
Summary:
bfd7f91d5c COMMON: Fix 3DS compilation with newer toolchain that emits PREL31 relocs
Commit: bfd7f91d5cca9da75a891a22f7376fe2d69c24fa
https://github.com/scummvm/scummvm/commit/bfd7f91d5cca9da75a891a22f7376fe2d69c24fa
Author: Vladimir Serbinenko (phcoder at gmail.com)
Date: 2022-12-13T13:41:18+01:00
Commit Message:
COMMON: Fix 3DS compilation with newer toolchain that emits PREL31 relocs
Changed paths:
backends/plugins/elf/arm-loader.cpp
backends/plugins/elf/elf32.h
diff --git a/backends/plugins/elf/arm-loader.cpp b/backends/plugins/elf/arm-loader.cpp
index 64395da4f16..6bc61fa92bb 100644
--- a/backends/plugins/elf/arm-loader.cpp
+++ b/backends/plugins/elf/arm-loader.cpp
@@ -75,6 +75,11 @@ bool ARMDLObject::relocate(Elf32_Off offset, Elf32_Word size, byte *relSegment)
}
break;
+ // Note: PREL31 often points to a different section, so if we ever load in several segments, this needs to be adjusted
+ case R_ARM_PREL31:
+// debug(8, "elfloader: R_ARM_PREL31: PC-relative reference, ld takes care of necessary relocation work for us.");
+ break;
+
case R_ARM_PC24:
// debug(8, "elfloader: R_ARM_PC24: PC-relative jump, ld takes care of necessary relocation work for us.");
break;
diff --git a/backends/plugins/elf/elf32.h b/backends/plugins/elf/elf32.h
index 27192c6eae1..c436922bc73 100644
--- a/backends/plugins/elf/elf32.h
+++ b/backends/plugins/elf/elf32.h
@@ -234,6 +234,7 @@ typedef struct {
#define R_ARM_JUMP24 29
#define R_ARM_TARGET1 38
#define R_ARM_V4BX 40
+#define R_ARM_PREL31 42
// PPC relocation types
#define R_PPC_NONE 0
More information about the Scummvm-git-logs
mailing list