summaryrefslogtreecommitdiff
path: root/plugins/readelf
diff options
context:
space:
mode:
Diffstat (limited to 'plugins/readelf')
-rw-r--r--plugins/readelf/header.c3
-rw-r--r--plugins/readelf/program.c5
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);