diff options
author | Cyrille Bagard <nocbos@gmail.com> | 2017-01-15 14:47:04 (GMT) |
---|---|---|
committer | Cyrille Bagard <nocbos@gmail.com> | 2017-01-15 14:47:04 (GMT) |
commit | af2ac16182b6243f17e06ec75e441014159abe5e (patch) | |
tree | f0e82673bf5e63e3b06244c2139d8f10dca0203f /src/arch/arm/v7 | |
parent | 56e060d11c238ac7c7b3ecf0eb0527bbaebd5b4b (diff) |
Improved symbol resolving using fully defined locations.
Diffstat (limited to 'src/arch/arm/v7')
-rw-r--r-- | src/arch/arm/v7/post.c | 10 |
1 files changed, 4 insertions, 6 deletions
diff --git a/src/arch/arm/v7/post.c b/src/arch/arm/v7/post.c index 4037c05..5ac3c62 100644 --- a/src/arch/arm/v7/post.c +++ b/src/arch/arm/v7/post.c @@ -49,10 +49,10 @@ void post_process_ldr_instructions(GArchInstruction *instr, GArchProcessor *proc uint32_t addr; /* Adresse visée par le saut */ GBinFormat *bfmt; /* Version basique du format */ GArchOperand *new; /* Instruction de ciblage */ - vmpa2t target; + vmpa2t target; /* Défination finale précise */ mrange_t trange; /* Etendue du symbole à créer */ - VMPA_BUFFER(loc); - char name[5 + VMPA_MAX_LEN]; + VMPA_BUFFER(loc); /* Espace pour une conversion */ + char name[5 + VMPA_MAX_LEN]; /* Etiquette à constituer */ GBinRoutine *routine; /* Nouvelle routine trouvée */ GBinSymbol *symbol; /* Nouveau symbole construit */ @@ -67,7 +67,7 @@ void post_process_ldr_instructions(GArchInstruction *instr, GArchProcessor *proc { bfmt = G_BIN_FORMAT(format); - new = g_target_operand_new(MDS_32_BITS_UNSIGNED, addr); + new = g_target_operand_new(MDS_32_BITS_UNSIGNED, &target); if (!g_target_operand_resolve(G_TARGET_OPERAND(new), bfmt, true)) { @@ -88,8 +88,6 @@ void post_process_ldr_instructions(GArchInstruction *instr, GArchProcessor *proc g_binary_symbol_attach_routine(symbol, routine); g_binary_format_add_symbol(bfmt, symbol); - - g_target_operand_resolve(G_TARGET_OPERAND(new), bfmt, true); } |