summaryrefslogtreecommitdiff
path: root/bfd/coff-tic54x.c
diff options
context:
space:
mode:
Diffstat (limited to 'bfd/coff-tic54x.c')
-rw-r--r--bfd/coff-tic54x.c19
1 files changed, 18 insertions, 1 deletions
diff --git a/bfd/coff-tic54x.c b/bfd/coff-tic54x.c
index f16fe899671..f651a10618a 100644
--- a/bfd/coff-tic54x.c
+++ b/bfd/coff-tic54x.c
@@ -1,5 +1,5 @@
/* BFD back-end for TMS320C54X coff binaries.
- Copyright 1999, 2000, 2001, 2002, 2003, 2004, 2005
+ Copyright 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2007
Free Software Foundation, Inc.
Contributed by Timothy Wall (twall@cygnus.com)
@@ -229,6 +229,7 @@ reloc_howto_type tic54x_howto_table[] =
};
#define coff_bfd_reloc_type_lookup tic54x_coff_reloc_type_lookup
+#define coff_bfd_reloc_name_lookup tic54x_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. */
@@ -259,6 +260,22 @@ tic54x_coff_reloc_type_lookup (abfd, code)
}
}
+static reloc_howto_type *
+tic54x_coff_reloc_name_lookup (bfd *abfd ATTRIBUTE_UNUSED,
+ const char *r_name)
+{
+ unsigned int i;
+
+ for (i = 0;
+ i < sizeof (tic54x_howto_table) / sizeof (tic54x_howto_table[0]);
+ i++)
+ if (tic54x_howto_table[i].name != NULL
+ && strcasecmp (tic54x_howto_table[i].name, r_name) == 0)
+ return &tic54x_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 tic54x_rtype_to_howto fn below. */