This is the mail archive of the
binutils@sourceware.org
mailing list for the binutils project.
Re: Slow readelf for huge ARM binary
- From: Nicholas Clifton <nickc at redhat dot com>
- To: Dmitry Antipov <dantipov at nvidia dot com>, binutils at sourceware dot org
- Date: Tue, 24 Feb 2015 13:26:47 +0000
- Subject: Re: Slow readelf for huge ARM binary
- Authentication-results: sourceware.org; auth=none
- References: <54DB73B5 dot 7000504 at nvidia dot com>
Hi Dmitry,
I have checked your patch in, together with the changelog entry below.
There was one problem however, alluded to by H.J. You changed the
find_symbol_for_address() function to use a binary search and skip the
test for the symbol being a function symbol. But although
find_symbol_for_address is called from several places in readelf.c you
only updated the ARM caller. Other targets, eg IA64 and HPPA were still
passing the old, unsorted, complete symbol table to the function... I
took the liberty of fixing this problem before applying the patch.
Cheers
Nick
binutils/ChangeLog
2015-02-24 Dmitry Antipov <dantipov@nvidia.com>
* readelf.c (find_symbol_for_address): Use a binary search to
speed up symbol location. Skip check for function symbol type.
(*_unw_aux_info): Add funtab and nfuns fields contains a sorted
list of function symbols.
(dump_ia64_unwind): Initialise the funtab and nfuns fields and
pass them to find_symbol_for_address.
(dump_hppa_unwind): Likewise.
(arm_print_vma_and_name): Pass funtab to find_symbol_for_address.
(dump_arm_unwind): Initialise the funtab and nfuns fields.