summaryrefslogtreecommitdiff
path: root/src/format/elf/e_elf.c
diff options
context:
space:
mode:
authorCyrille Bagard <nocbos@gmail.com>2009-07-14 23:43:09 (GMT)
committerCyrille Bagard <nocbos@gmail.com>2009-07-14 23:43:09 (GMT)
commitb5a2692820a0b85a03ff28fc2154f8d50f26d5e2 (patch)
tree9b6760ddedcb46ece3ec577f7494e40fabce7b87 /src/format/elf/e_elf.c
parent24d7c72a124df20339a50bb61e66385352e68a1b (diff)
Restored the code loading the ELF relocations.
git-svn-id: svn://svn.gna.org/svn/chrysalide/trunk@93 abbe820e-26c8-41b2-8c08-b7b2b41f8b0a
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;
}