PLUGINS: Implement NONE relocations

ARM emit them in some cases and add it to MIPS for completeness

Fixes: #14905
This commit is contained in:
Le Philousophe 2024-02-24 20:48:21 +01:00
parent b5e47c8237
commit 2a7241a97c
2 changed files with 5 additions and 0 deletions

View File

@ -63,6 +63,9 @@ bool ARMDLObject::relocate(Elf32_Off offset, Elf32_Word size, byte *relSegment)
// Act differently based on the type of relocation
switch (REL_TYPE(rel[i].r_info)) {
case R_ARM_NONE:
// debug(8, "elfloader: R_ARM_NONE: No relocation.");
break;
case R_ARM_ABS32:
case R_ARM_TARGET1:
if (sym->st_shndx < SHN_LOPROC) { // Only shift for plugin section.

View File

@ -77,6 +77,8 @@ bool MIPSDLObject::relocate(Elf32_Off offset, Elf32_Word size, byte *relSegment)
// Act differently based on the type of relocation
switch (REL_TYPE(rel[i].r_info)) {
case R_MIPS_NONE:
break; // No relocation
case R_MIPS_HI16: // Absolute addressing.
if (sym->st_shndx < SHN_LOPROC && // Only shift for plugin section (ie. has a real section index)
firstHi16 < 0) { // Only process first in block of HI16s