diff options
Diffstat (limited to 'bfd/coff-ppc.c')
-rw-r--r-- | bfd/coff-ppc.c | 20 |
1 files changed, 18 insertions, 2 deletions
diff --git a/bfd/coff-ppc.c b/bfd/coff-ppc.c index 0ef3785..611c9e0 100644 --- a/bfd/coff-ppc.c +++ b/bfd/coff-ppc.c @@ -1,6 +1,6 @@ /* BFD back-end for PowerPC Microsoft Portable Executable files. Copyright 1990, 1991, 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999, - 2000, 2001, 2002, 2003, 2004, 2005, 2006 + 2000, 2001, 2002, 2003, 2004, 2005, 2006, 2007 Free Software Foundation, Inc. Original version pieced together by Kim Knuttila (krk@cygnus.com) @@ -1961,8 +1961,23 @@ ppc_coff_reloc_type_lookup (abfd, code) return NULL; } } - #undef HOW2MAP + +static reloc_howto_type * +ppc_coff_reloc_name_lookup (bfd *abfd ATTRIBUTE_UNUSED, + const char *r_name) +{ + unsigned int i; + + for (i = 0; + i < sizeof (ppc_coff_howto_table) / sizeof (ppc_coff_howto_table[0]); + i++) + if (ppc_coff_howto_table[i].name != NULL + && strcasecmp (ppc_coff_howto_table[i].name, r_name) == 0) + return &ppc_coff_howto_table[i]; + + return NULL; +} /* Tailor coffcode.h -- macro heaven. */ @@ -1971,6 +1986,7 @@ ppc_coff_reloc_type_lookup (abfd, code) /* We use the special COFF backend linker, with our own special touch. */ #define coff_bfd_reloc_type_lookup ppc_coff_reloc_type_lookup +#define coff_bfd_reloc_name_lookup ppc_coff_reloc_name_lookup #define coff_rtype_to_howto coff_ppc_rtype_to_howto #define coff_relocate_section coff_ppc_relocate_section #define coff_bfd_final_link ppc_bfd_coff_final_link |