Pull across most of the changes from matt-nb5-mips64.
Only remaining change is bfd/elf.c:_bfd_elf_is_local_label_name which should probably be done via mips_elf_is_local_label_name.
This commit is contained in:
parent
7f19467717
commit
0745739155
|
@ -876,11 +876,11 @@ case "${targ}" in
|
|||
#ifdef BFD64
|
||||
mips64*el-*-netbsd*)
|
||||
targ_defvec=bfd_elf32_nlittlemips_vec
|
||||
targ_selvecs="bfd_elf64_tradbigmips_vec bfd_elf64_tradlittlemips_vec bfd_elf32_nbigmips_vec bfd_elf32_ntradlittlemips_vec bfd_elf32_ntradbigmips_vec bfd_elf32_tradlittlemips_vec bfd_elf32_tradbigmips_vec ecoff_little_vec ecoff_big_vec"
|
||||
targ_selvecs="bfd_elf64_tradbigmips_vec bfd_elf64_tradlittlemips_vec bfd_elf32_nbigmips_vec bfd_elf32_ntradlittlemips_vec bfd_elf32_ntradbigmips_vec bfd_elf32_tradlittlemips_vec bfd_elf32_tradbigmips_vec"
|
||||
;;
|
||||
mips64*-*-netbsd*)
|
||||
targ_defvec=bfd_elf32_nbigmips_vec
|
||||
targ_selvecs="bfd_elf64_tradbigmips_vec bfd_elf64_tradlittlemips_vec bfd_elf32_nlittlemips_vec bfd_elf32_ntradlittlemips_vec bfd_elf32_ntradbigmips_vec bfd_elf32_tradlittlemips_vec bfd_elf32_tradbigmips_vec ecoff_little_vec ecoff_big_vec"
|
||||
targ_selvecs="bfd_elf64_tradbigmips_vec bfd_elf64_tradlittlemips_vec bfd_elf32_nlittlemips_vec bfd_elf32_ntradlittlemips_vec bfd_elf32_ntradbigmips_vec bfd_elf32_tradlittlemips_vec bfd_elf32_tradbigmips_vec"
|
||||
;;
|
||||
#endif
|
||||
mips*el-*-netbsd*)
|
||||
|
|
|
@ -7706,10 +7706,24 @@ _bfd_mips_elf_check_relocs (bfd *abfd, struct bfd_link_info *info,
|
|||
reloc types into the output file as R_MIPS_REL32
|
||||
relocs. Make room for this reloc in .rel(a).dyn. */
|
||||
mips_elf_allocate_dynamic_relocations (dynobj, info, 1);
|
||||
if (MIPS_ELF_READONLY_SECTION (sec))
|
||||
/* We tell the dynamic linker that there are
|
||||
relocations against the text segment. */
|
||||
info->flags |= DF_TEXTREL;
|
||||
/* In the N32 and 64-bit ABIs there may be multiple
|
||||
consecutive relocations for the same offset. If we have
|
||||
a R_MIPS_GPREL32 followed by a R_MIPS_64 then that
|
||||
relocation is complete and needs no futher adjustment. */
|
||||
if ((rel == relocs
|
||||
|| rel[-1].r_offset != rel->r_offset
|
||||
|| r_type != R_MIPS_64
|
||||
|| ELF_R_TYPE(abfd, rel[-1].r_info) != R_MIPS_GPREL32)
|
||||
&& (MIPS_ELF_READONLY_SECTION (sec))
|
||||
{
|
||||
/* We tell the dynamic linker that there are
|
||||
relocations against the text segment. */
|
||||
info->flags |= DF_TEXTREL;
|
||||
info->callbacks->warning
|
||||
(info,
|
||||
_("relocation emitted against readonly section"),
|
||||
NULL, abfd, sec, rel->r_offset);
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
|
|
|
@ -821,10 +821,12 @@ adjust_reloc_syms (bfd *abfd ATTRIBUTE_UNUSED,
|
|||
continue;
|
||||
}
|
||||
|
||||
/* Never adjust a reloc against local symbol in a merge section
|
||||
with non-zero addend. */
|
||||
/* Never adjust a reloc against local symbol in a merge section with
|
||||
a non-zero addend if the addend would place the relocation otside
|
||||
the section's limits. */
|
||||
if ((symsec->flags & SEC_MERGE) != 0
|
||||
&& (fixp->fx_offset != 0 || fixp->fx_subsy != NULL))
|
||||
&& (S_GET_VALUE(sym) + fixp->fx_offset >= bfd_get_section_size(symsec)
|
||||
|| fixp->fx_subsy != NULL))
|
||||
continue;
|
||||
|
||||
/* Never adjust a reloc against TLS local symbol. */
|
||||
|
|
|
@ -362,11 +362,11 @@ mips*-sgi-irix6*) targ_emul=elf32bmipn32
|
|||
mips*-sgi-irix*) targ_emul=mipsbig ;;
|
||||
mips*el-*-ecoff*) targ_emul=mipsidtl ;;
|
||||
mips*-*-ecoff*) targ_emul=mipsidt ;;
|
||||
mips64*el-*-netbsd*) targ_emul=elf32ltsmipn32
|
||||
targ_extra_emuls="elf64btsmip elf64ltsmip elf32ltsmip elf32btsmipn32 elf32btsmip"
|
||||
mips64*el-*-netbsd*) targ_emul=elf64ltsmip
|
||||
targ_extra_emuls="elf64btsmip elf32ltsmipn32 elf32ltsmip elf32btsmipn32 elf32btsmip"
|
||||
;;
|
||||
mips64*-*-netbsd*) targ_emul=elf32btsmipn32
|
||||
targ_extra_emuls="elf64ltsmip elf64btsmip elf32btsmip elf32ltsmipn32 elf32ltsmip"
|
||||
mips64*-*-netbsd*) targ_emul=elf64btsmip
|
||||
targ_extra_emuls="elf64ltsmip elf32btsmipn32 elf32btsmip elf32ltsmipn32 elf32ltsmip"
|
||||
;;
|
||||
mips*el-*-netbsd*) targ_emul=elf32ltsmip
|
||||
targ_extra_emuls="elf32btsmip elf64ltsmip elf64btsmip"
|
||||
|
|
|
@ -6,6 +6,7 @@ SCRIPT_NAME=elf
|
|||
|
||||
# Handle both big- and little-ended 32-bit MIPS objects.
|
||||
ARCH=mips
|
||||
MACHINE=
|
||||
OUTPUT_FORMAT="elf32-bigmips"
|
||||
BIG_OUTPUT_FORMAT="elf32-bigmips"
|
||||
LITTLE_OUTPUT_FORMAT="elf32-littlemips"
|
||||
|
|
|
@ -950,6 +950,8 @@ const struct mips_opcode mips_builtin_opcodes[] =
|
|||
/* mtc2 is at the bottom of the table. */
|
||||
/* mthc2 is at the bottom of the table. */
|
||||
/* mtc3 is at the bottom of the table. */
|
||||
{"mfcr", "t,s", 0x70000018, 0xfc00ffff, WR_t|RD_s, 0, I64 },
|
||||
{"mtcr", "t,s", 0x70000019, 0xfc00ffff, WR_t|RD_s, 0, I64 },
|
||||
{"mtdr", "t,G", 0x7080003d, 0xffe007ff, COD|RD_t|WR_C0, 0, N5 },
|
||||
{"mthi", "s", 0x00000011, 0xfc1fffff, RD_s|WR_HI, 0, I1 },
|
||||
{"mthi", "s,7", 0x00000011, 0xfc1fe7ff, RD_s|WR_HI, 0, D32 },
|
||||
|
|
Loading…
Reference in New Issue