summaryrefslogtreecommitdiffstats
path: root/contrib/binutils/bfd/coff-sparc.c
diff options
context:
space:
mode:
Diffstat (limited to 'contrib/binutils/bfd/coff-sparc.c')
-rw-r--r--contrib/binutils/bfd/coff-sparc.c22
1 files changed, 20 insertions, 2 deletions
diff --git a/contrib/binutils/bfd/coff-sparc.c b/contrib/binutils/bfd/coff-sparc.c
index 0236f52..236c7bf 100644
--- a/contrib/binutils/bfd/coff-sparc.c
+++ b/contrib/binutils/bfd/coff-sparc.c
@@ -1,6 +1,6 @@
/* BFD back-end for Sparc COFF files.
Copyright 1990, 1991, 1992, 1993, 1994, 1995, 1996, 1999, 2000, 2001,
- 2002, 2003, 2005 Free Software Foundation, Inc.
+ 2002, 2003, 2005, 2007 Free Software Foundation, Inc.
Written by Cygnus Support.
This file is part of BFD, the Binary File Descriptor library.
@@ -19,8 +19,8 @@ You should have received a copy of the GNU General Public License
along with this program; if not, write to the Free Software
Foundation, Inc., 51 Franklin Street - Fifth Floor, Boston, MA 02110-1301, USA. */
-#include "bfd.h"
#include "sysdep.h"
+#include "bfd.h"
#include "libbfd.h"
#include "coff/sparc.h"
#include "coff/internal.h"
@@ -158,6 +158,24 @@ coff_sparc_reloc_type_lookup (abfd, code)
}
#define coff_bfd_reloc_type_lookup coff_sparc_reloc_type_lookup
+static reloc_howto_type *
+coff_sparc_reloc_name_lookup (bfd *abfd ATTRIBUTE_UNUSED,
+ const char *r_name)
+{
+ unsigned int i;
+
+ for (i = 0;
+ i < (sizeof (coff_sparc_howto_table)
+ / sizeof (coff_sparc_howto_table[0]));
+ i++)
+ if (coff_sparc_howto_table[i].name != NULL
+ && strcasecmp (coff_sparc_howto_table[i].name, r_name) == 0)
+ return &coff_sparc_howto_table[i];
+
+ return NULL;
+}
+#define coff_bfd_reloc_name_lookup coff_sparc_reloc_name_lookup
+
static void
rtype2howto (cache_ptr, dst)
arelent *cache_ptr;
OpenPOWER on IntegriCloud