aboutsummaryrefslogtreecommitdiff
path: root/bfd/coff-tic4x.c
diff options
context:
space:
mode:
Diffstat (limited to 'bfd/coff-tic4x.c')
-rw-r--r--bfd/coff-tic4x.c19
1 files changed, 18 insertions, 1 deletions
diff --git a/bfd/coff-tic4x.c b/bfd/coff-tic4x.c
index 1e95411..25bed8d 100644
--- a/bfd/coff-tic4x.c
+++ b/bfd/coff-tic4x.c
@@ -1,5 +1,5 @@
/* BFD back-end for TMS320C4X coff binaries.
- Copyright 1996, 1997, 1998, 1999, 2000, 2002, 2003, 2005
+ Copyright 1996, 1997, 1998, 1999, 2000, 2002, 2003, 2005, 2007
Free Software Foundation, Inc.
Contributed by Michael Hayes (m.hayes@elec.canterbury.ac.nz)
@@ -117,6 +117,8 @@ reloc_howto_type tic4x_howto_table[] =
#undef coff_bfd_reloc_type_lookup
#define coff_bfd_reloc_type_lookup tic4x_coff_reloc_type_lookup
+#undef coff_bfd_reloc_name_lookup
+#define coff_bfd_reloc_name_lookup tic4x_coff_reloc_name_lookup
/* For the case statement use the code values used tc_gen_reloc (defined in
bfd/reloc.c) to map to the howto table entries. */
@@ -150,6 +152,21 @@ tic4x_coff_reloc_type_lookup (abfd, code)
return NULL;
}
+static reloc_howto_type *
+tic4x_coff_reloc_name_lookup (bfd *abfd ATTRIBUTE_UNUSED,
+ const char *r_name)
+{
+ unsigned int i;
+
+ for (i = 0;
+ i < sizeof (tic4x_howto_table) / sizeof (tic4x_howto_table[0]);
+ i++)
+ if (tic4x_howto_table[i].name != NULL
+ && strcasecmp (tic4x_howto_table[i].name, r_name) == 0)
+ return &tic4x_howto_table[i];
+
+ return NULL;
+}
/* Code to turn a r_type into a howto ptr, uses the above howto table.
Called after some initial checking by the tic4x_rtype_to_howto fn