* configure.ac (arm-semi-aof, crx-*-*, parisc*-*-linux*,
[deliverable/binutils-gdb.git] / bfd / aout-tic30.c
index 8adca2a4fd1b05ede27c67060a9712c30ba0fbce..5d5c7e23b70c397663b6fd6b2e67950941dacc10 100644 (file)
@@ -1,5 +1,6 @@
 /* BFD back-end for TMS320C30 a.out binaries.
-   Copyright 1998, 1999, 2000, 2001, 2002, 2003, 2004, 2005
+   Copyright 1998, 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2007, 2009,
+   2010
    Free Software Foundation, Inc.
    Contributed by Steven Haworth (steve@pm.cse.rmit.edu.au)
 
@@ -7,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,
@@ -17,8 +18,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., 59 Temple Place - Suite 330, Boston, MA
-   02111-1307, USA.  */
+   Foundation, Inc., 51 Franklin Street - Fifth Floor, Boston, MA
+   02110-1301, USA.  */
 
 #define TARGET_IS_BIG_ENDIAN_P
 #define N_HEADER_IN_TEXT(x)    1
@@ -35,8 +36,8 @@
 #define TARGETNAME "a.out-tic30"
 #define NAME(x,y) CONCAT3 (tic30_aout,_32_,y)
 
-#include "bfd.h"
 #include "sysdep.h"
+#include "bfd.h"
 #include "libaout.h"
 #include "aout/aout64.h"
 #include "aout/stab_gnu.h"
@@ -270,6 +271,23 @@ tic30_aout_reloc_type_lookup (bfd *abfd ATTRIBUTE_UNUSED,
     }
 }
 
+static reloc_howto_type *
+tic30_aout_reloc_name_lookup (bfd *abfd ATTRIBUTE_UNUSED,
+                             const char *r_name)
+{
+  unsigned int i;
+
+  for (i = 0;
+       i < (sizeof (tic30_aout_howto_table)
+           / sizeof (tic30_aout_howto_table[0]));
+       i++)
+    if (tic30_aout_howto_table[i].name != NULL
+       && strcasecmp (tic30_aout_howto_table[i].name, r_name) == 0)
+      return &tic30_aout_howto_table[i];
+
+  return NULL;
+}
+
 static reloc_howto_type *
 tic30_aout_reloc_howto (bfd *abfd,
                        struct reloc_std_external *relocs,
@@ -279,7 +297,7 @@ tic30_aout_reloc_howto (bfd *abfd,
 {
   unsigned int r_length;
   unsigned int r_pcrel_done;
-  int index;
+  int howto_index;
 
   *r_pcrel = 0;
   if (bfd_header_big_endian (abfd))
@@ -296,8 +314,8 @@ tic30_aout_reloc_howto (bfd *abfd,
       r_pcrel_done = (0 != (relocs->r_type[0] & RELOC_STD_BITS_PCREL_LITTLE));
       r_length = ((relocs->r_type[0] & RELOC_STD_BITS_LENGTH_LITTLE) >> RELOC_STD_BITS_LENGTH_SH_LITTLE);
     }
-  index = r_length + 4 * r_pcrel_done;
-  return tic30_aout_howto_table + index;
+  howto_index = r_length + 4 * r_pcrel_done;
+  return tic30_aout_howto_table + howto_index;
 }
 
 /* These macros will get 24-bit values from the bfd definition.
@@ -820,6 +838,9 @@ tic30_aout_set_arch_mach (bfd *abfd,
 #ifndef MY_read_ar_hdr
 #define MY_read_ar_hdr                 _bfd_generic_read_ar_hdr
 #endif
+#ifndef MY_write_ar_hdr
+#define MY_write_ar_hdr                        _bfd_generic_write_ar_hdr
+#endif
 #ifndef        MY_truncate_arname
 #define        MY_truncate_arname              bfd_bsd_truncate_arname
 #endif
@@ -838,6 +859,9 @@ tic30_aout_set_arch_mach (bfd *abfd,
 #define        MY_core_file_matches_executable_p       \
                                _bfd_nocore_core_file_matches_executable_p
 #endif
+#ifndef        MY_core_file_pid
+#define        MY_core_file_pid                _bfd_nocore_core_file_pid
+#endif
 #ifndef        MY_core_file_p
 #define        MY_core_file_p                  _bfd_dummy_target
 #endif
@@ -904,6 +928,9 @@ tic30_aout_set_arch_mach (bfd *abfd,
 #ifndef MY_find_nearest_line
 #define MY_find_nearest_line NAME (aout, find_nearest_line)
 #endif
+#ifndef MY_find_inliner_info
+#define MY_find_inliner_info _bfd_nosymbols_find_inliner_info
+#endif
 #ifndef MY_sizeof_headers
 #define MY_sizeof_headers NAME (aout, sizeof_headers)
 #endif
@@ -930,9 +957,15 @@ tic30_aout_set_arch_mach (bfd *abfd,
 #define MY_section_already_linked \
   _bfd_generic_section_already_linked
 #endif
+#ifndef MY_bfd_define_common_symbol
+#define MY_bfd_define_common_symbol bfd_generic_define_common_symbol
+#endif
 #ifndef MY_bfd_reloc_type_lookup
 #define MY_bfd_reloc_type_lookup tic30_aout_reloc_type_lookup
 #endif
+#ifndef MY_bfd_reloc_name_lookup
+#define MY_bfd_reloc_name_lookup tic30_aout_reloc_name_lookup
+#endif
 #ifndef MY_bfd_make_debug_symbol
 #define MY_bfd_make_debug_symbol 0
 #endif
@@ -954,6 +987,10 @@ tic30_aout_set_arch_mach (bfd *abfd,
 #ifndef MY_bfd_link_just_syms
 #define MY_bfd_link_just_syms _bfd_generic_link_just_syms
 #endif
+#ifndef MY_bfd_copy_link_hash_symbol_type
+#define MY_bfd_copy_link_hash_symbol_type \
+  _bfd_generic_copy_link_hash_symbol_type
+#endif
 #ifndef MY_bfd_link_split_section
 #define MY_bfd_link_split_section  _bfd_generic_link_split_section
 #endif
This page took 0.026101 seconds and 4 git commands to generate.