* gdb.mi/var-cmd.c (do_locals_tests): Define lcharacter as a
[deliverable/binutils-gdb.git] / bfd / elf32-crx.c
index 438c1c26682a751f8e285f4274850b26555b9904..b0db783b17af4e102b313f7fb32e784e67e1b5e0 100644 (file)
@@ -6,7 +6,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,
 
    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 "bfdlink.h"
 #include "libbfd.h"
 #include "elf-bfd.h"
@@ -399,6 +400,22 @@ elf_crx_reloc_type_lookup (bfd *abfd ATTRIBUTE_UNUSED,
   return 0;
 }
 
+static reloc_howto_type *
+elf_crx_reloc_name_lookup (bfd *abfd ATTRIBUTE_UNUSED,
+                          const char *r_name)
+{
+  unsigned int i;
+
+  for (i = 0;
+       i < sizeof (crx_elf_howto_table) / sizeof (crx_elf_howto_table[0]);
+       i++)
+    if (crx_elf_howto_table[i].name != NULL
+       && strcasecmp (crx_elf_howto_table[i].name, r_name) == 0)
+      return &crx_elf_howto_table[i];
+
+  return NULL;
+}
+
 /* Retrieve a howto ptr using an internal relocation entry.  */
 
 static void
@@ -1311,6 +1328,8 @@ elf32_crx_relax_section (bfd *abfd, asection *sec,
 #define elf_symbol_leading_char                '_'
 
 #define bfd_elf32_bfd_reloc_type_lookup        elf_crx_reloc_type_lookup
+#define bfd_elf32_bfd_reloc_name_lookup \
+                                       elf_crx_reloc_name_lookup
 #define elf_info_to_howto              elf_crx_info_to_howto
 #define elf_info_to_howto_rel          0
 #define elf_backend_relocate_section   elf32_crx_relocate_section
This page took 0.025144 seconds and 4 git commands to generate.