]> git.ipfire.org Git - thirdparty/binutils-gdb.git/commit
Use stable sort for ld -r relocs
authorAlan Modra <amodra@gmail.com>
Wed, 26 Aug 2015 08:02:08 +0000 (17:32 +0930)
committerAlan Modra <amodra@gmail.com>
Thu, 27 Aug 2015 03:59:22 +0000 (13:29 +0930)
commit5fc980cc8be61203db24756e17d87f24c174f1ac
treeaa6cd87034714548f51421d72d594003f753d25a
parentac2ae01ab8f6bf1a36c926c10d68f230a7858c65
Use stable sort for ld -r relocs

A number of targets emit multiple relocs at a given r_offset, and
depend on those relocs staying in their original order.

PR 18867
* elflink.c (cmp_ext32l_r_offset, cmp_ext32b_r_offset): Delete.
(cmp_ext64l_r_offset, cmp_ext64b_r_offset): Delete.
(ext32l_r_offset, ext32b_r_offset, ext64l_r_offset, ext64b_r_offset):
New functions.
(elf_link_adjust_relocs): Use an insertion sort to sort relocs.
bfd/ChangeLog
bfd/elflink.c