aboutsummaryrefslogtreecommitdiff
path: root/bfd/coff-z80.c
diff options
context:
space:
mode:
Diffstat (limited to 'bfd/coff-z80.c')
-rw-r--r--bfd/coff-z80.c23
1 files changed, 22 insertions, 1 deletions
diff --git a/bfd/coff-z80.c b/bfd/coff-z80.c
index 512c2b8..39d467f 100644
--- a/bfd/coff-z80.c
+++ b/bfd/coff-z80.c
@@ -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"