* gas/config/tc-avr.c: Change ISA for devices with USB support to
[external/binutils.git] / bfd / elf32-arc.c
index a6011bd..3ef83f9 100644 (file)
@@ -1,5 +1,5 @@
 /* ARC-specific support for 32-bit ELF
-   Copyright 1994, 1995, 1997, 1999, 2001, 2002, 2005
+   Copyright 1994, 1995, 1997, 1999, 2001, 2002, 2005, 2007
    Free Software Foundation, Inc.
    Contributed by Doug Evans (dje@cygnus.com).
 
@@ -7,7 +7,7 @@
 
    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,
@@ -20,8 +20,8 @@
    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/arc.h"
@@ -147,6 +147,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_arc_howto_table) / sizeof (elf_arc_howto_table[0]);
+       i++)
+    if (elf_arc_howto_table[i].name != NULL
+       && strcasecmp (elf_arc_howto_table[i].name, r_name) == 0)
+      return &elf_arc_howto_table[i];
+
+  return NULL;
+}
+
 /* Set the howto pointer for an ARC ELF reloc.  */
 
 static void