This is the mail archive of the
binutils-cvs@sourceware.org
mailing list for the binutils project.
[binutils-gdb] When linking binary files into MIPS executables, default to MIPS 3 emaulation for 64-bit objects.
- From: Nick Clifton <nickc at sourceware dot org>
- To: bfd-cvs at sourceware dot org
- Date: 25 Jul 2019 15:35:54 -0000
- Subject: [binutils-gdb] When linking binary files into MIPS executables, default to MIPS 3 emaulation for 64-bit objects.
https://sourceware.org/git/gitweb.cgi?p=binutils-gdb.git;h=c7c860d2d29ca3e774c29f328d2af42eeb031958
commit c7c860d2d29ca3e774c29f328d2af42eeb031958
Author: YunQiang Su <syq@debian.org>
Date: Thu Jul 25 16:34:58 2019 +0100
When linking binary files into MIPS executables, default to MIPS 3 emaulation for 64-bit objects.
PR 24832
* elfxx-mips.c (mips_set_isa_flags): Default to MIPS 3 for 64-bit
mips inputs.
Diff:
---
bfd/ChangeLog | 6 ++++++
bfd/elfxx-mips.c | 6 ++++++
2 files changed, 12 insertions(+)
diff --git a/bfd/ChangeLog b/bfd/ChangeLog
index 028723b..53b84b0 100644
--- a/bfd/ChangeLog
+++ b/bfd/ChangeLog
@@ -1,3 +1,9 @@
+2019-07-25 YunQiang Su <syq@debian.org>
+
+ PR 24832
+ * elfxx-mips.c (mips_set_isa_flags): Default to MIPS 3 for 64-bit
+ mips inputs.
+
2019-07-24 Claudiu Zissulescu <claziss@synopsys.com>
* elf32-arc.c (bfd_get_32_me): Add a small description, fix
diff --git a/bfd/elfxx-mips.c b/bfd/elfxx-mips.c
index 29ae455..8e577b2 100644
--- a/bfd/elfxx-mips.c
+++ b/bfd/elfxx-mips.c
@@ -12193,6 +12193,12 @@ mips_set_isa_flags (bfd *abfd)
switch (bfd_get_mach (abfd))
{
default:
+ if (ABI_N32_P (abfd) || ABI_64_P (abfd))
+ val = E_MIPS_ARCH_3;
+ else
+ val = E_MIPS_ARCH_1;
+ break;
+
case bfd_mach_mips3000:
val = E_MIPS_ARCH_1;
break;