diff options
author | Cyrille Bagard <nocbos@gmail.com> | 2015-10-09 02:11:35 (GMT) |
---|---|---|
committer | Cyrille Bagard <nocbos@gmail.com> | 2015-10-09 02:11:35 (GMT) |
commit | 56549ed6632859db219d5434079ad94381293a0a (patch) | |
tree | 114f09993c3804b023837f555a610affe62cb8d3 /src/format/elf | |
parent | fe3ac685849b69d87ad536e80d6f31d08c593eac (diff) |
Deleted duplicated symbols to avoid zero-length areas.
git-svn-id: svn://svn.gna.org/svn/chrysalide/trunk@589 abbe820e-26c8-41b2-8c08-b7b2b41f8b0a
Diffstat (limited to 'src/format/elf')
-rw-r--r-- | src/format/elf/elf.c | 5 | ||||
-rw-r--r-- | src/format/elf/symbols.c | 13 |
2 files changed, 15 insertions, 3 deletions
diff --git a/src/format/elf/elf.c b/src/format/elf/elf.c index ea1f1ff..f485dbc 100644 --- a/src/format/elf/elf.c +++ b/src/format/elf/elf.c @@ -291,8 +291,13 @@ GBinFormat *g_elf_format_new(GBinContent *content, GExeFormat *parent) } + /* TODO : à bouger dans un épilogue commun */ + handle_binary_format(PGA_FORMAT_LOADER_LAST, G_BIN_FORMAT(result)); + g_binary_format_delete_duplicated_symbols(G_BIN_FORMAT(result)); + + /* .... */ return G_BIN_FORMAT(result); diff --git a/src/format/elf/symbols.c b/src/format/elf/symbols.c index 57d14cd..c3c2ecd 100644 --- a/src/format/elf/symbols.c +++ b/src/format/elf/symbols.c @@ -135,10 +135,17 @@ bool load_elf_symbols(GElfFormat *format) /* Symboles d'entrée, si encore besoin */ - result &= load_all_elf_basic_entry_points(format); + /** + * Le tri en préalable + */ + + g_binary_format_sort_symbols(G_BIN_FORMAT(format)); + + result &= load_all_elf_basic_entry_points(format); + return result; } @@ -563,8 +570,8 @@ static bool load_elf_internal_symbols(GElfFormat *format) - //init_mrange(&range, &addr, ELF_SYM(format, sym, st_size)); - init_mrange(&range, &addr, 0); + init_mrange(&range, &addr, ELF_SYM(format, sym, st_size)); + //init_mrange(&range, &addr, 0); /* Première ébauche de nom */ |