This is the mail archive of the
binutils@sourceware.org
mailing list for the binutils project.
Re: PATCH: PR gold/14858: X32 TLS relocations are incorrectly handled
- From: Ian Lance Taylor <ian at airs dot com>
- To: "H.J. Lu" <hjl dot tools at gmail dot com>
- Cc: binutils at sourceware dot org
- Date: Mon, 19 Nov 2012 21:45:20 -0800
- Subject: Re: PATCH: PR gold/14858: X32 TLS relocations are incorrectly handled
- References: <20121120044920.GA25156@gmail.com>
"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