aboutsummaryrefslogtreecommitdiff
path: root/gold/copy-relocs.cc
diff options
context:
space:
mode:
authorIan Lance Taylor <ian@airs.com>2010-01-07 19:32:59 +0000
committerIan Lance Taylor <ian@airs.com>2010-01-07 19:32:59 +0000
commit659948a49877c238eecbd5117a8651a897496810 (patch)
tree278f44748e1da42914f8d777f4113dc034668f2f /gold/copy-relocs.cc
parent35b1e5cca081f63a45e2d6bbc90010e553f7c5c8 (diff)
downloadgdb-659948a49877c238eecbd5117a8651a897496810.zip
gdb-659948a49877c238eecbd5117a8651a897496810.tar.gz
gdb-659948a49877c238eecbd5117a8651a897496810.tar.bz2
PR 11042
* copy-relocs.cc (Copy_relocs::emit_copy_reloc): Mark the dynamic object as needed.
Diffstat (limited to 'gold/copy-relocs.cc')
-rw-r--r--gold/copy-relocs.cc3
1 files changed, 3 insertions, 0 deletions
diff --git a/gold/copy-relocs.cc b/gold/copy-relocs.cc
index 4a98f83..0501ea0 100644
--- a/gold/copy-relocs.cc
+++ b/gold/copy-relocs.cc
@@ -132,6 +132,9 @@ Copy_relocs<sh_type, size, big_endian>::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");