diff options
author | Cyrille Bagard <nocbos@gmail.com> | 2015-03-11 13:06:06 (GMT) |
---|---|---|
committer | Cyrille Bagard <nocbos@gmail.com> | 2015-03-11 13:06:06 (GMT) |
commit | 5f64b12f3359e5f2c923fb35d330cec4cb0f4a30 (patch) | |
tree | dc84ed05c4f43f240642e4efff50e78e4f35440a /src/arch/arm | |
parent | 3a616243218104788fad9c1a3a9307c7972a461f (diff) |
Loaded the ELF header at a proper virtual address.
git-svn-id: svn://svn.gna.org/svn/chrysalide/trunk@488 abbe820e-26c8-41b2-8c08-b7b2b41f8b0a
Diffstat (limited to 'src/arch/arm')
-rw-r--r-- | src/arch/arm/v7/post.c | 28 |
1 files changed, 26 insertions, 2 deletions
diff --git a/src/arch/arm/v7/post.c b/src/arch/arm/v7/post.c index c7b0f64..dfeb720 100644 --- a/src/arch/arm/v7/post.c +++ b/src/arch/arm/v7/post.c @@ -260,8 +260,18 @@ void post_process_ldr_instructions(GArchInstruction *instr, GProcContext *contex { addr &= ~0x1; + do + { + + const mrange_t *_range; - printf("RESOLVING FOR 0x%08x\n", (unsigned int)addr); + _range = g_arch_instruction_get_range(instr); + + printf("@ 0x%08x RESOLVING FOR 0x%08x\n", + (unsigned int)_range->addr.virtual, (unsigned int)addr); + + + } while (0); init_vmpa(&target, VMPA_NO_PHYSICAL, addr); init_mrange(&trange, &target, 0); @@ -284,7 +294,21 @@ void post_process_ldr_instructions(GArchInstruction *instr, GProcContext *contex g_target_operand_resolve(G_TARGET_OPERAND(new), format); } - else printf("RESOLVED FOR 0x%08x\n", (unsigned int)addr); + else + + do + { + + const mrange_t *_range; + + _range = g_arch_instruction_get_range(instr); + + printf("@ 0x%08x RESOLVED FOR 0x%08x\n", + (unsigned int)_range->addr.virtual, (unsigned int)addr); + + + } while (0); + g_arch_instruction_replace_operand(instr, new, op); |