diff options
author | Cyrille Bagard <nocbos@gmail.com> | 2015-06-12 23:46:47 (GMT) |
---|---|---|
committer | Cyrille Bagard <nocbos@gmail.com> | 2015-06-12 23:46:47 (GMT) |
commit | 04d108111fe7ddd01713b4ca22f8d96961ec2486 (patch) | |
tree | 72ca086e0db2568bc93acb865b84e29c7d206897 /src/format/elf | |
parent | 64aee7b4301e720a7420ab8942ef88f72d7a2c99 (diff) |
Improved loading speed with binary search of sorted arrays.
git-svn-id: svn://svn.gna.org/svn/chrysalide/trunk@538 abbe820e-26c8-41b2-8c08-b7b2b41f8b0a
Diffstat (limited to 'src/format/elf')
-rw-r--r-- | src/format/elf/symbols.c | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/src/format/elf/symbols.c b/src/format/elf/symbols.c index 04ba3de..655eda1 100644 --- a/src/format/elf/symbols.c +++ b/src/format/elf/symbols.c @@ -137,6 +137,8 @@ bool load_elf_symbols(GElfFormat *format) result &= load_all_elf_basic_entry_points(format); + g_binary_format_sort_symbols(G_BIN_FORMAT(format)); + return result; } @@ -201,7 +203,7 @@ static void register_elf_entry_point(GElfFormat *format, virt_t vaddr, phys_t le symbol = g_binary_symbol_new(STP_ENTRY_POINT, "XXX", ~0); g_binary_symbol_attach_routine(symbol, routine); - g_binary_format_add_symbol(base, symbol); + _g_binary_format_add_symbol(base, symbol, false); } @@ -632,7 +634,7 @@ static bool load_elf_internal_symbols(GElfFormat *format) } if (symbol != NULL) - g_binary_format_add_symbol(G_BIN_FORMAT(format), symbol); + _g_binary_format_add_symbol(G_BIN_FORMAT(format), symbol, false); } |