Use binary search on dynamic relocations
authorH.J. Lu <hjl.tools@gmail.com>
Mon, 5 Mar 2018 11:44:46 +0000 (03:44 -0800)
committerH.J. Lu <hjl.tools@gmail.com>
Mon, 5 Mar 2018 11:45:03 +0000 (03:45 -0800)
commit0e70b27ba900581df8e23cbbd4612176f869d796
tree173a562711a6b01e802b7713eaa4c29700f09f0d
parent3dea1ef72c646d808e5b287e98253f3b8670c450
Use binary search on dynamic relocations

Replace linear search with binary search on dynamic relocations.  After
finding a match, scan backward to the first matching relocation, then
scan forward for a matching relocation with non-absolute symbol.

On Fedora 27 x86-64, time for "objdump -d" on libxul.so from RHEL 7.4
x86-64 went from

134.46user 0.12system 2:15.03elapsed

to

8.49user 0.14system 0:08.64elapsed

PR binutils/22911
* objdump.c (is_significant_symbol_name): Return TRUE for all
.plt* sections.
(find_symbol_for_address): Replace linear search with binary
search on dynamic relocations.
binutils/ChangeLog
binutils/objdump.c
This page took 0.027037 seconds and 4 git commands to generate.