From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 125350 invoked by alias); 26 Apr 2015 13:38:26 -0000 Mailing-List: contact binutils-help@sourceware.org; run by ezmlm Precedence: bulk List-Id: List-Subscribe: List-Archive: List-Post: List-Help: , Sender: binutils-owner@sourceware.org Received: (qmail 125341 invoked by uid 89); 26 Apr 2015 13:38:26 -0000 Authentication-Results: sourceware.org; auth=none X-Virus-Found: No X-Spam-SWARE-Status: No, score=-0.3 required=5.0 tests=AWL,BAYES_00,FREEMAIL_FROM,RCVD_IN_DNSWL_LOW,SPF_PASS autolearn=ham version=3.3.2 X-HELO: mail-ob0-f170.google.com Received: from mail-ob0-f170.google.com (HELO mail-ob0-f170.google.com) (209.85.214.170) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with (AES128-GCM-SHA256 encrypted) ESMTPS; Sun, 26 Apr 2015 13:38:25 +0000 Received: by obcux3 with SMTP id ux3so66755671obc.2 for ; Sun, 26 Apr 2015 06:38:23 -0700 (PDT) MIME-Version: 1.0 X-Received: by 10.60.133.144 with SMTP id pc16mr6266524oeb.0.1430055503143; Sun, 26 Apr 2015 06:38:23 -0700 (PDT) Received: by 10.76.54.14 with HTTP; Sun, 26 Apr 2015 06:38:23 -0700 (PDT) In-Reply-To: <20150426014835.GA12627@bubble.grove.modra.org> References: <20150425214638.GA13278@gmail.com> <20150425234609.GZ12627@bubble.grove.modra.org> <20150426004513.GA13051@gmail.com> <20150426014835.GA12627@bubble.grove.modra.org> Date: Sun, 26 Apr 2015 13:38:00 -0000 Message-ID: Subject: Re: [PATCH] PR ld/18329: Turn off PROTECTED visibility with -Bsymbolic From: "H.J. Lu" To: Binutils Content-Type: text/plain; charset=UTF-8 X-IsSubscribed: yes X-SW-Source: 2015-04/txt/msg00407.txt.bz2 On Sat, Apr 25, 2015 at 6:48 PM, Alan Modra wrote: > On Sat, Apr 25, 2015 at 05:45:13PM -0700, H.J. Lu wrote: >> On Sun, Apr 26, 2015 at 09:16:09AM +0930, Alan Modra wrote: >> > On Sat, Apr 25, 2015 at 02:46:38PM -0700, H.J. Lu wrote: >> > > If a global protected symbol is bound locally by -Bsymbolic, there is no >> > > need to keep protected visibility which hich may have overhead at run-time. >> > >> > For this change to be safe you'd need to show that all ELF targets >> > supporting dynamic objects also properly support -Bsymbolic for both >> > functions and variables. ie. that none emit dynamic relocations for >> > the symbol when -Bsymbolic. >> > >> >> Good point. Here is a patch to make it backend dependent. I will >> check it in shortly. > > Before you do that, I'd like to know for sure what it is you're trying > to accomplish. I'm guessing the "may have overhead at run-time" is > the loop over dynamic relocs in glibc/elf/dl-lookup.c:do_lookup_x. > Correct? I withdrew my patch. There is no need to clear PROTECTED visibility since there is no dynamic relocation against protected symbols in DSOes built with -Bsymbolic. -- H.J.