[PATCH] x86-64: Fix TLSDESC relaxation for x32

Jan Beulich jbeulich@suse.com
Mon Jan 20 15:51:00 GMT 2020


On 20.01.2020 16:49, H.J. Lu wrote:
> On Mon, Jan 20, 2020 at 7:38 AM Jan Beulich <jbeulich@suse.com> wrote:
>>
>> On 20.01.2020 16:28, H.J. Lu wrote:
>>> On Mon, Jan 20, 2020 at 7:18 AM Jan Beulich <jbeulich@suse.com> wrote:
>>>>
>>>> On 20.01.2020 15:55, H.J. Lu wrote:
>>>>> We need to support both sequences for x32.  For both GDesc -> IE/LE
>>>>> transitions,
>>>>>
>>>>> 67 ff 10              call    *x@TLSCALL(%eax)
>>>>>
>>>>> should relaxed to
>>>>>
>>>>> 0f 1f 00              nopl    (%rax)
>>>>
>>>> Since, like it is phrased here, the patch also uses this
>>>> unconditionally, I wonder if this is the best choice: Linux,
>>>> for example, has a number of cases where it wouldn't use
>>>> this NOP form even on 64-bit.
>>>>
>>>
>>> Assembler has been using this 3-byte NOP in 64-bit for
>>> a long time.  What other options are you suggesting?
>>
>> The traditional K8 NOPs (up to three [iirc] 0x66 followed by
>> 0x90), and preferably controllable in some way.
>>
> 
> We have been doing this way for many years.  I don't think
> we should change it now.

Fair enough then.

Jan



More information about the Binutils mailing list