This is the mail archive of the
binutils@sourceware.org
mailing list for the binutils project.
gold patch committed: Add --add-needed/--copy-dt-needed-entries options
- From: Ian Lance Taylor <iant at google dot com>
- To: binutils at sourceware dot org
- Date: Mon, 04 Jan 2010 16:34:56 -0800
- Subject: gold patch committed: Add --add-needed/--copy-dt-needed-entries options
For the GNU linker --add-needed aka --copy-dt-needed-entries is the
default. For gold it is not. Implementing --add-needed requires
emulating the dynamic linker's search path, and as I've discussed
elsewhere I don't think that is a good idea.
This patch adds the --add-needed/--copy-dt-needed-entries options to
gold. If they are used and they would otherwise affect gold's output,
gold will give an error. Since the defaults are different, the main
benefit of this patch is that gold now supports --no-add-needed.
Committed to mainline.
Ian
2010-01-04 Ian Lance Taylor <iant@google.com>
PR 10980
* options.h (class General_options): Add --add-needed and
--copy-dt-needed-entries. Tweak --as-needed help entry.
* object.cc (Input_objects::check_dynamic_dependencies): Give an
error if --copy-dt-needed-entries aka --add-needed is used and
would cause a change in behaviour.