X-Git-Url: http://drtracing.org/?a=blobdiff_plain;f=bfd%2Fpe-mips.c;h=31b87f42e6e55fe7355e6393aa50a3d9f030838c;hb=348f8c02f44abcb5f5b0ab1a0c597001ee35da79;hp=a6cc489c0f02ee47f79c6b362795accfe38ea62c;hpb=7920ce38c3e43d462e360b21db6cc9c17a40b4f4;p=deliverable%2Fbinutils-gdb.git diff --git a/bfd/pe-mips.c b/bfd/pe-mips.c index a6cc489c0f..31b87f42e6 100644 --- a/bfd/pe-mips.c +++ b/bfd/pe-mips.c @@ -1,13 +1,14 @@ /* BFD back-end for MIPS PE COFF files. Copyright 1990, 1991, 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999, - 2000, 2001, 2002, 2003, 2004, 2005 Free Software Foundation, Inc. + 2000, 2001, 2002, 2003, 2004, 2005, 2007, 2008, 2009 + Free Software Foundation, Inc. Modified from coff-i386.c by DJ Delorie, dj@cygnus.com This file is part of BFD, the Binary File Descriptor library. This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by - the Free Software Foundation; either version 2 of the License, or + the Free Software Foundation; either version 3 of the License, or (at your option) any later version. This program is distributed in the hope that it will be useful, @@ -17,14 +18,21 @@ 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., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */ + Foundation, Inc., 51 Franklin Street - Fifth Floor, Boston, + MA 02110-1301, USA. */ #define COFF_WITH_PE +/* pei-mips.c may have defined this to default off (0) before + including this file, so don't redefine if that's the case. + Otherwise we're generating objects, not executable images, + so we want to define it to default on. */ +#ifndef COFF_LONG_SECTION_NAMES #define COFF_LONG_SECTION_NAMES +#endif /* COFF_LONG_SECTION_NAMES */ #define PCRELOFFSET TRUE -#include "bfd.h" #include "sysdep.h" +#include "bfd.h" #include "libbfd.h" #include "coff/mipspe.h" #include "coff/internal.h" @@ -453,6 +461,7 @@ coff_mips_rtype_to_howto (bfd *abfd ATTRIBUTE_UNUSED, #define coff_rtype_to_howto coff_mips_rtype_to_howto #define coff_bfd_reloc_type_lookup coff_mips_reloc_type_lookup +#define coff_bfd_reloc_name_lookup coff_mips_reloc_name_lookup /* Get the howto structure for a generic reloc type. */ @@ -496,6 +505,22 @@ coff_mips_reloc_type_lookup (bfd *abfd ATTRIBUTE_UNUSED, return & howto_table [mips_type]; } +static reloc_howto_type * +coff_mips_reloc_name_lookup (bfd *abfd ATTRIBUTE_UNUSED, + const char *r_name) +{ + unsigned int i; + + for (i = 0; + i < sizeof (howto_table) / sizeof (howto_table[0]); + i++) + if (howto_table[i].name != NULL + && strcasecmp (howto_table[i].name, r_name) == 0) + return &howto_table[i]; + + return NULL; +} + static void mips_swap_reloc_in (bfd * abfd, void * src, void * dst) { @@ -833,6 +858,10 @@ coff_mips_is_local_label_name (bfd *abfd, const char *name) #define COFF_NO_HACK_SCNHDR_SIZE +#ifndef bfd_pe_print_pdata +#define bfd_pe_print_pdata NULL +#endif + #include "coffcode.h" const bfd_target