This is the mail archive of the
binutils@sourceware.org
mailing list for the binutils project.
Re: PATCH: PR ld/9938: TLS transition from R_386_TLS_GD to R_386_TLS_IE_32 error
- From: "H.J. Lu" <hjl dot tools at gmail dot com>
- To: Ian Lance Taylor <iant at google dot com>
- Cc: binutils at sources dot redhat dot com
- Date: Thu, 12 Mar 2009 14:32:32 -0700
- Subject: Re: PATCH: PR ld/9938: TLS transition from R_386_TLS_GD to R_386_TLS_IE_32 error
- References: <20090312171324.GA31222@lucon.org> <m3wsaujvzw.fsf@google.com>
On Thu, Mar 12, 2009 at 2:01 PM, Ian Lance Taylor <iant@google.com> wrote:
> "H.J. Lu" <hongjiu.lu@intel.com> writes:
>
>> - ? ? ? ? ? && (strcmp (h->root.root.string, "___tls_get_addr") == 0));
>> + ? ? ? ? ? && (strncmp (h->root.root.string, "___tls_get_addr",
>> + ? ? ? ? ? ? ? ? ? ? ? ?15) == 0));
>
> I think you should write
> ? ?strncmp (h->root.root.string, "___tls_get_addr", 15) == 0
> ? ?&& (h->root.root.string[15] == '\0'
> ? ? ? ?|| h->root.root.string[15] == '@')
>
I thought about it. This is a sanity check. All other ELF targets don't
have any check at all. I tried to avoid slowing down linker further. But
if someone wants to add it, it is OK with me. It should check
ELF_VER_CHR instead of '@'.
--
H.J.