This is the mail archive of the mailing list for the glibc 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: RFC: PATCHES: Properly handle reference to protected data on x86

On Thu, Mar 5, 2015 at 9:32 AM, Rich Felker <> wrote:
> 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 <> 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
>> 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.

You need to apply both my GCC and glibc patches in


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