summaryrefslogtreecommitdiff
path: root/src/format/elf/e_elf.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/format/elf/e_elf.c')
-rw-r--r--src/format/elf/e_elf.c18
1 files changed, 2 insertions, 16 deletions
diff --git a/src/format/elf/e_elf.c b/src/format/elf/e_elf.c
index e974b51..081e245 100644
--- a/src/format/elf/e_elf.c
+++ b/src/format/elf/e_elf.c
@@ -590,22 +590,8 @@ bool resolve_elf_symbol(const elf_format *format, char **label, SymbolType *type
GBinRoutine **get_all_elf_routines(const elf_format *format, size_t *count)
{
- GBinRoutine **result; /* Tableau à retourner */
- size_t i; /* Boucle de parcours */
-
- result = (GBinRoutine **)calloc(format->sym_count, sizeof(GBinRoutine *));
- *count = format->sym_count;
-
- for (i = 0; i < format->sym_count; i++)
- {
- result[i] = g_binary_routine_new();
+ *count = format->routines_count;
- g_binary_routine_set_address(result[i], format->symbols[i].address);
- g_binary_routine_set_size(result[i], format->symbols[i].size);
- g_binary_routine_set_name(result[i], strdup(format->symbols[i].name));
-
- }
-
- return result;
+ return format->routines;
}