Mention PR ld/4701.
[deliverable/binutils-gdb.git] / bfd / elf32-mep.c
index aec3f66bac7a98064ae11b1b1871e42d75c6f7f6..1db8346436d253b4f3781c97b988b5bacff8695b 100644 (file)
@@ -18,8 +18,8 @@
    along with this program; if not, write to the Free Software
    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/mep.h"
@@ -168,6 +168,20 @@ mep_reloc_type_lookup
 
 #undef MAP
 
+static reloc_howto_type *
+mep_reloc_name_lookup (bfd *abfd ATTRIBUTE_UNUSED, const char *r_name)
+{
+  unsigned int i;
+
+  for (i = 0;
+       i < sizeof (mep_elf_howto_table) / sizeof (mep_elf_howto_table[0]);
+       i++)
+    if (mep_elf_howto_table[i].name != NULL
+       && strcasecmp (mep_elf_howto_table[i].name, r_name) == 0)
+      return &mep_elf_howto_table[i];
+
+  return NULL;
+}
 \f
 /* Perform a single relocation.  */
 
@@ -929,6 +943,7 @@ mep_elf_fake_sections (bfd *               abfd ATTRIBUTE_UNUSED,
 #define elf_backend_can_gc_sections            1
 
 #define bfd_elf32_bfd_reloc_type_lookup                mep_reloc_type_lookup
+#define bfd_elf32_bfd_reloc_name_lookup        mep_reloc_name_lookup
 #define bfd_elf32_bfd_set_private_flags                mep_elf_set_private_flags
 #define bfd_elf32_bfd_copy_private_bfd_data    mep_elf_copy_private_bfd_data
 #define bfd_elf32_bfd_merge_private_bfd_data   mep_elf_merge_private_bfd_data
This page took 0.023087 seconds and 4 git commands to generate.