2007-08-24 Joseph Myers <joseph@codesourcery.com>
[deliverable/binutils-gdb.git] / bfd / aout-arm.c
index d88d22885bfbb6f689c71c3e9b23ec853cdf36ec..a533cd63073c86ebb4b30617fd7cc29dde538268 100644 (file)
@@ -1,13 +1,13 @@
 /* BFD back-end for raw ARM a.out binaries.
-   Copyright 1994, 1995, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2005
-   Free Software Foundation, Inc.
+   Copyright 1994, 1995, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2005,
+   2007 Free Software Foundation, Inc.
    Contributed by Richard Earnshaw (rwe@pegasus.esprit.ec.org)
 
    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.  */
 
-#include "bfd.h"
 #include "sysdep.h"
+#include "bfd.h"
 
 /* Avoid multiple definitions from aoutx if supporting standard a.out
    as well as our own.  */
@@ -50,6 +50,7 @@
 #define N_MAGIC(x) ((x).a_info & ~07200)
 
 #define MY_bfd_reloc_type_lookup aoutarm_bfd_reloc_type_lookup
+#define MY_bfd_reloc_name_lookup aoutarm_bfd_reloc_name_lookup
 
 #include "libaout.h"
 #include "aout/aout64.h"
@@ -317,6 +318,22 @@ MY (bfd_reloc_type_lookup) (bfd *abfd,
     }
 }
 
+static reloc_howto_type *
+MY (bfd_reloc_name_lookup) (bfd *abfd ATTRIBUTE_UNUSED,
+                           const char *r_name)
+{
+  unsigned int i;
+
+  for (i = 0;
+       i < sizeof (MY (howto_table)) / sizeof (MY (howto_table)[0]);
+       i++)
+    if (MY (howto_table)[i].name != NULL
+       && strcasecmp (MY (howto_table)[i].name, r_name) == 0)
+      return &MY (howto_table)[i];
+
+  return NULL;
+}
+
 #define MY_swap_std_reloc_in     MY (swap_std_reloc_in)
 #define MY_swap_std_reloc_out    MY (swap_std_reloc_out)
 #define MY_get_section_contents  _bfd_generic_get_section_contents
This page took 0.024291 seconds and 4 git commands to generate.