This is the mail archive of the
mailing list for the GCC project.
Re: LTO plugin and comdat symbols
- From: Richard Henderson <rth at redhat dot com>
- To: Jan Hubicka <hubicka at ucw dot cz>
- Cc: ccoutant at google dot com, iant at google dot com, tglek at mozilla dot com, rguenther at suse dot de, gcc-patches at gcc dot gnu dot org, dnovillo at google dot com
- Date: Wed, 06 Oct 2010 09:58:07 -0700
- Subject: Re: LTO plugin and comdat symbols
- References: <20101006124620.GA31464@kam.mff.cuni.cz>
On 10/06/2010 05:46 AM, Jan Hubicka wrote:
> I think in this case it would make sense to change gold's behaviour by marking
> externally visible symbol that are not explicitely used by other object files
> at PREVAILING_IRONLY instead of PREVAILING_DEF. I always assumed gold behaving
> thisw way and it would give GCC freedom to take the symbol again.
> GCC by itself has all the info it needs to know if the symbol is exported from DSO
> so it will not remove non-COMDATs. Would that be possible?
Well, GCC does not by itself have access to the linker version script.
Unless GOLD has already altered the symbol table such that non-exported
symbols are marked hidden (or local)? If so, then we should be fine.