mirror of
https://github.com/espressif/binutils-gdb.git
synced 2025-06-23 19:50:13 +08:00
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.
This commit is contained in:
@ -2473,6 +2473,8 @@ static const struct ecoff_debug_swap mips_elf32_ecoff_debug_swap = {
|
||||
#define elf_backend_write_section _bfd_mips_elf_write_section
|
||||
#define elf_backend_mips_irix_compat elf32_mips_irix_compat
|
||||
#define elf_backend_mips_rtype_to_howto mips_elf32_rtype_to_howto
|
||||
#define elf_backend_sort_relocs_p _bfd_mips_elf_sort_relocs_p
|
||||
|
||||
#define bfd_elf32_bfd_is_local_label_name \
|
||||
mips_elf_is_local_label_name
|
||||
#define bfd_elf32_bfd_is_target_special_symbol \
|
||||
|
Reference in New Issue
Block a user