[PATCH v2] x86-64: Add -z mark-plt and -z nomark-plt

Jan Beulich jbeulich@suse.com
Thu Sep 28 14:54:48 GMT 2023


On 28.09.2023 16:52, H.J. Lu wrote:
> On Wed, Sep 27, 2023 at 11:07 PM Jan Beulich <jbeulich@suse.com> wrote:
>>
>> On 27.09.2023 19:19, H.J. Lu via Binutils wrote:
>>> --- a/ld/ld.texi
>>> +++ b/ld/ld.texi
>>> @@ -1475,6 +1475,11 @@ Specify that the object's filters be processed immediately at runtime.
>>>  @item max-page-size=@var{value}
>>>  Set the maximum memory page size supported to @var{value}.
>>>
>>> +@item mark-plt
>>> +@itemx nomark-plt
>>> +Mark PLT entries with dynamic tags, DT_X86_64_PLT, DT_X86_64_PLTSZ and
>>> +DT_X86_64_PLTENT.  Supported for x86_64.
>>
>> Hmm, you use backwards compatibility issues as justification for not having
>> a configure time way to default the new behavior to enabled, and then you
>> don't mention the backwards compatibility aspect here?
>>
> 
> How about this:
> 
> @item mark-plt
> @itemx nomark-plt
> Mark PLT entries with dynamic tags, DT_X86_64_PLT, DT_X86_64_PLTSZ and
> DT_X86_64_PLTENT.  Since this option stores a non-zero value in the
> r_addend field of R_X86_64_JUMP_SLOT relocations, the resulting
> executables and shared libraries are incompatible with dynamic linkers,
> such as those in older versions of glibc without the change to ignore
> r_addend in R_X86_64_GLOB_DAT and R_X86_64_JUMP_SLOT relocations, which
> don't ignore the r_addend field of R_X86_64_JUMP_SLOT relocations.
> Supported for x86_64.

Reads okay to me, thanks.

Jan


More information about the Binutils mailing list