diff options
Diffstat (limited to 'src/format/elf/strings.c')
-rw-r--r-- | src/format/elf/strings.c | 11 |
1 files changed, 6 insertions, 5 deletions
diff --git a/src/format/elf/strings.c b/src/format/elf/strings.c index d350200..53d4e92 100644 --- a/src/format/elf/strings.c +++ b/src/format/elf/strings.c @@ -159,6 +159,7 @@ static bool parse_elf_string_data(GElfFormat *format, phys_t start, phys_t size, phys_t i; /* Boucle de parcours */ phys_t end; /* Position de fin de chaîne */ GArchInstruction *instr; /* Instruction décodée */ + const mrange_t *range; /* Espace occupé par une chaîne*/ GBinSymbol *symbol; /* Symbole à intégrer */ char *label; /* Désignation de la chaîne */ @@ -204,16 +205,16 @@ static bool parse_elf_string_data(GElfFormat *format, phys_t start, phys_t size, g_preload_info_add_instruction(base->info, instr); - g_object_ref(G_OBJECT(instr)); - ADD_STR_AS_SYM(format, symbol, instr); + range = g_arch_instruction_get_range(instr); + + symbol = g_binary_symbol_new(range, STP_RO_STRING); + g_binary_format_add_symbol(base, symbol); /* Jointure avec la chaîne précédente ? */ if (cut) { - init_vmpa(&pos, start + i, address + i); - - label = create_string_label(base, &pos, end - i); + label = create_string_label(base, get_mrange_addr(range), end - i); g_binary_symbol_set_alt_label(symbol, label); |