[gold commit] PR 18859: Fix --no-as-needed when shared library is listed twice on the command line
Cary Coutant
ccoutant@gmail.com
Wed Aug 26 01:40:00 GMT 2015
When a shared library is listed twice on the command line, the linker
ignores the second mention. If the first mention is in the scope of
an --as-needed option, and the second one is under the scope of a
--no-as-needed option, the --no-as-needed should take effect, but
doesn't. This patch keeps track of the objects we've already seen,
and updates the --as-needed flag so that if a shared object is ever
seen with --no-as-needed, it will be marked as such.
-cary
2015-08-25 Cary Coutant <ccoutant@gmail.com>
gold/
PR gold/18859
* object.cc (Input_objects::add_object): Store objects in a map,
indexed by soname; update as-needed flag when necessary.
* object.h (Object::clear_as_needed): New method.
(Input_objects::so_names_): Change from set to map.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: pr18859.patch
Type: application/octet-stream
Size: 2521 bytes
Desc: not available
URL: <https://sourceware.org/pipermail/binutils/attachments/20150826/9dd6b4e8/attachment.obj>
More information about the Binutils
mailing list