This is the mail archive of the gcc-patches@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: [rfc] Whole program optimization


> On Thu, May 26, 2005 at 06:46:33PM -0700, Geoffrey Keating wrote:
> > > I remember that we discussed this with Richard while past and Richard
> > > argued that ELF visibility flags should be used instead.  I don't have
> > > archive of the disucssion and I am not quite convinced that this is
> > > possible (this is quite ortoghonal issue to the visibility outside
> > > linked object), so if I miss something here, please enlighten me.
> > 
> > I believe that the idea here was that instead of
> > __attribute__((used)), you would use
> > __attribute__((visibility("default"))) or
> > __attribute__((visibility("hidden"))) or
> > __attribute__((visibility("protected"))).  That is, this new functionality
> > would be equivalent to saying -fvisibility=internal.
> 
> Indeed.  The point is that we have existing options to control
> visibility of symbols.  We do not need another.

This seem to have two problems.  You will have to put __attribute__
construct to expocitly mark main() and you need ELF system to allow the
-fvisibility flag.
I can take care to make -fvisibility=internal functionally equivalent to
-fwhole-program on systems where it works (except for main()) but I
would preffer to have separate flag for this so sources don't need to be
modified like most of other compilers seems to have - I would guess this
is what users expect, not only to make it possible for using for SPEC
build..

Honza


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]