[PATCH] Fix Alpha TLS
Jakub Jelinek
jakub@redhat.com
Thu Feb 13 21:26:00 GMT 2003
Hi!
I've noticed that I was accidentally building alpha --without-tls, not
--with-tls. Fixing that revealed a bug in dl-machine.h.
With this --with-tls --without-__thread passes make check on alpha.
2003-02-13 Jakub Jelinek <jakub@redhat.com>
* sysdeps/alpha/dl-machine.h (elf_machine_rela): Add instead of
subtracting map->l_tls_offset.
--- libc/sysdeps/alpha/dl-machine.h.jj 2003-01-30 05:01:48.000000000 -0500
+++ libc/sysdeps/alpha/dl-machine.h 2003-02-13 16:23:45.000000000 -0500
@@ -627,12 +627,12 @@ elf_machine_rela (struct link_map *map,
else if (r_type == R_ALPHA_TPREL64)
{
#ifdef RTLD_BOOTSTRAP
- *reloc_addr = sym_raw_value - map->l_tls_offset;
+ *reloc_addr = sym_raw_value + map->l_tls_offset;
#else
if (sym_map)
{
CHECK_STATIC_TLS (map, sym_map);
- *reloc_addr = sym_raw_value - sym_map->l_tls_offset;
+ *reloc_addr = sym_raw_value + sym_map->l_tls_offset;
}
#endif
}
Jakub
More information about the Libc-hacker
mailing list