]> git.ipfire.org Git - thirdparty/binutils-gdb.git/commit - bfd/elfxx-mips.h
Don't sort ld -r relocs for mips
authorAlan Modra <amodra@gmail.com>
Tue, 9 Dec 2014 04:02:22 +0000 (14:32 +1030)
committerAlan Modra <amodra@gmail.com>
Tue, 9 Dec 2014 23:25:31 +0000 (09:55 +1030)
commit28dbcedc7b1282b93c3f25c4e42ae71b44e8e2a8
tree6aaf117e0769bdcf3eb2c5a989116b7543928344
parent4e3272393ff1ab2c07d9fa209d2ae82954f7954c
Don't sort ld -r relocs for mips

HI16/LO16 are deliberately put adjacent, which might mean relocs are
then not sorted by r_offset.  See tc-mips.c:mips_frob_file.  Don't undo
the HI16/LO16 sorting.

PR 17666
* elf-bfd.h (struct elf_backend_data): Add sort_relocs_p.
* elfxx-target.h (elf_backend_sort_relocs_p): Define.
(elfNN_bed): Init new field.
* elflink.c (elf_link_adjust_relocs): Conditionally sort.
(bfd_elf_final_link): Control sorting of relocs.
* elfxx-mips.c (_bfd_mips_elf_sort_relocs_p): New function.
* elfxx-mips.h (_bfd_mips_elf_sort_relocs_p): Declare.
* elf32-mips.c (elf_backend_sort_relocs_p): Define.
* elf64-mips.c (elf_backend_sort_relocs_p): Define.
bfd/ChangeLog
bfd/elf-bfd.h
bfd/elf32-mips.c
bfd/elf64-mips.c
bfd/elflink.c
bfd/elfxx-mips.c
bfd/elfxx-mips.h
bfd/elfxx-target.h