This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug lto/53282] lto and visibility-inlines-hidden makes "wrongly" hidden symbols and in a way that depends on the order of the input compilation units
- From: "hubicka at gcc dot gnu.org" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: Tue, 08 May 2012 16:35:57 +0000
- Subject: [Bug lto/53282] lto and visibility-inlines-hidden makes "wrongly" hidden symbols and in a way that depends on the order of the input compilation units
- Auto-submitted: auto-generated
- References: <bug-53282-4@http.gcc.gnu.org/bugzilla/>
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=53282
Jan Hubicka <hubicka at gcc dot gnu.org> changed:
What |Removed |Added
----------------------------------------------------------------------------
CC| |hubicka at gcc dot gnu.org
--- Comment #3 from Jan Hubicka <hubicka at gcc dot gnu.org> 2012-05-08 16:35:57 UTC ---
LTO works in a way that it first collect whole program and promote all symbols
that are not externally visible static. After doing whole program optimization
the program is decomposed again into ltrans unit and compiled independently.
Symbols used from multiple ltrans unit are made hidden, so the units can refer
to it.
In your program apparently only those few symbols are crossing boundary of
ltrans. So this is really independent thing.
You can try to compile with -flto-partition=none. It will take longer but
should avoid the hidden symbols.
File order independency of partitioning is possible, but I doubt it is
desirable design goal. In fact keeping things approximately in the order it was
passed to linker makes sense unless compiler knows better.
Honza