diff options
author | Alan Modra <amodra@gmail.com> | 2014-12-09 14:32:22 +1030 |
---|---|---|
committer | Alan Modra <amodra@gmail.com> | 2014-12-10 09:55:31 +1030 |
commit | 28dbcedc7b1282b93c3f25c4e42ae71b44e8e2a8 (patch) | |
tree | 6aaf117e0769bdcf3eb2c5a989116b7543928344 /bfd/elfxx-target.h | |
parent | 4e3272393ff1ab2c07d9fa209d2ae82954f7954c (diff) | |
download | gdb-28dbcedc7b1282b93c3f25c4e42ae71b44e8e2a8.zip gdb-28dbcedc7b1282b93c3f25c4e42ae71b44e8e2a8.tar.gz gdb-28dbcedc7b1282b93c3f25c4e42ae71b44e8e2a8.tar.bz2 |
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.
Diffstat (limited to 'bfd/elfxx-target.h')
-rw-r--r-- | bfd/elfxx-target.h | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/bfd/elfxx-target.h b/bfd/elfxx-target.h index 9bf4b18..83a3caf 100644 --- a/bfd/elfxx-target.h +++ b/bfd/elfxx-target.h @@ -535,6 +535,9 @@ #ifndef elf_backend_count_relocs #define elf_backend_count_relocs NULL #endif +#ifndef elf_backend_sort_relocs_p +#define elf_backend_sort_relocs_p NULL +#endif #ifndef elf_backend_grok_prstatus #define elf_backend_grok_prstatus NULL #endif @@ -737,6 +740,7 @@ static struct elf_backend_data elfNN_bed = elf_backend_ignore_undef_symbol, elf_backend_emit_relocs, elf_backend_count_relocs, + elf_backend_sort_relocs_p, elf_backend_grok_prstatus, elf_backend_grok_psinfo, elf_backend_write_core_note, |