diff options
Diffstat (limited to 'plugins/elf/section.c')
-rw-r--r-- | plugins/elf/section.c | 84 |
1 files changed, 0 insertions, 84 deletions
diff --git a/plugins/elf/section.c b/plugins/elf/section.c index cc47f9d..0e2fd3e 100644 --- a/plugins/elf/section.c +++ b/plugins/elf/section.c @@ -342,87 +342,3 @@ const char *extract_name_from_elf_string_section(const GElfFormat *format, const return result; } - - -/****************************************************************************** -* * -* Paramètres : format = description de l'exécutable à consulter. * -* off = position physique à retrouver. * -* pos = position correspondante. [OUT] * -* * -* Description : Fournit l'emplacement correspondant à une position physique. * -* * -* Retour : Bilan de l'opération. * -* * -* Remarques : - * -* * -******************************************************************************/ - -bool translate_offset_into_vmpa_using_elf_sections(const GElfFormat *format, phys_t off, vmpa2t *pos) -{ - bool result; /* Bilan à retourner */ - uint16_t i; /* Boucle de parcours */ - elf_shdr section; /* Section à analyser */ - virt_t addr; /* Adresse virtuelle calculée */ - - result = false; - - for (i = 0; i < ELF_HDR(format, format->header, e_shnum) && !result; i++) - { - find_elf_section_by_index(format, i, §ion); - - if (ELF_SHDR(format, section, sh_offset) <= off - && off < (ELF_SHDR(format, section, sh_offset) + ELF_SHDR(format, section, sh_size))) - { - addr = ELF_SHDR(format, section, sh_addr) + off - ELF_SHDR(format, section, sh_offset); - init_vmpa(pos, off, addr); - result = true; - } - - } - - return result; - -} - - -/****************************************************************************** -* * -* Paramètres : format = description de l'exécutable à consulter. * -* addr = adresse virtuelle à retrouver. * -* pos = position correspondante. [OUT] * -* * -* Description : Fournit l'emplacement correspondant à une adresse virtuelle. * -* * -* Retour : Bilan de l'opération. * -* * -* Remarques : - * -* * -******************************************************************************/ - -bool translate_address_into_vmpa_using_elf_sections(const GElfFormat *format, virt_t addr, vmpa2t *pos) -{ - bool result; /* Bilan à retourner */ - uint16_t i; /* Boucle de parcours */ - elf_shdr section; /* Section à analyser */ - phys_t off; /* Position physique calculée */ - - result = false; - - for (i = 0; i < ELF_HDR(format, format->header, e_shnum) && !result; i++) - { - find_elf_section_by_index(format, i, §ion); - - if (ELF_SHDR(format, section, sh_addr) <= addr - && addr < (ELF_SHDR(format, section, sh_addr) + ELF_SHDR(format, section, sh_size))) - { - off = ELF_SHDR(format, section, sh_offset) + addr - ELF_SHDR(format, section, sh_addr); - init_vmpa(pos, off, addr); - result = true; - } - - } - - return result; - -} |