* gdb.ada/ptype_field/pck.ads, gdb.ada/ptype_field/pck.adb,
[deliverable/binutils-gdb.git] / bfd / pe-mips.c
index 060b825a8085295699b0530e9912fedf6c93499b..81aeb68caabdc148749f590d3e77b56666f8fdc7 100644 (file)
@@ -1,13 +1,13 @@
 /* BFD back-end for MIPS PE COFF files.
    Copyright 1990, 1991, 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999,
-   2000, 2001, 2002, 2003, 2004, 2005 Free Software Foundation, Inc.
+   2000, 2001, 2002, 2003, 2004, 2005, 2007 Free Software Foundation, Inc.
    Modified from coff-i386.c by DJ Delorie, dj@cygnus.com
 
    This file is part of BFD, the Binary File Descriptor library.
 
    This program is free software; you can redistribute it and/or modify
    it under the terms of the GNU General Public License as published by
-   the Free Software Foundation; either version 2 of the License, or
+   the Free Software Foundation; either version 3 of the License, or
    (at your option) any later version.
 
    This program is distributed in the hope that it will be useful,
 
    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., 59 Temple Place - Suite 330, Boston, MA 02110-1301, USA.  */
+   Foundation, Inc., 51 Franklin Street - Fifth Floor, Boston,
+   MA 02110-1301, USA.  */
 
 #define COFF_WITH_PE
 #define COFF_LONG_SECTION_NAMES
 #define PCRELOFFSET TRUE
 
-#include "bfd.h"
 #include "sysdep.h"
+#include "bfd.h"
 #include "libbfd.h"
 #include "coff/mipspe.h"
 #include "coff/internal.h"
@@ -453,6 +454,7 @@ coff_mips_rtype_to_howto (bfd *abfd ATTRIBUTE_UNUSED,
 
 #define coff_rtype_to_howto         coff_mips_rtype_to_howto
 #define coff_bfd_reloc_type_lookup  coff_mips_reloc_type_lookup
+#define coff_bfd_reloc_name_lookup coff_mips_reloc_name_lookup
 
 /* Get the howto structure for a generic reloc type.  */
 
@@ -496,6 +498,22 @@ coff_mips_reloc_type_lookup (bfd *abfd ATTRIBUTE_UNUSED,
   return & howto_table [mips_type];
 }
 
+static reloc_howto_type *
+coff_mips_reloc_name_lookup (bfd *abfd ATTRIBUTE_UNUSED,
+                            const char *r_name)
+{
+  unsigned int i;
+
+  for (i = 0;
+       i < sizeof (howto_table) / sizeof (howto_table[0]);
+       i++)
+    if (howto_table[i].name != NULL
+       && strcasecmp (howto_table[i].name, r_name) == 0)
+      return &howto_table[i];
+
+  return NULL;
+}
+
 static void
 mips_swap_reloc_in (bfd * abfd, void * src, void * dst)
 {
This page took 0.023954 seconds and 4 git commands to generate.