This is the mail archive of the
binutils@sourceware.org
mailing list for the binutils project.
Re: RFC: PATCHES: Properly handle reference to protected data on x86
- From: Rich Felker <dalias at libc dot org>
- To: "H.J. Lu" <hjl dot tools at gmail dot com>
- Cc: GCC Patches <gcc-patches at gcc dot gnu dot org>, GNU C Library <libc-alpha at sourceware dot org>, Binutils <binutils at sourceware dot org>
- Date: Thu, 5 Mar 2015 12:32:47 -0500
- Subject: Re: RFC: PATCHES: Properly handle reference to protected data on x86
- Authentication-results: sourceware.org; auth=none
- References: <CAMe9rOr3ScyMRZwEkdOtOWV7Y+3Aj-e2GtU7Rnba64rr6kgA8Q at mail dot gmail dot com>
On Thu, Mar 05, 2015 at 06:39:10AM -0800, H.J. Lu wrote:
> On Wed, Mar 4, 2015 at 3:26 PM, H.J. Lu <hjl.tools@gmail.com> 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?
>
> This is the binutils patch I checked in. It basically reverted
> the change for
>
> https://sourceware.org/bugzilla/show_bug.cgi?id=15228
>
> on x86. Copy relocations against protected symbols should
> work.
Does it actually work now though? Last I checked gcc was generating
wrong code too -- GOT-relative accesses rather than accessing them
through the GOT. If that's the case, ld has no way to fix the problem.
Rich