From: "H.J. Lu" <hjl.tools@gmail.com>
To: GCC Patches <gcc-patches@gcc.gnu.org>,
GNU C Library <libc-alpha@sourceware.org>,
Binutils <binutils@sourceware.org>
Subject: Re: RFC: PATCHES: Properly handle reference to protected data on x86
Date: Fri, 06 Mar 2015 13:05:00 -0000 [thread overview]
Message-ID: <CAMe9rOqjWSWgiaGKrQjkAMymFFETF-uSwnWUWOxwJpS58arzEg@mail.gmail.com> (raw)
In-Reply-To: <20150306041931.GE25172@bubble.grove.modra.org>
On Thu, Mar 5, 2015 at 8:19 PM, Alan Modra <amodra@gmail.com> wrote:
> On Wed, Mar 04, 2015 at 03:26:10PM -0800, H.J. Lu wrote:
>> Protected symbol means that it can't be pre-emptied. It
>> doesn't mean its address won't be external. This is true
>> for pointer to protected function. With copy relocation,
>> address of protected data defined in the shared library may
>> also be external. We only know that for sure at run-time.
>> Here are patches for glibc, binutils and GCC to handle it
>> properly.
>>
>> Any comments?
>
> I'd like to see this pass some more tests. For example
>
> reference in non-PIC exe to var x
> protected visibility definition of x in libA
> protected visibility definition of x in libB
>
> I suspect you don't have this case correct, but congratulations if you
> do! Assuming libA is first on the breadth first search for libraries,
> then exe and libA ought to use the same x, but libB have its own x.
I believe my new testcases on hjl/pr17711 branch at
https://sourceware.org/git/?p=glibc.git;a=summary
covers those and they work correctly.
> In fact it would be good to prove that all variations of either a
> reference, a default visibility definition or a protected visibility
> definition worked in the exe plus two libs case.
>
You can git my branch a try on PPC. If PPC uses copy
relocation, it shouldn't be too hard to update PPC to make
it work.
--
H.J.
next prev parent reply other threads:[~2015-03-06 13:05 UTC|newest]
Thread overview: 14+ messages / expand[flat|nested] mbox.gz Atom feed top
2015-03-04 23:26 H.J. Lu
2015-03-06 4:19 ` Alan Modra
2015-03-06 13:05 ` H.J. Lu [this message]
2015-03-07 0:15 ` Alan Modra
2015-03-07 1:03 ` H.J. Lu
2015-03-07 12:01 ` Alan Modra
2015-03-07 12:51 ` H.J. Lu
2015-03-06 11:01 ` Szabolcs Nagy
2015-03-06 18:29 ` Joseph Myers
2015-03-06 18:33 ` H.J. Lu
2015-03-05 14:39 H.J. Lu
2015-03-05 17:33 ` Rich Felker
2015-03-05 17:56 ` H.J. Lu
2015-03-06 22:54 ` H.J. Lu
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=CAMe9rOqjWSWgiaGKrQjkAMymFFETF-uSwnWUWOxwJpS58arzEg@mail.gmail.com \
--to=hjl.tools@gmail.com \
--cc=binutils@sourceware.org \
--cc=gcc-patches@gcc.gnu.org \
--cc=libc-alpha@sourceware.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).