Symbol visibility and bypassing PLT for intra-DSO calls
Alexander Monakov
amonakov@ispras.ru
Mon Nov 12 10:22:00 GMT 2012
On Mon, 12 Nov 2012, Florian Weimer wrote:
> On 11/12/2012 10:01 AM, Alexander Monakov wrote:
> > On Mon, 12 Nov 2012, Florian Weimer wrote:
> >
> > > Is there a way to use symbol visibility to bypass the PLT for intra-DSO
> > > calls,
> > > while still keeping the symbol public? I don't need to support overriding
> > > the
> > > symbols from the outside, so the PLT indirection isn't needed.
> >
> > Why do you need to use the visibility mechanism specifically? From my
> > understanding, it sounds like you can use -Bsymbolic.
>
> It would be sort-of nice to do this at the compiler level, so that the
> programmer doesn't have to specify a linker option. And a finer granularity
> to control this feature might make sense in some cases.
Is "protected" visibility what you need? From the manual:
Protected visibility is like default visibility except that it indicates
that references within the defining module bind to the definition in that
module. That is, the declared entity cannot be overridden by another module.
Alexander
More information about the Gcc-help
mailing list