gold patch committed: PR 10880: Support --as-needed

Ian Lance Taylor iant@google.com
Thu Nov 5 06:26:00 GMT 2009


PR 10880 complains that gold --as-needed doesn't work.  In fact, I
never implemented it.  It turned out to be fairly simple.  I committed
this patch to mainline and 2.20 branch.

Ian


2009-11-04  Ian Lance Taylor  <iant@google.com>

	PR 10880
	* object.h (class Object): Add is_needed and set_is_needed
	methods.  Add is_needed_ field.  Make bool fields into bitfields.
	* symtab.cc (Symbol_table::set_dynsym_indexes): If a symbol is
	defined in a dynamic object and referenced by a regular object,
	set is_needed for the dynamic object.
	* layout.cc (Layout::finish_dynamic_section): Don't add DT_NEEDED
	if the file is marked with as_needed and it is not needed.


-------------- next part --------------
A non-text attachment was scrubbed...
Name: foo.patch
Type: text/x-diff
Size: 3900 bytes
Desc: --as-needed
URL: <https://sourceware.org/pipermail/binutils/attachments/20091105/740e96a8/attachment.bin>


More information about the Binutils mailing list