This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug lto/41376] collect2 does not handle static libraries
- From: "rguenther at suse dot de" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: 24 May 2010 17:27:52 -0000
- Subject: [Bug lto/41376] collect2 does not handle static libraries
- References: <bug-41376-10053@http.gcc.gnu.org/bugzilla/>
- Reply-to: gcc-bugzilla at gcc dot gnu dot org
------- Comment #11 from rguenther at suse dot de 2010-05-24 17:27 -------
Subject: Re: collect2 does not handle static libraries
On Mon, 24 May 2010, bmei at broadcom dot com wrote:
> ------- Comment #10 from bmei at broadcom dot com 2010-05-24 13:29 -------
> annotating functions with externally_visible sounds a bit difficult to
> maintain. Programmer needs to know whether a function is used outside of LTO
> objects. This can change over time and extra efforts are needed to keep it
> correct. It would be better if GCC can derive that info with -fwhole-program,
> whether it is deal with LTO-object file only or LTO/Regular object files, since
> it should have all the symbol reference information by then.
Indeed - at least if you are not dealing with building a shared
library or a program which needs to expose symbols to plugins
that are loaded at runtime. Of course at the moment - if at all - the
symbol reference information is only available when using something
like the linker-plugin.
Richard.
--
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=41376