* aout-adobe.c (aout_32_bfd_reloc_name_lookup): Define.
[deliverable/binutils-gdb.git] / bfd / coff-z80.c
index 512c2b8677e6b378cda546c7240928adf2354530..39d467fe9a04ac3cb16f466f799c6522170d6a8b 100644 (file)
@@ -1,5 +1,5 @@
 /* BFD back-end for Zilog Z80 COFF binaries.
-   Copyright 2005 Free Software Foundation, Inc.
+   Copyright 2005, 2007 Free Software Foundation, Inc.
    Contributed by Arnold Metselaar <arnold_m@operamail.com>
 
    This file is part of BFD, the Binary File Descriptor library.
@@ -123,6 +123,26 @@ coff_z80_reloc_type_lookup (bfd *abfd ATTRIBUTE_UNUSED,
     }
 }
 
+static reloc_howto_type *
+coff_z80_reloc_name_lookup (bfd *abfd ATTRIBUTE_UNUSED,
+                           const char *r_name)
+{
+  if (strcasecmp (r_imm8.name, r_name) == 0)
+    return &r_imm8;
+  if (strcasecmp (r_imm16.name, r_name) == 0)
+    return &r_imm16;
+  if (strcasecmp (r_imm24.name, r_name) == 0)
+    return &r_imm24;
+  if (strcasecmp (r_imm32.name, r_name) == 0)
+    return &r_imm32;
+  if (strcasecmp (r_jr.name, r_name) == 0)
+    return &r_jr;
+  if (strcasecmp (r_off8.name, r_name) == 0)
+    return &r_off8;
+
+  return NULL;
+}
+
 /* Perform any necessary magic to the addend in a reloc entry.  */
 
 #define CALC_ADDEND(abfd, symbol, ext_reloc, cache_ptr) \
@@ -248,6 +268,7 @@ extra_case (bfd *in_abfd,
 
 #define coff_reloc16_extra_cases    extra_case
 #define coff_bfd_reloc_type_lookup  coff_z80_reloc_type_lookup
+#define coff_bfd_reloc_name_lookup coff_z80_reloc_name_lookup
 
 #include "coffcode.h"
 
This page took 0.025993 seconds and 4 git commands to generate.