PATCH: PR gold/14858: X32 TLS relocations are incorrectly handled

Ian Lance Taylor ian@airs.com
Tue Nov 20 05:45:00 GMT 2012


"H.J. Lu" <hjl.tools@gmail.com> writes:

> BTW, we can use
>
> memcpy(view - 3, "\x66\x66\x66\x64\x48\x8b\x04\x25\0\0\0", 12);
>
> instead of
>
> memcpy(view - 3, "\x66\x66\x66\x64\x48\x8b\x04\x25\0\0\0\0", 12);
>
> since there is a nul terminator at the end of string.  But my patch
> leaves it alone.

It doesn't matter, GCC should take care of it anyhow.


> 2012-11-19  H.J. Lu  <hongjiu.lu@intel.com>
>
> 	PR gold/14858
> 	* x86_64.cc (Relocate::tls_ld_to_le): Support x32.

> +  // For SIZE == 64:
>    // ... leq foo@dtpoff(%rax),%reg
>    // ==> .word 0x6666; .byte 0x66; movq %fs:0,%rax ... leaq x@tpoff(%rax),%rdx
> +  // For SIZE == 32:
> +  // ... leq foo@dtpoff(%rax),%reg
> +  // ==> nopl 0x0(%rax); movq %fs:0,%eax ... leaq x@tpoff(%rax),%rdx

Do you mean movq %rax or do you mean movl %eax?  Please correct.

This is OK with that change.

Thanks.

Ian



More information about the Binutils mailing list