diff options
author | Cyrille Bagard <nocbos@gmail.com> | 2016-05-30 20:31:59 (GMT) |
---|---|---|
committer | Cyrille Bagard <nocbos@gmail.com> | 2016-05-30 20:31:59 (GMT) |
commit | 36760a757f4c3cdecd04d678a41d3484dcdac566 (patch) | |
tree | b4987539ac2bc5bfd65eec1600b464b11766cd0d /src/arch | |
parent | 3154db88ce14aa681cc553a8910edba1e69d8c2b (diff) |
Resolved a suitable symbol depending on the request tolerance.
Diffstat (limited to 'src/arch')
-rw-r--r-- | src/arch/target.c | 20 | ||||
-rw-r--r-- | src/arch/target.h | 2 |
2 files changed, 3 insertions, 19 deletions
diff --git a/src/arch/target.c b/src/arch/target.c index 4e731ec..bf4da3a 100644 --- a/src/arch/target.c +++ b/src/arch/target.c @@ -307,7 +307,7 @@ virt_t g_target_operand_get_addr(const GTargetOperand *operand) * * ******************************************************************************/ -bool g_target_operand_resolve(GTargetOperand *operand, const GBinFormat *format, bool strict) +bool g_target_operand_resolve(GTargetOperand *operand, GBinFormat *format, bool strict) { bool result; /* Bilan à retourner */ vmpa2t addr; /* Adresse de recherche */ @@ -320,23 +320,7 @@ bool g_target_operand_resolve(GTargetOperand *operand, const GBinFormat *format, init_vmpa(&addr, VMPA_NO_PHYSICAL, operand->addr); - result = g_binary_format_resolve_symbol(format, &addr, &operand->symbol, &operand->diff); - - /** - * En cas de succès, le compteur de références du symbole trouvé a été incrémenté. - */ - - if (strict) - result &= (operand->diff == 0); - - if (!result && operand->symbol != NULL) - { - g_object_unref(G_OBJECT(operand->symbol)); - - operand->symbol = NULL; - operand->diff = 0; - - } + result = g_binary_format_resolve_symbol(format, &addr, strict, &operand->symbol, &operand->diff); return result; diff --git a/src/arch/target.h b/src/arch/target.h index a284c09..9031ddc 100644 --- a/src/arch/target.h +++ b/src/arch/target.h @@ -64,7 +64,7 @@ MemoryDataSize g_target_operand_get_size(const GTargetOperand *); virt_t g_target_operand_get_addr(const GTargetOperand *); /* Tente une résolution de symbole. */ -bool g_target_operand_resolve(GTargetOperand *, const GBinFormat *, bool); +bool g_target_operand_resolve(GTargetOperand *, GBinFormat *, bool); /* Fournit les indications concernant le symbole associé. */ GBinSymbol *g_target_operand_get_symbol(const GTargetOperand *, phys_t *); |