diff options
author | Dimitry Andric <dim@FreeBSD.org> | 2010-10-30 23:02:32 +0000 |
---|---|---|
committer | Dimitry Andric <dim@FreeBSD.org> | 2010-10-30 23:02:32 +0000 |
commit | b3cded65e92ba4d9b5e5a33fb95c4d551bda9c1b (patch) | |
tree | 69d40fbef2c0c4ee32fe97b7a28b510f2e3c2dbc /bfd/coff-mips.c | |
parent | 7a815afd9b5121ee0f65dc1e1de1c0de6de97679 (diff) |
Notes
Diffstat (limited to 'bfd/coff-mips.c')
-rw-r--r-- | bfd/coff-mips.c | 21 |
1 files changed, 19 insertions, 2 deletions
diff --git a/bfd/coff-mips.c b/bfd/coff-mips.c index 34b072c4138e..d5dafc7bf35f 100644 --- a/bfd/coff-mips.c +++ b/bfd/coff-mips.c @@ -1,6 +1,6 @@ /* BFD back-end for MIPS Extended-Coff files. Copyright 1990, 1991, 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999, - 2000, 2001, 2002, 2003, 2004 + 2000, 2001, 2002, 2003, 2004, 2007 Free Software Foundation, Inc. Original version by Per Bothner. Full support added by Ian Lance Taylor, ian@cygnus.com. @@ -21,8 +21,8 @@ You should have received a copy of the GNU General Public License along with this program; if not, write to the Free Software Foundation, Inc., 51 Franklin Street - Fifth Floor, Boston, MA 02110-1301, USA. */ -#include "bfd.h" #include "sysdep.h" +#include "bfd.h" #include "bfdlink.h" #include "libbfd.h" #include "coff/internal.h" @@ -769,6 +769,22 @@ mips_bfd_reloc_type_lookup (abfd, code) return &mips_howto_table[mips_type]; } + +static reloc_howto_type * +mips_bfd_reloc_name_lookup (bfd *abfd ATTRIBUTE_UNUSED, + const char *r_name) +{ + unsigned int i; + + for (i = 0; + i < sizeof (mips_howto_table) / sizeof (mips_howto_table[0]); + i++) + if (mips_howto_table[i].name != NULL + && strcasecmp (mips_howto_table[i].name, r_name) == 0) + return &mips_howto_table[i]; + + return NULL; +} /* A helper routine for mips_relocate_section which handles the REFHI relocations. The REFHI relocation must be followed by a REFLO @@ -1375,6 +1391,7 @@ static const struct ecoff_backend_data mips_ecoff_backend_data = /* Looking up a reloc type is MIPS specific. */ #define _bfd_ecoff_bfd_reloc_type_lookup mips_bfd_reloc_type_lookup +#define _bfd_ecoff_bfd_reloc_name_lookup mips_bfd_reloc_name_lookup /* Getting relocated section contents is generic. */ #define _bfd_ecoff_bfd_get_relocated_section_contents \ |