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 /plugins/readelf | |
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 'plugins/readelf')
-rw-r--r-- | plugins/readelf/header.c | 3 | ||||
-rw-r--r-- | plugins/readelf/program.c | 5 |
2 files changed, 5 insertions, 3 deletions
diff --git a/plugins/readelf/header.c b/plugins/readelf/header.c index 5fbd769..d4dd706 100644 --- a/plugins/readelf/header.c +++ b/plugins/readelf/header.c @@ -60,7 +60,8 @@ bool annotate_elf_header(GElfFormat *format) header = g_elf_format_get_header(format); endian = g_elf_format_get_endianness(format); - init_vmpa(&pos, 0, 0x3333); + if (!g_exe_format_translate_offset_into_vmpa(G_EXE_FORMAT(format), 0, &pos)) + return false; /* ELFMAG (0) */ diff --git a/plugins/readelf/program.c b/plugins/readelf/program.c index 6912828..ae10369 100644 --- a/plugins/readelf/program.c +++ b/plugins/readelf/program.c @@ -339,7 +339,7 @@ bool annotate_elf_program_header_table(GElfFormat *format) bool result; /* Bilan à retourner */ const elf_header *header; /* En-tête principale */ SourceEndian endian; /* Boutisme utilisé */ - off_t offset; /* Tête de lecture du bbinaire */ + phys_t offset; /* Tête de lecture du bbinaire */ vmpa2t pos; /* Localisation des symboles */ uint16_t e_phnum; /* Nombre d'éléments 'Program' */ uint16_t i; /* Boucle de parcours */ @@ -351,7 +351,8 @@ bool annotate_elf_program_header_table(GElfFormat *format) offset = ELF_HDR(format, *header, e_phoff); - init_vmpa(&pos, offset, 0x5500); + if (!g_exe_format_translate_offset_into_vmpa(G_EXE_FORMAT(format), offset, &pos)) + return false; e_phnum = ELF_HDR(format, *header, e_phnum); |