diff options
Diffstat (limited to 'plugins/elf/program.c')
-rw-r--r-- | plugins/elf/program.c | 84 |
1 files changed, 0 insertions, 84 deletions
diff --git a/plugins/elf/program.c b/plugins/elf/program.c index 7fb63df..f4924f5 100644 --- a/plugins/elf/program.c +++ b/plugins/elf/program.c @@ -152,87 +152,3 @@ bool find_elf_program_by_type(const GElfFormat *format, uint32_t type, elf_phdr 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_programs(const GElfFormat *format, phys_t off, vmpa2t *pos) -{ - bool result; /* Bilan à retourner */ - uint16_t i; /* Boucle de parcours */ - elf_phdr program; /* Programme à analyser */ - virt_t addr; /* Adresse virtuelle calculée */ - - result = false; - - for (i = 0; i < ELF_HDR(format, format->header, e_phnum) && !result; i++) - { - find_elf_program_by_index(format, i, &program); - - if (ELF_PHDR(format, program, p_offset) <= off - && off < (ELF_PHDR(format, program, p_offset) + ELF_PHDR(format, program, p_filesz))) - { - addr = ELF_PHDR(format, program, p_vaddr) + ELF_PHDR(format, program, p_offset) - off; - 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_programs(const GElfFormat *format, virt_t addr, vmpa2t *pos) -{ - bool result; /* Bilan à retourner */ - uint16_t i; /* Boucle de parcours */ - elf_phdr program; /* Programme à analyser */ - phys_t off; /* Position physique calculée */ - - result = false; - - for (i = 0; i < ELF_HDR(format, format->header, e_phnum) && !result; i++) - { - find_elf_program_by_index(format, i, &program); - - if (ELF_PHDR(format, program, p_vaddr) <= addr - && addr < (ELF_PHDR(format, program, p_vaddr) + ELF_PHDR(format, program, p_filesz))) - { - off = ELF_PHDR(format, program, p_offset) + addr - ELF_PHDR(format, program, p_vaddr); - init_vmpa(pos, off, addr); - result = true; - } - - } - - return result; - -} |