From: Ian Lance Taylor Date: Thu, 7 Jan 2010 19:32:59 +0000 (+0000) Subject: PR 11042 X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=659948a49877c238eecbd5117a8651a897496810;p=binutils-gdb.git PR 11042 * copy-relocs.cc (Copy_relocs::emit_copy_reloc): Mark the dynamic object as needed. --- diff --git a/gold/ChangeLog b/gold/ChangeLog index 36ed7c93759..b974662dfa4 100644 --- a/gold/ChangeLog +++ b/gold/ChangeLog @@ -1,3 +1,9 @@ +2010-01-07 Ian Lance Taylor + + PR 11042 + * copy-relocs.cc (Copy_relocs::emit_copy_reloc): Mark the dynamic + object as needed. + 2010-01-07 Dmitry Gorbachev Ian Lance Taylor diff --git a/gold/copy-relocs.cc b/gold/copy-relocs.cc index 4a98f8366a9..0501ea034b9 100644 --- a/gold/copy-relocs.cc +++ b/gold/copy-relocs.cc @@ -132,6 +132,9 @@ Copy_relocs::emit_copy_reloc( while ((value & (addralign - 1)) != 0) addralign >>= 1; + // Mark the dynamic object as needed for the --as-needed option. + sym->object()->set_is_needed(); + if (this->dynbss_ == NULL) { this->dynbss_ = new Output_data_space(addralign, "** dynbss");