X-Git-Url: http://drtracing.org/?a=blobdiff_plain;f=bfd%2Fcoff-sparc.c;h=a9a699aec920d05ae371d5ffe563504091cee152;hb=c7e2358a8849d7540212543e1a2acbac648cb973;hp=acfa6d4924a54e9c870ea4240df10c48012a67ca;hpb=3fa785190a4f36a8889eea2fd2cb6c8ff90f3fa4;p=deliverable%2Fbinutils-gdb.git diff --git a/bfd/coff-sparc.c b/bfd/coff-sparc.c index acfa6d4924..a9a699aec9 100644 --- a/bfd/coff-sparc.c +++ b/bfd/coff-sparc.c @@ -1,26 +1,27 @@ /* BFD back-end for Sparc COFF files. - Copyright 1990, 1991, 1992, 1993, 1994, 1995, 1996, 1999, 2000, 2001, 2002 - Free Software Foundation, Inc. + Copyright 1990, 1991, 1992, 1993, 1994, 1995, 1996, 1999, 2000, 2001, + 2002, 2003, 2005, 2007, 2008 Free Software Foundation, Inc. Written by Cygnus Support. -This file is part of BFD, the Binary File Descriptor library. + 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 -(at your option) any later version. + 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 3 of the License, or + (at your option) any later version. -This program is distributed in the hope that it will be useful, -but WITHOUT ANY WARRANTY; without even the implied warranty of -MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -GNU General Public License for more details. + This program is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. -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. */ + 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 "libbfd.h" #include "coff/sparc.h" #include "coff/internal.h" @@ -56,25 +57,6 @@ enum reloc_type R_SPARC_max }; -#if 0 -static const char *const reloc_type_names[] = -{ - "R_SPARC_NONE", - "R_SPARC_8", "R_SPARC_16", "R_SPARC_32", - "R_SPARC_DISP8", "R_SPARC_DISP16", "R_SPARC_DISP32", - "R_SPARC_WDISP30", "R_SPARC_WDISP22", - "R_SPARC_HI22", "R_SPARC_22", - "R_SPARC_13", "R_SPARC_LO10", - "R_SPARC_GOT10", "R_SPARC_GOT13", "R_SPARC_GOT22", - "R_SPARC_PC10", "R_SPARC_PC22", - "R_SPARC_WPLT30", - "R_SPARC_COPY", - "R_SPARC_GLOB_DAT", "R_SPARC_JMP_SLOT", - "R_SPARC_RELATIVE", - "R_SPARC_UA32", -}; -#endif - /* This is stolen pretty directly from elf.c. */ static bfd_reloc_status_type bfd_coff_generic_reloc PARAMS ((bfd *, arelent *, asymbol *, PTR, @@ -177,6 +159,24 @@ coff_sparc_reloc_type_lookup (abfd, code) } #define coff_bfd_reloc_type_lookup coff_sparc_reloc_type_lookup +static reloc_howto_type * +coff_sparc_reloc_name_lookup (bfd *abfd ATTRIBUTE_UNUSED, + const char *r_name) +{ + unsigned int i; + + for (i = 0; + i < (sizeof (coff_sparc_howto_table) + / sizeof (coff_sparc_howto_table[0])); + i++) + if (coff_sparc_howto_table[i].name != NULL + && strcasecmp (coff_sparc_howto_table[i].name, r_name) == 0) + return &coff_sparc_howto_table[i]; + + return NULL; +} +#define coff_bfd_reloc_name_lookup coff_sparc_reloc_name_lookup + static void rtype2howto (cache_ptr, dst) arelent *cache_ptr; @@ -206,6 +206,8 @@ rtype2howto (cache_ptr, dst) #define COFF_SPARC +#define bfd_pe_print_pdata NULL + #include "coffcode.h" #ifndef TARGET_SYM