]> git.ipfire.org Git - thirdparty/binutils-gdb.git/commit
Fix slowdown in ld -r for most common case of out-of-order relocs
authorAlan Modra <amodra@gmail.com>
Wed, 16 Sep 2015 08:37:03 +0000 (18:07 +0930)
committerAlan Modra <amodra@gmail.com>
Wed, 16 Sep 2015 12:23:21 +0000 (21:53 +0930)
commitbca6d0e3195217576b39fa1205469e1d578b386a
treeab1d9e19916057e046fe381d29fdf12426f61b2a
parent25bc8a24e4d5f7f7ba4cafc1ffd8499b18a3c842
Fix slowdown in ld -r for most common case of out-of-order relocs

I chose insertion sort since relocs are mostly sorted, but there is a
common case we can handle better;  A run of relocs put out of order
due to not linking input files in order.

PR 18867
* elflink.c (elf_link_adjust_relocs): Modify insertion sort to
insert a run.  Return status in case of malloc failure.
Adjust callers.
bfd/ChangeLog
bfd/elflink.c