summaryrefslogtreecommitdiff
path: root/plugins/elf/section.c
diff options
context:
space:
mode:
authorCyrille Bagard <nocbos@gmail.com>2018-05-24 07:43:32 (GMT)
committerCyrille Bagard <nocbos@gmail.com>2018-05-24 07:43:32 (GMT)
commit08c45a8c7970403c3d658b1b0af9ac09f66b4a7e (patch)
tree25a8108e36b7328c266ba6e71647243dfd6b7cac /plugins/elf/section.c
parent7135e7944c91d2e8b787c8782375423b9a90ed5b (diff)
Translated offsets and addresses with more accuracy.
Diffstat (limited to 'plugins/elf/section.c')
-rw-r--r--plugins/elf/section.c84
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, &section);
-
- 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, &section);
-
- 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;
-
-}