aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAndre Heider2010-09-05 22:00:41 +0000
committerAndre Heider2010-09-05 22:00:41 +0000
commitcd5e62bbe8234233679861f7421b850ff832efd5 (patch)
tree4bc8229b4a8d82532352f1c83ee2db5b6ab3569e
parent364acaae455b465201f4467809edb7384a6c2bda (diff)
downloadscummvm-rg350-cd5e62bbe8234233679861f7421b850ff832efd5.tar.gz
scummvm-rg350-cd5e62bbe8234233679861f7421b850ff832efd5.tar.bz2
scummvm-rg350-cd5e62bbe8234233679861f7421b850ff832efd5.zip
PLUGINS: Added _segmentVMA to the MIPS loader.
Also added 2 TODOs for all loaders not respection that offset. svn-id: r52577
-rw-r--r--backends/plugins/elf/arm-loader.cpp2
-rw-r--r--backends/plugins/elf/mips-loader.cpp3
2 files changed, 3 insertions, 2 deletions
diff --git a/backends/plugins/elf/arm-loader.cpp b/backends/plugins/elf/arm-loader.cpp
index 388723eafb..5dbbe3ff04 100644
--- a/backends/plugins/elf/arm-loader.cpp
+++ b/backends/plugins/elf/arm-loader.cpp
@@ -59,7 +59,7 @@ bool ARMDLObject::relocate(Elf32_Off offset, Elf32_Word size, byte *relSegment)
// Get the symbol this relocation entry is referring to
Elf32_Sym *sym = _symtab + (REL_INDEX(rel[i].r_info));
- // Get the target instruction in the code
+ // Get the target instruction in the code. TODO: repect _segmentVMA
uint32 *target = (uint32 *)((byte *)relSegment + rel[i].r_offset);
uint32 origTarget = *target; //Save for debugging
diff --git a/backends/plugins/elf/mips-loader.cpp b/backends/plugins/elf/mips-loader.cpp
index 0fc1ca8728..af8c70fcf6 100644
--- a/backends/plugins/elf/mips-loader.cpp
+++ b/backends/plugins/elf/mips-loader.cpp
@@ -69,7 +69,7 @@ bool MIPSDLObject::relocate(Elf32_Off offset, Elf32_Word size, byte *relSegment)
// Get the symbol this relocation entry is referring to
Elf32_Sym *sym = _symtab + (REL_INDEX(rel[i].r_info));
- // Get the target instruction in the code
+ // Get the target instruction in the code. TODO: repect _segmentVMA
uint32 *target = (uint32 *)((byte *)relSegment + rel[i].r_offset);
uint32 origTarget = *target; // Save for debugging
@@ -288,6 +288,7 @@ bool MIPSDLObject::loadSegment(Elf32_Phdr *phdr) {
// Get offset to load segment into
baseAddress = _segment + phdr->p_vaddr;
_segmentSize = phdr->p_memsz;
+ _segmentVMA = phdr->p_vaddr;
// Set .bss segment to 0 if necessary
if (phdr->p_memsz > phdr->p_filesz) {