Source-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[src/trunk]: src/external/gpl3/binutils/dist Pull across most of the changes ...
details: https://anonhg.NetBSD.org/src/rev/191980728039
branches: trunk
changeset: 749042:191980728039
user: skrll <skrll%NetBSD.org@localhost>
date: Sun Nov 15 10:25:16 2009 +0000
description:
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.
diffstat:
external/gpl3/binutils/dist/bfd/config.bfd | 4 +-
external/gpl3/binutils/dist/bfd/elfxx-mips.c | 22 ++++++++-
external/gpl3/binutils/dist/gas/write.c | 8 ++-
external/gpl3/binutils/dist/ld/configure.tgt | 8 +-
external/gpl3/binutils/dist/ld/emulparams/elf32bmipn32-defs.sh | 1 +
external/gpl3/binutils/dist/opcodes/mips-opc.c | 2 +
6 files changed, 32 insertions(+), 13 deletions(-)
diffs (110 lines):
diff -r 42009429d9f1 -r 191980728039 external/gpl3/binutils/dist/bfd/config.bfd
--- a/external/gpl3/binutils/dist/bfd/config.bfd Sun Nov 15 10:03:16 2009 +0000
+++ b/external/gpl3/binutils/dist/bfd/config.bfd Sun Nov 15 10:25:16 2009 +0000
@@ -876,11 +876,11 @@
#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*)
diff -r 42009429d9f1 -r 191980728039 external/gpl3/binutils/dist/bfd/elfxx-mips.c
--- a/external/gpl3/binutils/dist/bfd/elfxx-mips.c Sun Nov 15 10:03:16 2009 +0000
+++ b/external/gpl3/binutils/dist/bfd/elfxx-mips.c Sun Nov 15 10:25:16 2009 +0000
@@ -7706,10 +7706,24 @@
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
{
diff -r 42009429d9f1 -r 191980728039 external/gpl3/binutils/dist/gas/write.c
--- a/external/gpl3/binutils/dist/gas/write.c Sun Nov 15 10:03:16 2009 +0000
+++ b/external/gpl3/binutils/dist/gas/write.c Sun Nov 15 10:25:16 2009 +0000
@@ -821,10 +821,12 @@
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. */
diff -r 42009429d9f1 -r 191980728039 external/gpl3/binutils/dist/ld/configure.tgt
--- a/external/gpl3/binutils/dist/ld/configure.tgt Sun Nov 15 10:03:16 2009 +0000
+++ b/external/gpl3/binutils/dist/ld/configure.tgt Sun Nov 15 10:25:16 2009 +0000
@@ -362,11 +362,11 @@
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"
diff -r 42009429d9f1 -r 191980728039 external/gpl3/binutils/dist/ld/emulparams/elf32bmipn32-defs.sh
--- a/external/gpl3/binutils/dist/ld/emulparams/elf32bmipn32-defs.sh Sun Nov 15 10:03:16 2009 +0000
+++ b/external/gpl3/binutils/dist/ld/emulparams/elf32bmipn32-defs.sh Sun Nov 15 10:25:16 2009 +0000
@@ -6,6 +6,7 @@
# 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"
diff -r 42009429d9f1 -r 191980728039 external/gpl3/binutils/dist/opcodes/mips-opc.c
--- a/external/gpl3/binutils/dist/opcodes/mips-opc.c Sun Nov 15 10:03:16 2009 +0000
+++ b/external/gpl3/binutils/dist/opcodes/mips-opc.c Sun Nov 15 10:25:16 2009 +0000
@@ -950,6 +950,8 @@
/* 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 },
Home |
Main Index |
Thread Index |
Old Index