summaryrefslogtreecommitdiff
path: root/src/format/elf
diff options
context:
space:
mode:
Diffstat (limited to 'src/format/elf')
-rw-r--r--src/format/elf/helper_x86.c4
-rw-r--r--src/format/elf/symbols.c6
2 files changed, 6 insertions, 4 deletions
diff --git a/src/format/elf/helper_x86.c b/src/format/elf/helper_x86.c
index d921592..af733a2 100644
--- a/src/format/elf/helper_x86.c
+++ b/src/format/elf/helper_x86.c
@@ -293,7 +293,7 @@ void translate_exe_elf_relocations(GElfFormat *format, GArchInstruction **instru
routine = try_to_demangle_routine(g_binary_symbol_to_string(symbols[j]));
- g_binary_routine_set_address(routine, address);
+ ///g_binary_routine_set_address(routine, address);
///// reactiver g_binary_format_add_routine(G_BIN_FORMAT(format), routine);
@@ -401,7 +401,7 @@ void translate_dyn_elf_relocations(GElfFormat *format, GArchInstruction **instru
routine = try_to_demangle_routine(name);
- g_binary_routine_set_address(routine, address);
+ ////g_binary_routine_set_address(routine, address);
///// reactiver g_binary_format_add_routine(G_BIN_FORMAT(format), routine);
diff --git a/src/format/elf/symbols.c b/src/format/elf/symbols.c
index 06d7cab..15c3a6b 100644
--- a/src/format/elf/symbols.c
+++ b/src/format/elf/symbols.c
@@ -1296,6 +1296,7 @@ static bool load_elf_internal_symbols(GElfFormat *format)
off_t iter; /* Boucle de parcours */
elf_sym sym; /* Symbole aux infos visées */
vmpa2t addr; /* Localisation d'une routine */
+ mrange_t range; /* Couverture mémoire associée */
const char *name; /* Nom du symbole trouvé */
char alt_name[5 + VMPA_MAX_LEN]; /* Nom abstrait de substitution*/
GBinRoutine *routine; /* Nouvelle routine trouvée */
@@ -1320,6 +1321,8 @@ static bool load_elf_internal_symbols(GElfFormat *format)
init_vmpa(&addr, ELF_SYM(format, sym, st_value), VMPA_NO_VIRTUAL);
+ init_mrange(&range, &addr, ELF_SYM(format, sym, st_size));
+
/* Première ébauche de nom */
@@ -1373,8 +1376,7 @@ static bool load_elf_internal_symbols(GElfFormat *format)
routine = try_to_demangle_routine(name);
- g_binary_routine_set_address(routine, &addr);
- g_binary_routine_set_size(routine, ELF_SYM(format, sym, st_size));
+ g_binary_routine_set_range(routine, &range);
/* Symbole uniquement */