diff options
Diffstat (limited to 'src/format/elf/elf.c')
-rw-r--r-- | src/format/elf/elf.c | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/src/format/elf/elf.c b/src/format/elf/elf.c index 0ad90ff..bc48eb5 100644 --- a/src/format/elf/elf.c +++ b/src/format/elf/elf.c @@ -411,6 +411,7 @@ static void g_elf_format_refine_portions(GElfFormat *format) bool has_strings; /* Section trouvée ? */ elf_shdr shdr; /* En-tête de section ELF */ uint64_t sh_flags; /* Droits associés à une partie*/ + mrange_t range; /* Emplacement d'une section */ const char *name; /* Nom trouvé ou NULL */ exe_format = G_EXE_FORMAT(format); @@ -494,9 +495,9 @@ static void g_elf_format_refine_portions(GElfFormat *format) else if (sh_flags & SHF_WRITE) background = BPC_DATA; else background = BPC_DATA_RO; - init_vmpa(&addr, ELF_SHDR(format, shdr, sh_offset), ELF_SHDR(format, shdr, sh_addr)); + get_elf_section_range(format, &shdr, &range); - new = g_binary_portion_new(background, &addr, ELF_SHDR(format, shdr, sh_size)); + new = g_binary_portion_new(background, get_mrange_addr(&range), get_mrange_length(&range)); if (has_strings) name = extract_name_from_elf_string_section(format, &strings, |