X-Git-Url: http://drtracing.org/?a=blobdiff_plain;f=bfd%2Fmerge.c;h=c1795d29112f71c5c8748636919cd71cc9ea33c0;hb=66f338c7b9bf573cdd96e827eb9fef079ac55720;hp=baaa2c6b140e06c934c8c3308183b1db84ed1e3e;hpb=d05da6a8c2e8a0ea893af11f68d195be0bccc668;p=deliverable%2Fbinutils-gdb.git diff --git a/bfd/merge.c b/bfd/merge.c index baaa2c6b14..c1795d2911 100644 --- a/bfd/merge.c +++ b/bfd/merge.c @@ -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 . This file is part of BFD, the Binary File Descriptor library. @@ -16,7 +17,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. */ /* This file contains support for merging duplicate entities within sections, as used in ELF SHF_MERGE. */ @@ -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; @@ -697,8 +698,10 @@ alloc_failure: with _bfd_merge_section. */ bfd_boolean -_bfd_merge_sections (bfd *abfd ATTRIBUTE_UNUSED, struct bfd_link_info *info, - void *xsinfo, void (*remove_hook) (bfd *, asection *)) +_bfd_merge_sections (bfd *abfd ATTRIBUTE_UNUSED, + struct bfd_link_info *info ATTRIBUTE_UNUSED, + void *xsinfo, + void (*remove_hook) (bfd *, asection *)) { struct sec_merge_info *sinfo; @@ -763,7 +766,7 @@ _bfd_merge_sections (bfd *abfd ATTRIBUTE_UNUSED, struct bfd_link_info *info, the hash table at all. */ for (secinfo = sinfo->chain; secinfo; secinfo = secinfo->next) if (secinfo->first_str == NULL) - _bfd_strip_section_from_output (info, secinfo->sec); + secinfo->sec->flags |= SEC_EXCLUDE; } return TRUE;