This is the mail archive of the
binutils@sourceware.org
mailing list for the binutils project.
Re: [GOLD] --as-needed change wrt undefined weak symbols
- From: Ian Lance Taylor <iant at google dot com>
- To: Ian Lance Taylor <iant at google dot com>, Binutils <binutils at sourceware dot org>
- Date: Tue, 19 Mar 2013 13:41:31 -0700
- Subject: Re: [GOLD] --as-needed change wrt undefined weak symbols
- References: <20130114035805 dot GF3244 at bubble dot grove dot modra dot org> <CAMe9rOr9pmgn=ARZn_kEcJvAm4yHpyDmgxq=7_XHRVs7pzOopQ at mail dot gmail dot com> <20130115022340 dot GO3244 at bubble dot grove dot modra dot org> <CAMe9rOrOBPOHkQpPzYjC=OBgwq4bF29zDTTWidW20RJ5Y-F3tA at mail dot gmail dot com> <20130115052328 dot GQ3244 at bubble dot grove dot modra dot org> <CAMe9rOqcu7_-aAkkF=im56KsQ9Ypb6YkmmogcZDoswkNsaPPqg at mail dot gmail dot com> <20130318024130 dot GA18331 at bubble dot grove dot modra dot org> <20130318075417 dot GB18331 at bubble dot grove dot modra dot org> <20130318081614 dot GC18331 at bubble dot grove dot modra dot org> <CAKOQZ8xsNiO7f2mNVLqy0vs5ws_C3sDXXdM60j5uSmfzyQKYEQ at mail dot gmail dot com> <20130319023425 dot GG18331 at bubble dot grove dot modra dot org>
On Mon, Mar 18, 2013 at 7:34 PM, Alan Modra <amodra@gmail.com> wrote:
> On Mon, Mar 18, 2013 at 08:15:55AM -0700, Ian Lance Taylor wrote:
>> We can build a
>> temporary vector of symbols with version != NULL for which that
>> condition is not true, and then walk that vector in the second loop.
>> There won't be many entries in it.
>
> Well, OK, but I wonder whether it is really worth doing? Sometimes
> having two small loops is much better than having one large one.
Yes, but there are executables here with tens of thousands of dynamic
symbols, none of which are weak.
> * symtab.h (Symbol::override_version): Make public.
> * symtab.cc (Symbol_table::set_dynsym_indexes): Don't set object
> is_needed by weak references. Clear version for symbols defined
> in as-needed objects that are not needed.
This is OK.
Thanks.
Ian