IA32 TLS GD optimization issue
Jakub Jelinek
jakub@redhat.com
Thu Nov 6 19:19:00 GMT 2003
More information about the Binutils mailing list
Thu Nov 6 19:19:00 GMT 2003
- Previous message (by thread): IA32 TLS GD optimization issue
- Next message (by thread): IA32 TLS GD optimization issue
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
On Thu, Nov 06, 2003 at 09:49:51AM -0800, H. J. Lu wrote: > The ia32 linker can optimize TLS GD to LE or IE. But they are not > consistent. For GD -> LE, we can turn > > leal foo(%reg), %eax; call ___tls_get_addr; nop > > into > > movl %gs:0, %eax; subl $foo@tpoff, %eax # 6 byte form of subl > > and > > leal foo(%reg), %eax; call ___tls_get_addr > > into > > movl %gs:0, %eax; subl $foo@tpoff, %eax # 5 byte form of subl > > But for GD -> IE, we only support > > leal foo(%reg), %eax; call ___tls_get_addr; nop > > to > movl %gs:0, %eax; subl $foo@gottpoff(%reg), %eax # 6 byte form of subl > > since there is no 5 byte form for "subl $foo@gottpoff(%reg), %eax". And the problem is? Have you read http://people.redhat.com/drepper/tls.pdf ? > Also I think this patch is needed for > > leal foo(%reg), %eax; call ___tls_get_addr No. Look what line 2438 does. > Should we support > > leal foo(%reg), %eax; call ___tls_get_addr > > at all? If yes, how should we fix it? Can you explain what needs fixing? > --- elf32-i386.c.tls 2003-11-04 09:43:23.000000000 -0800 > +++ elf32-i386.c 2003-11-06 09:45:57.000000000 -0800 > @@ -2473,6 +2473,7 @@ elf_i386_relocate_section (bfd *output_b > (5 byte form of subl). */ > memcpy (contents + rel->r_offset - 2, > "\x65\xa1\0\0\0\0\x2d\0\0\0", 11); > + roff = rel->r_offset + 5; > } > } > bfd_put_32 (output_bfd, tpoff (info, relocation), Jakub
- Previous message (by thread): IA32 TLS GD optimization issue
- Next message (by thread): IA32 TLS GD optimization issue
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
More information about the Binutils mailing list