]> sourceware.org Git - glibc.git/commitdiff
2002-10-17 Roland McGrath <roland@redhat.com>
authorRoland McGrath <roland@gnu.org>
Thu, 17 Oct 2002 19:44:19 +0000 (19:44 +0000)
committerRoland McGrath <roland@gnu.org>
Thu, 17 Oct 2002 19:44:19 +0000 (19:44 +0000)
* 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.

sysdeps/i386/dl-machine.h
sysdeps/x86_64/dl-machine.h

index 60122c53242f6e0dbf1ef792a0be2a56089ad4ed..5b9c24f5a8c081eec8061955829f944154223904 100644 (file)
@@ -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 */
index 118a4b75b5c6948137a95a833f78cd6eefc96cfa..afae50ac8027406a5fb567ee0cd4ce9b07dee352 100644 (file)
@@ -429,14 +429,14 @@ elf_machine_rela (struct link_map *map, const Elf64_Rela *reloc,
          if (sym != NULL)
 # endif
            {
+# ifndef RTLD_BOOTSTRAP
+             CHECK_STATIC_TLS (map, sym_map);
+# endif
              /* We know the offset of the object the symbol is contained in.
                 It is a negative value which will be added to the
                 thread pointer.  */
              *reloc_addr = (sym->st_value + reloc->r_addend
                             - sym_map->l_tls_offset);
-# ifndef RTLD_BOOTSTRAP
-             CHECK_STATIC_TLS (map, sym_map);
-# endif
            }
          break;
 #endif /* use TLS */
This page took 0.042182 seconds and 5 git commands to generate.