diff options
author | Cyrille Bagard <nocbos@gmail.com> | 2015-03-29 17:24:22 (GMT) |
---|---|---|
committer | Cyrille Bagard <nocbos@gmail.com> | 2015-03-29 17:24:22 (GMT) |
commit | 52e036040b5e0ad8acde3d467ac8d9ca43ed414c (patch) | |
tree | 9f869999534857786fc8e0870772d8e5cabef2fb /src/format/executable.c | |
parent | 057cee1c3c109639af8f30e39e00f4884a353f31 (diff) |
Used real virtual addresses when describing ELF items.
git-svn-id: svn://svn.gna.org/svn/chrysalide/trunk@496 abbe820e-26c8-41b2-8c08-b7b2b41f8b0a
Diffstat (limited to 'src/format/executable.c')
-rw-r--r-- | src/format/executable.c | 32 |
1 files changed, 20 insertions, 12 deletions
diff --git a/src/format/executable.c b/src/format/executable.c index 319d3dd..1a66ffc 100644 --- a/src/format/executable.c +++ b/src/format/executable.c @@ -256,11 +256,11 @@ mrange_t *g_exe_format_get_x_ranges(GExeFormat *format, size_t *count) /****************************************************************************** * * -* Paramètres : format = description de l'exécutable à consulter. * -* addr = adresse virtuelle à retrouver. * -* pos = position correspondante. [OUT] * +* Paramètres : format = description de l'exécutable à consulter. * +* off = position physique à retrouver. * +* pos = position correspondante. [OUT] * * * -* Description : Fournit la position correspondant à une adresse virtuelle. * +* Description : Fournit l'emplacement correspondant à une position physique. * * * * Retour : Bilan de l'opération. * * * @@ -268,20 +268,24 @@ mrange_t *g_exe_format_get_x_ranges(GExeFormat *format, size_t *count) * * ******************************************************************************/ -bool g_exe_format_translate_address_into_offset(const GExeFormat *format, vmpa_t addr, off_t *pos) +bool g_exe_format_translate_offset_into_vmpa(const GExeFormat *format, phys_t off, vmpa2t *pos) { - return format->translate_addr(format, addr, pos); + bool result; /* Bilan à retourner */ + + result = G_EXE_FORMAT_GET_CLASS(format)->translate_phys(format, off, pos); + + return result; } /****************************************************************************** * * -* Paramètres : format = description de l'exécutable à consulter. * -* pos = position dans le flux binaire à retrouver. * -* addr = adresse virtuelle correspondante. [OUT] * +* Paramètres : format = description de l'exécutable à consulter. * +* addr = adresse virtuelle à retrouver. * +* pos = position correspondante. [OUT] * * * -* Description : Fournit l'adresse virtuelle correspondant à une position. * +* Description : Fournit l'emplacement correspondant à une adresse virtuelle. * * * * Retour : Bilan de l'opération. * * * @@ -289,8 +293,12 @@ bool g_exe_format_translate_address_into_offset(const GExeFormat *format, vmpa_t * * ******************************************************************************/ -bool g_exe_format_translate_offset_into_address(const GExeFormat *format, off_t pos, vmpa_t *addr) +bool g_exe_format_translate_address_into_vmpa(const GExeFormat *format, virt_t addr, vmpa2t *pos) { - return format->translate_off(format, pos, addr); + bool result; /* Bilan à retourner */ + + result = G_EXE_FORMAT_GET_CLASS(format)->translate_virt(format, addr, pos); + + return result; } |