* elf-bfd.h (struct elf_backend_data): Add as_needed_cleanup hook.
[deliverable/binutils-gdb.git] / bfd / merge.c
index 0c34821ebe11e881905995cf2e12c4e011bc45e8..577a716002ecb3126b193bbbb3631e1d5776ef5c 100644 (file)
@@ -1,5 +1,6 @@
 /* SEC_MERGE support.
-   Copyright 2001, 2002, 2003, 2004, 2005 Free Software Foundation, Inc.
+   Copyright 2001, 2002, 2003, 2004, 2005, 2006
+   Free Software Foundation, Inc.
    Written by Jakub Jelinek <jakub@redhat.com>.
 
    This file is part of BFD, the Binary File Descriptor library.
@@ -242,7 +243,7 @@ sec_merge_init (unsigned int entsize, bfd_boolean strings)
     return NULL;
 
   if (! bfd_hash_table_init_n (&table->table, sec_merge_hash_newfunc,
-                              16699))
+                              sizeof (struct sec_merge_hash_entry), 16699))
     {
       free (table);
       return NULL;
@@ -765,7 +766,7 @@ _bfd_merge_sections (bfd *abfd ATTRIBUTE_UNUSED,
           the hash table at all.  */
        for (secinfo = sinfo->chain; secinfo; secinfo = secinfo->next)
          if (secinfo->first_str == NULL)
-           secinfo->sec->flags |= SEC_EXCLUDE;
+           secinfo->sec->flags |= SEC_EXCLUDE | SEC_KEEP;
     }
 
   return TRUE;
This page took 0.034603 seconds and 4 git commands to generate.