summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--bfd/ChangeLog6
-rw-r--r--bfd/elfxx-mips.c17
-rw-r--r--include/elf/ChangeLog4
-rw-r--r--include/elf/mips.h3
4 files changed, 30 insertions, 0 deletions
diff --git a/bfd/ChangeLog b/bfd/ChangeLog
index 7c1f5920c79..0292400a7fc 100644
--- a/bfd/ChangeLog
+++ b/bfd/ChangeLog
@@ -1,3 +1,9 @@
+2013-07-12 Maciej W. Rozycki <macro@codesourcery.com>
+
+ * elfxx-mips.c (_bfd_mips_elf_merge_private_bfd_data): Handle
+ EF_MIPS_NAN2008.
+ (_bfd_mips_elf_print_private_bfd_data): Likewise.
+
2013-07-09 Tristan Gingold <gingold@adacore.com>
* vms-alpha.c (struct vms_private_data_struct): Remove
diff --git a/bfd/elfxx-mips.c b/bfd/elfxx-mips.c
index 63fb508b873..b7138cfbfb8 100644
--- a/bfd/elfxx-mips.c
+++ b/bfd/elfxx-mips.c
@@ -14730,6 +14730,20 @@ _bfd_mips_elf_merge_private_bfd_data (bfd *ibfd, bfd *obfd)
old_flags &= ~ EF_MIPS_ARCH_ASE;
}
+ /* Compare NaN encodings. */
+ if ((new_flags & EF_MIPS_NAN2008) != (old_flags & EF_MIPS_NAN2008))
+ {
+ _bfd_error_handler (_("%B: linking %s module with previous %s modules"),
+ ibfd,
+ (new_flags & EF_MIPS_NAN2008
+ ? "-mnan=2008" : "-mnan=legacy"),
+ (old_flags & EF_MIPS_NAN2008
+ ? "-mnan=2008" : "-mnan=legacy"));
+ ok = FALSE;
+ new_flags &= ~EF_MIPS_NAN2008;
+ old_flags &= ~EF_MIPS_NAN2008;
+ }
+
/* Warn about any other mismatches */
if (new_flags != old_flags)
{
@@ -14921,6 +14935,9 @@ _bfd_mips_elf_print_private_bfd_data (bfd *abfd, void *ptr)
if (elf_elfheader (abfd)->e_flags & EF_MIPS_ARCH_ASE_MICROMIPS)
fprintf (file, " [micromips]");
+ if (elf_elfheader (abfd)->e_flags & EF_MIPS_NAN2008)
+ fprintf (file, " [nan2008]");
+
if (elf_elfheader (abfd)->e_flags & EF_MIPS_32BITMODE)
fprintf (file, " [32bitmode]");
else
diff --git a/include/elf/ChangeLog b/include/elf/ChangeLog
index 2edd1dfcce8..6309d1c84d6 100644
--- a/include/elf/ChangeLog
+++ b/include/elf/ChangeLog
@@ -1,3 +1,7 @@
+2013-07-12 Maciej W. Rozycki <macro@codesourcery.com>
+
+ * mips.h (EF_MIPS_NAN2008): New macro.
+
2013-07-08 Tristan Gingold <gingold@adacore.com>
* ia64.h (STB_VMS_WEAK, STB_VMS_SYSTEM): Add.
diff --git a/include/elf/mips.h b/include/elf/mips.h
index f3be987a0ab..84700b4bdd7 100644
--- a/include/elf/mips.h
+++ b/include/elf/mips.h
@@ -191,6 +191,9 @@ END_RELOC_NUMBERS (R_MIPS_maxext)
(regs are 32-bits wide). */
#define EF_MIPS_32BITMODE 0x00000100
+/* Code in file uses the IEEE 754-2008 NaN encoding convention. */
+#define EF_MIPS_NAN2008 0x00000400
+
/* Architectural Extensions used by this file */
#define EF_MIPS_ARCH_ASE 0x0f000000