[PATCH] x86: Clear extern_protected_data for GNU_PROPERTY_NO_COPY_ON_PROTECTED

H.J. Lu hjl.tools@gmail.com
Wed Aug 23 17:14:00 GMT 2017


On Wed, Aug 23, 2017 at 8:01 AM, H.J. Lu <hjl.tools@gmail.com> wrote:
> On Wed, Aug 23, 2017 at 7:52 AM, Michael Matz <matz@suse.de> wrote:
>> Hi,
>>
>> On Wed, 23 Aug 2017, H.J. Lu wrote:
>>
>>> >> STV_PROTECTED is meaningful only if there is a dynamic relocation.
>>> >> When the relocation is already resolved by the linker at run-time via
>>> >> SYMBOLIC_BIND, the symbol is not preemptable regardless if it is
>>> >> STV_PROTECTED or not.
>>> >
>>> > The symbolic_bind hack is only necessary because protected symbols are
>>> > broken on x86 and not usable for what they are intended.  In a better
>>>
>>> It is the direct result of copy relocation.
>>
>> Yes, and the fix is to not do copy relocs for protected symbols, instead
>> of breaking the reason d'etre for protected visibility.
>
> I added GNU_PROPERTY_NO_COPY_ON_PROTECTED to GNU
> program property.  Compiler can generate reference via GOT and set
> GNU_PROPERTY_NO_COPY_ON_PROTECTED.    This reminds me
> to update linker to check GNU_PROPERTY_NO_COPY_ON_PROTECTED.
>

This is the patch I am checking in.


-- 
H.J.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: 0001-x86-Clear-extern_protected_data-for-GNU_PROPERTY_NO_.patch
Type: text/x-patch
Size: 13685 bytes
Desc: not available
URL: <https://sourceware.org/pipermail/binutils/attachments/20170823/c4da606c/attachment.bin>


More information about the Binutils mailing list