summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAlan Modra <amodra@bigpond.net.au>2008-07-26 13:10:47 +0000
committerAlan Modra <amodra@bigpond.net.au>2008-07-26 13:10:47 +0000
commitb9036a122d8b583d830a2d5081e2d29ee4164346 (patch)
treee3479f692ede6a81acebd70417dc0e907c5f768e
parentee8b9a7f16e638c4610fc1f4daf87abddc209ac1 (diff)
downloadgdb-b9036a122d8b583d830a2d5081e2d29ee4164346.tar.gz
Support PowerPC single-precision float.
-rw-r--r--bfd/ChangeLog5
-rw-r--r--bfd/elf32-ppc.c16
-rw-r--r--include/elf/ChangeLog4
-rw-r--r--include/elf/ppc.h5
4 files changed, 26 insertions, 4 deletions
diff --git a/bfd/ChangeLog b/bfd/ChangeLog
index 23b8d93d87a..02dbbb14e83 100644
--- a/bfd/ChangeLog
+++ b/bfd/ChangeLog
@@ -1,3 +1,8 @@
+2008-07-26 Michael Eager <eager@eagercon.com>
+
+ * elf32-ppc.c (ppc_elf_merge_obj_attributes): Check compatibility
+ between single-float, double-float, and soft-float.
+
2008-07-24 Daniel Jacobowitz <dan@codesourcery.com>
* elf32-mips.c (elf_backend_write_section): Define.
diff --git a/bfd/elf32-ppc.c b/bfd/elf32-ppc.c
index 92f812fda30..22b90b26a4a 100644
--- a/bfd/elf32-ppc.c
+++ b/bfd/elf32-ppc.c
@@ -3883,10 +3883,22 @@ ppc_elf_merge_obj_attributes (bfd *ibfd, bfd *obfd)
else if (out_attr->i == 1 && in_attr->i == 2)
_bfd_error_handler
(_("Warning: %B uses hard float, %B uses soft float"), obfd, ibfd);
- else if (out_attr->i == 2 && in_attr->i == 1)
+ else if (out_attr->i == 1 && in_attr->i == 3)
+ _bfd_error_handler
+ (_("Warning: %B uses double-precision hard float, %B uses single-precision hard float"),
+ obfd, ibfd);
+ else if (out_attr->i == 3 && in_attr->i == 1)
+ _bfd_error_handler
+ (_("Warning: %B uses double-precision hard float, %B uses single-precision hard float"),
+ ibfd, obfd);
+ else if (out_attr->i == 3 && in_attr->i == 2)
+ _bfd_error_handler
+ (_("Warning: %B uses soft float, %B uses single-precision hard float"),
+ ibfd, obfd);
+ else if (out_attr->i == 2 && (in_attr->i == 1 || in_attr->i == 3))
_bfd_error_handler
(_("Warning: %B uses hard float, %B uses soft float"), ibfd, obfd);
- else if (in_attr->i > 2)
+ else if (in_attr->i > 3)
_bfd_error_handler
(_("Warning: %B uses unknown floating point ABI %d"), ibfd,
in_attr->i);
diff --git a/include/elf/ChangeLog b/include/elf/ChangeLog
index 71a54cd912a..62bce3e6c90 100644
--- a/include/elf/ChangeLog
+++ b/include/elf/ChangeLog
@@ -1,3 +1,7 @@
+2008-07-26 Michael Eager <eager@eagercon.com>
+
+ * ppc.h: Add description of single-precision.
+
2008-07-21 Luis Machado <luisgpm@br.ibm.com>
* common.h: Define NT_PPC_VSX.
diff --git a/include/elf/ppc.h b/include/elf/ppc.h
index 5d4462b0694..95cccce2481 100644
--- a/include/elf/ppc.h
+++ b/include/elf/ppc.h
@@ -1,5 +1,5 @@
/* PPC ELF support for BFD.
- Copyright 1995, 1996, 1998, 2000, 2001, 2002, 2003, 2005
+ Copyright 1995, 1996, 1998, 2000, 2001, 2002, 2003, 2005, 2007, 2008
Free Software Foundation, Inc.
By Michael Meissner, Cygnus Support, <meissner@cygnus.com>, from information
@@ -177,7 +177,8 @@ enum
{
/* 0-3 are generic. */
Tag_GNU_Power_ABI_FP = 4, /* Value 1 for hard-float, 2 for
- soft-float; 0 for not tagged or not
+ soft-float, 3 for single=precision
+ hard-float; 0 for not tagged or not
using any ABIs affected by the
differences. */