[gold][patch] Factor the should include member to a new function
Rafael Espindola
espindola@google.com
Tue Mar 2 21:22:00 GMT 2010
The attached patch introduces a new function whose only job is to decide if
an archive member should be included in the link given that it defines a
given symbol. There are three possible outcomes
It should be included: This happens if we have an strong undefined reference
to that symbol.
It should not be included: This happens if we have a strong definition of that
symbol already.
We don't know. This happens if we know nothing about that symbol or it is a
weak undefined reference.
There are two reasons for doing this. First it is a small cleanup and saves
us from maintaining a temporary buffer. Second, I am implementing
--start-lib/--end-lib and would like to reuse this logic.
2010-03-02 Rafael Espindola <espindola@google.com>
* archive.cc (should_include_member): New.
(Archive::add_symbols): Use should_include_member.
Cheers,
--
Rafael Ávila de Espíndola
-------------- next part --------------
A non-text attachment was scrubbed...
Name: include_member.patch
Type: text/x-diff
Size: 5033 bytes
Desc: not available
URL: <https://sourceware.org/pipermail/binutils/attachments/20100302/26efacd3/attachment.bin>
More information about the Binutils
mailing list