diff options
author | Le Philousophe | 2019-09-29 12:06:18 +0200 |
---|---|---|
committer | Le Philousophe | 2019-10-09 13:33:11 +0200 |
commit | be4dd18dbc070292c061791fe0581a978baf8162 (patch) | |
tree | a9ccbb6857b5f41668491ff25aa1c9e938fd6345 /backends/plugins/elf | |
parent | 81b364fbb3b94b513c4250efaba1b29c7998ae21 (diff) | |
download | scummvm-rg350-be4dd18dbc070292c061791fe0581a978baf8162.tar.gz scummvm-rg350-be4dd18dbc070292c061791fe0581a978baf8162.tar.bz2 scummvm-rg350-be4dd18dbc070292c061791fe0581a978baf8162.zip |
PLUGINS: Implement NONE relocation for PPC
It's used by recent versions of GCC in .eh_frame sections
Diffstat (limited to 'backends/plugins/elf')
-rw-r--r-- | backends/plugins/elf/elf32.h | 1 | ||||
-rw-r--r-- | backends/plugins/elf/ppc-loader.cpp | 3 |
2 files changed, 4 insertions, 0 deletions
diff --git a/backends/plugins/elf/elf32.h b/backends/plugins/elf/elf32.h index 9f6f92fe95..aae92b12d4 100644 --- a/backends/plugins/elf/elf32.h +++ b/backends/plugins/elf/elf32.h @@ -236,6 +236,7 @@ typedef struct { #define R_ARM_V4BX 40 // PPC relocation types +#define R_PPC_NONE 0 #define R_PPC_ADDR32 1 #define R_PPC_ADDR16_LO 4 #define R_PPC_ADDR16_HI 5 diff --git a/backends/plugins/elf/ppc-loader.cpp b/backends/plugins/elf/ppc-loader.cpp index dffd95993b..8315a6a088 100644 --- a/backends/plugins/elf/ppc-loader.cpp +++ b/backends/plugins/elf/ppc-loader.cpp @@ -61,6 +61,9 @@ bool PPCDLObject::relocate(Elf32_Off offset, Elf32_Word size, byte *relSegment) //debug(8, "elfloader: i=%05d %p +0x%04x: (0x%08x) 0x%08x ", i, src, rel[i].r_addend, sym->st_value, *src); switch (REL_TYPE(rel[i].r_info)) { + case R_PPC_NONE: + debug(8, "elfloader: R_PPC_NONE"); + break; case R_PPC_ADDR32: *src = value; debug(8, "elfloader: R_PPC_ADDR32 -> 0x%08x", *src); |