summaryrefslogtreecommitdiff
path: root/bfd/coff-tic30.c
diff options
context:
space:
mode:
Diffstat (limited to 'bfd/coff-tic30.c')
-rw-r--r--bfd/coff-tic30.c21
1 files changed, 20 insertions, 1 deletions
diff --git a/bfd/coff-tic30.c b/bfd/coff-tic30.c
index b1ff5dbdfb..b98c728cd6 100644
--- a/bfd/coff-tic30.c
+++ b/bfd/coff-tic30.c
@@ -1,5 +1,6 @@
/* BFD back-end for TMS320C30 coff binaries.
- Copyright 1998, 1999, 2000, 2001, 2002 Free Software Foundation, Inc.
+ Copyright 1998, 1999, 2000, 2001, 2002, 2007
+ Free Software Foundation, Inc.
Contributed by Steven Haworth (steve@pm.cse.rmit.edu.au)
This file is part of BFD, the Binary File Descriptor library.
@@ -52,6 +53,7 @@ reloc_howto_type tic30_coff_howto_table[] =
#ifndef coff_bfd_reloc_type_lookup
#define coff_bfd_reloc_type_lookup tic30_coff_reloc_type_lookup
+#define coff_bfd_reloc_name_lookup tic30_coff_reloc_name_lookup
/* For the case statement use the code values used in tc_gen_reloc to
map to the howto table entries that match those in both the aout
@@ -80,6 +82,23 @@ tic30_coff_reloc_type_lookup (abfd, code)
}
}
+static reloc_howto_type *
+tic30_coff_reloc_name_lookup (bfd *abfd ATTRIBUTE_UNUSED,
+ const char *r_name)
+{
+ unsigned int i;
+
+ for (i = 0;
+ i < (sizeof (tic30_coff_howto_table)
+ / sizeof (tic30_coff_howto_table[0]));
+ i++)
+ if (tic30_coff_howto_table[i].name != NULL
+ && strcasecmp (tic30_coff_howto_table[i].name, r_name) == 0)
+ return &tic30_coff_howto_table[i];
+
+ return NULL;
+}
+
#endif
/* Turn a howto into a reloc number. */