bfd/
[deliverable/binutils-gdb.git] / bfd / pdp11.c
index 83029c46d04721d594d7efec7d033b09e39bd351..a3950793822fedd60792bef233fb50988e72b315 100644 (file)
@@ -1,5 +1,6 @@
 /* BFD back-end for PDP-11 a.out binaries.
-   Copyright 2001, 2002, 2003, 2004, 2005 Free Software Foundation, Inc.
+   Copyright 2001, 2002, 2003, 2004, 2005, 2006
+   Free Software Foundation, Inc.
 
    This file is part of BFD, the Binary File Descriptor library.
 
@@ -1110,32 +1111,27 @@ NAME (aout, new_section_hook) (bfd *abfd, asection *newsect)
   if (bfd_get_format (abfd) == bfd_object)
     {
       if (obj_textsec (abfd) == NULL
-         && ! strcmp (newsect->name, ".text"))
+         && !strcmp (newsect->name, ".text"))
        {
          obj_textsec(abfd)= newsect;
          newsect->target_index = N_TEXT;
-         return TRUE;
        }
-
-    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"))
-      {
-       obj_bsssec (abfd) = newsect;
-       newsect->target_index = N_BSS;
-       return TRUE;
-      }
-  }
+      else if (obj_datasec (abfd) == NULL
+              && !strcmp (newsect->name, ".data"))
+       {
+         obj_datasec (abfd) = newsect;
+         newsect->target_index = N_DATA;
+       }
+      else if (obj_bsssec (abfd) == NULL
+              && !strcmp (newsect->name, ".bss"))
+       {
+         obj_bsssec (abfd) = newsect;
+         newsect->target_index = N_BSS;
+       }
+    }
 
   /* We allow more than three sections internally.  */
-  return TRUE;
+  return _bfd_generic_new_section_hook (abfd, newsect);
 }
 
 bfd_boolean
@@ -2375,7 +2371,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;
 }
@@ -2446,9 +2443,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.  */
@@ -2463,7 +2461,8 @@ 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)))
+                                          NAME (aout, link_hash_newfunc),
+                                          sizeof (struct aout_link_hash_entry)))
     {
       free (ret);
       return NULL;
@@ -3657,9 +3656,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;
 
This page took 0.025571 seconds and 4 git commands to generate.