From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 27503 invoked by alias); 12 Nov 2012 10:22:39 -0000 Received: (qmail 27477 invoked by uid 22791); 12 Nov 2012 10:22:38 -0000 X-SWARE-Spam-Status: No, hits=-2.8 required=5.0 tests=AWL,BAYES_00,KHOP_THREADED,RP_MATCHES_RCVD X-Spam-Check-By: sourceware.org Received: from smtp.ispras.ru (HELO smtp.ispras.ru) (83.149.198.202) by sourceware.org (qpsmtpd/0.43rc1) with ESMTP; Mon, 12 Nov 2012 10:22:29 +0000 Received: from monoid.intra.ispras.ru (unknown [83.149.198.253]) by smtp.ispras.ru (Postfix) with ESMTP id ACFDF5D4038; Mon, 12 Nov 2012 13:20:35 +0300 (MSK) Date: Mon, 12 Nov 2012 10:22:00 -0000 From: Alexander Monakov To: Florian Weimer cc: gcc-help@gcc.gnu.org Subject: Re: Symbol visibility and bypassing PLT for intra-DSO calls In-Reply-To: <50A0BDBD.9010002@redhat.com> Message-ID: References: <50A0B5C0.1040900@redhat.com> <50A0BDBD.9010002@redhat.com> User-Agent: Alpine 2.00 (LNX 1167 2008-08-23) MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII Mailing-List: contact gcc-help-help@gcc.gnu.org; run by ezmlm Precedence: bulk List-Id: List-Archive: List-Post: List-Help: Sender: gcc-help-owner@gcc.gnu.org X-SW-Source: 2012-11/txt/msg00067.txt.bz2 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