*** empty log message ***
[deliverable/binutils-gdb.git] / bfd / aoutx.h
index f08171c9b3a277bef996808cbd44102920c17141..066f23ffd4c3b9873c4055278c02bd2a6e6dd0dd 100644 (file)
@@ -1,6 +1,6 @@
 /* BFD semi-generic back-end for a.out binaries.
    Copyright 1990, 1991, 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999,
-   2000, 2001, 2002, 2003, 2004, 2005
+   2000, 2001, 2002, 2003, 2004, 2005, 2006
    Free Software Foundation, Inc.
    Written by Cygnus Support.
 
@@ -18,7 +18,7 @@
 
    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.  */
 
 /*
 SECTION
@@ -706,7 +706,12 @@ NAME (aout, machine_type) (enum bfd_architecture arch,
          || machine == bfd_mach_sparc
          || machine == bfd_mach_sparc_sparclite
          || machine == bfd_mach_sparc_sparclite_le
-         || machine == bfd_mach_sparc_v9)
+         || machine == bfd_mach_sparc_v8plus
+         || machine == bfd_mach_sparc_v8plusa
+         || machine == bfd_mach_sparc_v8plusb
+         || machine == bfd_mach_sparc_v9
+         || machine == bfd_mach_sparc_v9a
+         || machine == bfd_mach_sparc_v9b)
        arch_flags = M_SPARC;
       else if (machine == bfd_mach_sparc_sparclet)
        arch_flags = M_SPARCLET;
@@ -730,11 +735,6 @@ NAME (aout, machine_type) (enum bfd_architecture arch,
        arch_flags = M_386;
       break;
 
-    case bfd_arch_a29k:
-      if (machine == 0)
-       arch_flags = M_29K;
-      break;
-
     case bfd_arch_arm:
       if (machine == 0)
        arch_flags = M_ARM;
@@ -848,7 +848,6 @@ NAME (aout, set_arch_mach) (bfd *abfd,
   switch (arch)
     {
     case bfd_arch_sparc:
-    case bfd_arch_a29k:
     case bfd_arch_mips:
       obj_reloc_entry_size (abfd) = RELOC_EXT_SIZE;
       break;
@@ -1194,26 +1193,21 @@ NAME (aout, new_section_hook) (bfd *abfd, asection *newsect)
        {
          obj_textsec (abfd)= newsect;
          newsect->target_index = N_TEXT;
-         return TRUE;
        }
-
-      if (obj_datasec (abfd) == NULL && !strcmp (newsect->name, ".data"))
+      else if (obj_datasec (abfd) == NULL && !strcmp (newsect->name, ".data"))
        {
          obj_datasec (abfd) = newsect;
          newsect->target_index = N_DATA;
-         return TRUE;
        }
-
-      if (obj_bsssec (abfd) == NULL && !strcmp (newsect->name, ".bss"))
+      else if (obj_bsssec (abfd) == NULL && !strcmp (newsect->name, ".bss"))
        {
          obj_bsssec (abfd) = newsect;
          newsect->target_index = N_BSS;
-         return TRUE;
        }
     }
 
   /* We allow more than three sections internally.  */
-  return TRUE;
+  return _bfd_generic_new_section_hook (abfd, newsect);
 }
 
 bfd_boolean
@@ -2786,7 +2780,8 @@ NAME (aout, find_nearest_line) (bfd *abfd,
 }
 
 int
-NAME (aout, sizeof_headers) (bfd *abfd, bfd_boolean execable ATTRIBUTE_UNUSED)
+NAME (aout, sizeof_headers) (bfd *abfd,
+                            struct bfd_link_info *info ATTRIBUTE_UNUSED)
 {
   return adata (abfd).exec_bytes_size;
 }
@@ -2860,9 +2855,10 @@ NAME (aout, link_hash_table_init) (struct aout_link_hash_table *table,
                                   bfd *abfd,
                                   struct bfd_hash_entry *(*newfunc)
                                   (struct bfd_hash_entry *, struct bfd_hash_table *,
-                                   const char *))
+                                   const char *),
+                                  unsigned int entsize)
 {
-  return _bfd_link_hash_table_init (&table->root, abfd, newfunc);
+  return _bfd_link_hash_table_init (&table->root, abfd, newfunc, entsize);
 }
 
 /* Create an a.out link hash table.  */
@@ -2877,8 +2873,9 @@ NAME (aout, link_hash_table_create) (bfd *abfd)
   if (ret == NULL)
     return NULL;
 
-  if (! NAME (aout, link_hash_table_init) (ret, abfd,
-                                          NAME (aout, link_hash_newfunc)))
+  if (!NAME (aout, link_hash_table_init) (ret, abfd,
+                                         NAME (aout, link_hash_newfunc),
+                                         sizeof (struct aout_link_hash_entry)))
     {
       free (ret);
       return NULL;
@@ -5253,9 +5250,10 @@ NAME (aout, final_link) (bfd *abfd,
   aout_info.symbol_map = NULL;
   aout_info.output_syms = NULL;
 
-  if (! bfd_hash_table_init_n (&aout_info.includes.root,
-                              aout_link_includes_newfunc,
-                              251))
+  if (!bfd_hash_table_init_n (&aout_info.includes.root,
+                             aout_link_includes_newfunc,
+                             sizeof (struct aout_link_includes_entry),
+                             251))
     goto error_return;
   includes_hash_initialized = TRUE;
 
@@ -5318,11 +5316,11 @@ NAME (aout, final_link) (bfd *abfd,
     {
       if (obj_textsec (abfd) != NULL)
        trsize += (_bfd_count_link_order_relocs (obj_textsec (abfd)
-                                                ->link_order_head)
+                                                ->map_head.link_order)
                   * obj_reloc_entry_size (abfd));
       if (obj_datasec (abfd) != NULL)
        drsize += (_bfd_count_link_order_relocs (obj_datasec (abfd)
-                                                ->link_order_head)
+                                                ->map_head.link_order)
                   * obj_reloc_entry_size (abfd));
     }
 
@@ -5414,7 +5412,7 @@ NAME (aout, final_link) (bfd *abfd,
      include.  */
   for (o = abfd->sections; o != NULL; o = o->next)
     {
-      for (p = o->link_order_head; p != NULL; p = p->next)
+      for (p = o->map_head.link_order; p != NULL; p = p->next)
        if (p->type == bfd_indirect_link_order)
          p->u.indirect.section->linker_mark = TRUE;
     }
@@ -5422,7 +5420,7 @@ NAME (aout, final_link) (bfd *abfd,
   have_link_order_relocs = FALSE;
   for (o = abfd->sections; o != NULL; o = o->next)
     {
-      for (p = o->link_order_head;
+      for (p = o->map_head.link_order;
           p != NULL;
           p = p->next)
        {
@@ -5467,7 +5465,7 @@ NAME (aout, final_link) (bfd *abfd,
     {
       for (o = abfd->sections; o != NULL; o = o->next)
        {
-         for (p = o->link_order_head;
+         for (p = o->map_head.link_order;
               p != NULL;
               p = p->next)
            {
This page took 0.026764 seconds and 4 git commands to generate.