Skip to content
Commit 0e70b27b authored by H.J. Lu's avatar H.J. Lu
Browse files

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.
parent 3dea1ef7
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment