summaryrefslogtreecommitdiff
path: root/src/format/elf/elf.c
diff options
context:
space:
mode:
authorCyrille Bagard <nocbos@gmail.com>2017-03-31 17:50:08 (GMT)
committerCyrille Bagard <nocbos@gmail.com>2017-03-31 17:50:08 (GMT)
commitebe248fe406de9565c8c7787187a1d439e68cd84 (patch)
tree8126ea63a5b753f549a90a107d6428db2b299ff2 /src/format/elf/elf.c
parent24096140aaa73db9e982db4437bc42a013812658 (diff)
Extracted strings from some extra ELF sections.
Diffstat (limited to 'src/format/elf/elf.c')
-rw-r--r--src/format/elf/elf.c5
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,