* elflink.c (_bfd_elf_merge_symbol): Revert previous patch.
[deliverable/binutils-gdb.git] / bfd / elf32-or32.c
index 546aa151f5c80a44e2d238c2ddc817cbcb61bcaf..466d43d02e71ae3761f176c1dc7709a3b03f92e9 100644 (file)
@@ -1,12 +1,12 @@
 /* OR32-specific support for 32-bit ELF
-   Copyright 2002, 2004, 2005 Free Software Foundation, Inc.
+   Copyright 2002, 2004, 2005, 2007 Free Software Foundation, Inc.
    Contributed by Ivan Guzvinec  <ivang@opencores.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., 51 Franklin Street - Fifth Floor, 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"
 #include "libbfd.h"
 #include "elf-bfd.h"
 #include "elf/or32.h"
@@ -466,6 +467,22 @@ bfd_elf32_bfd_reloc_type_lookup (bfd *abfd ATTRIBUTE_UNUSED,
   return NULL;
 }
 
+static reloc_howto_type *
+bfd_elf32_bfd_reloc_name_lookup (bfd *abfd ATTRIBUTE_UNUSED,
+                                const char *r_name)
+{
+  unsigned int i;
+
+  for (i = 0;
+       i < sizeof (elf_or32_howto_table) / sizeof (elf_or32_howto_table[0]);
+       i++)
+    if (elf_or32_howto_table[i].name != NULL
+       && strcasecmp (elf_or32_howto_table[i].name, r_name) == 0)
+      return &elf_or32_howto_table[i];
+
+  return NULL;
+}
+
 /* Set the howto pointer for an OR32 ELF reloc.  */
 
 static void
This page took 0.023989 seconds and 4 git commands to generate.