This is the mail archive of the binutils@sourceware.org mailing list for the binutils 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: [PATCH] PR ld/18329: Turn off PROTECTED visibility with -Bsymbolic


On Sat, Apr 25, 2015 at 6:48 PM, Alan Modra <amodra@gmail.com> 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.


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