* elf-bfd.h (struct sym_sec_cache): Delete.
[deliverable/binutils-gdb.git] / bfd / coff-tic4x.c
index 056491d16aa7df246e550f12dfdda6bb364f08bf..4259dd91465cedd1d11eb13ac3db32a7b4abcd32 100644 (file)
@@ -1,6 +1,6 @@
 /* BFD back-end for TMS320C4X coff binaries.
-   Copyright 1996, 1997, 1998, 1999, 2000, 2002, 2003, 2005
-   Free Software Foundation, Inc.
+   Copyright 1996, 1997, 1998, 1999, 2000, 2002, 2003, 2005, 2007,
+   2008  Free Software Foundation, Inc.
 
    Contributed by Michael Hayes (m.hayes@elec.canterbury.ac.nz)
 
@@ -8,7 +8,7 @@
 
    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,
 
    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
+   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 "bfdlink.h"
 #include "coff/tic4x.h"
@@ -69,8 +69,12 @@ ticoff_bfd_is_local_label_name (abfd, name)
    instead of setting BADMAG.  */
 #define BADMAG(x) COFF2_BADMAG(x)
 
-#undef coff_rtype_to_howto
-#define coff_rtype_to_howto coff_tic4x_rtype_to_howto
+#undef  coff_rtype_to_howto
+#define coff_rtype_to_howto    coff_tic4x_rtype_to_howto
+
+#ifndef bfd_pe_print_pdata
+#define bfd_pe_print_pdata     NULL
+#endif
 
 #include "coffcode.h"
 
@@ -117,6 +121,8 @@ reloc_howto_type tic4x_howto_table[] =
 
 #undef coff_bfd_reloc_type_lookup
 #define coff_bfd_reloc_type_lookup tic4x_coff_reloc_type_lookup
+#undef coff_bfd_reloc_name_lookup
+#define coff_bfd_reloc_name_lookup tic4x_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.  */
@@ -150,6 +156,21 @@ tic4x_coff_reloc_type_lookup (abfd, code)
   return NULL;
 }
 
+static reloc_howto_type *
+tic4x_coff_reloc_name_lookup (bfd *abfd ATTRIBUTE_UNUSED,
+                             const char *r_name)
+{
+  unsigned int i;
+
+  for (i = 0;
+       i < sizeof (tic4x_howto_table) / sizeof (tic4x_howto_table[0]);
+       i++)
+    if (tic4x_howto_table[i].name != NULL
+       && strcasecmp (tic4x_howto_table[i].name, r_name) == 0)
+      return &tic4x_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 tic4x_rtype_to_howto fn
This page took 0.023593 seconds and 4 git commands to generate.