aboutsummaryrefslogtreecommitdiff
path: root/sysdeps/i386
diff options
context:
space:
mode:
authorRoland McGrath <roland@gnu.org>2002-10-17 19:44:19 +0000
committerRoland McGrath <roland@gnu.org>2002-10-17 19:44:19 +0000
commiteb775e678d2b66bde8ca5eb378326bace28cb625 (patch)
tree104657e7d4f96075daee3f187b910cc9b0df274c /sysdeps/i386
parent2e2dc1a55816552a18a03c3b7d674e96a1c237c2 (diff)
downloadglibc-eb775e678d2b66bde8ca5eb378326bace28cb625.zip
glibc-eb775e678d2b66bde8ca5eb378326bace28cb625.tar.gz
glibc-eb775e678d2b66bde8ca5eb378326bace28cb625.tar.bz2
2002-10-17 Roland McGrath <roland@redhat.com>
* sysdeps/x86_64/dl-machine.h (elf_machine_rela): Do CHECK_STATIC_TLS before performing the reloc, not before. * sysdeps/i386/dl-machine.h (elf_machine_rel): Likewise.
Diffstat (limited to 'sysdeps/i386')
-rw-r--r--sysdeps/i386/dl-machine.h13
1 files changed, 8 insertions, 5 deletions
diff --git a/sysdeps/i386/dl-machine.h b/sysdeps/i386/dl-machine.h
index 60122c5..5b9c24f 100644
--- a/sysdeps/i386/dl-machine.h
+++ b/sysdeps/i386/dl-machine.h
@@ -432,7 +432,6 @@ elf_machine_rel (struct link_map *map, const Elf32_Rel *reloc,
Therefore the offset is already correct. */
if (sym != NULL)
*reloc_addr = sym->st_value;
- CHECK_STATIC_TLS (map, sym_map);
# endif
break;
case R_386_TLS_TPOFF32:
@@ -445,8 +444,10 @@ elf_machine_rel (struct link_map *map, const Elf32_Rel *reloc,
thread pointer. To get the variable position in the TLS
block we subtract the offset from that of the TLS block. */
if (sym != NULL)
- *reloc_addr += sym_map->l_tls_offset - sym->st_value;
- CHECK_STATIC_TLS (map, sym_map);
+ {
+ *reloc_addr += sym_map->l_tls_offset - sym->st_value;
+ CHECK_STATIC_TLS (map, sym_map);
+ }
# endif
break;
case R_386_TLS_TPOFF:
@@ -458,8 +459,10 @@ elf_machine_rel (struct link_map *map, const Elf32_Rel *reloc,
It is a negative value which will be added to the
thread pointer. */
if (sym != NULL)
- *reloc_addr += sym->st_value - sym_map->l_tls_offset;
- CHECK_STATIC_TLS (map, sym_map);
+ {
+ *reloc_addr += sym->st_value - sym_map->l_tls_offset;
+ CHECK_STATIC_TLS (map, sym_map);
+ }
# endif
break;
#endif /* use TLS */