aboutsummaryrefslogtreecommitdiff
path: root/bfd/coff-z8k.c
diff options
context:
space:
mode:
Diffstat (limited to 'bfd/coff-z8k.c')
-rw-r--r--bfd/coff-z8k.c27
1 files changed, 26 insertions, 1 deletions
diff --git a/bfd/coff-z8k.c b/bfd/coff-z8k.c
index 8fc2f16..3fb37d9 100644
--- a/bfd/coff-z8k.c
+++ b/bfd/coff-z8k.c
@@ -1,6 +1,6 @@
/* BFD back-end for Zilog Z800n COFF binaries.
Copyright 1992, 1993, 1994, 1995, 1997, 1999, 2000, 2001, 2002, 2003,
- 2004, 2005 Free Software Foundation, Inc.
+ 2004, 2005, 2007 Free Software Foundation, Inc.
Contributed by Cygnus Support.
Written by Steve Chamberlain, <sac@cygnus.com>.
@@ -135,6 +135,30 @@ coff_z8k_reloc_type_lookup (bfd *abfd ATTRIBUTE_UNUSED,
}
}
+static reloc_howto_type *
+coff_z8k_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_da.name, r_name) == 0)
+ return &r_da;
+ 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_rel16.name, r_name) == 0)
+ return &r_rel16;
+ if (strcasecmp (r_disp7.name, r_name) == 0)
+ return &r_disp7;
+ if (strcasecmp (r_callr.name, r_name) == 0)
+ return &r_callr;
+ if (strcasecmp (r_imm4l.name, r_name) == 0)
+ return &r_imm4l;
+
+ return NULL;
+}
+
/* Perform any necessary magic to the addend in a reloc entry. */
#define CALC_ADDEND(abfd, symbol, ext_reloc, cache_ptr) \
@@ -345,6 +369,7 @@ extra_case (bfd *in_abfd,
#define coff_reloc16_extra_cases extra_case
#define coff_bfd_reloc_type_lookup coff_z8k_reloc_type_lookup
+#define coff_bfd_reloc_name_lookup coff_z8k_reloc_name_lookup
#include "coffcode.h"