aboutsummaryrefslogtreecommitdiff
path: root/backends
diff options
context:
space:
mode:
Diffstat (limited to 'backends')
-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) {