2002-08-04 Roland McGrath <roland@redhat.com>
authorroland <roland>
Mon, 5 Aug 2002 01:20:58 +0000 (01:20 +0000)
committerroland <roland>
Mon, 5 Aug 2002 01:20:58 +0000 (01:20 +0000)
* elf/dl-load.c (_dl_map_object_from_fd): Use p_vaddr, not p_offset,
to compute memory location for l_tls_initimage.
* elf/rtld.c (_dl_start): Likewise.
* sysdeps/generic/libc-tls.c (__libc_setup_tls): Likewise.

elf/dl-load.c

index 2955bc5..aabbf21 100644 (file)
@@ -949,7 +949,7 @@ _dl_map_object_from_fd (const char *name, int fd, struct filebuf *fbp,
              l->l_tls_initimage_size = ph->p_filesz;
              /* Since we don't know the load address yet only store the
                 offset.  We will adjust it later.  */
-             l->l_tls_initimage = (void *) ph->p_offset;
+             l->l_tls_initimage = (void *) ph->p_vaddr;
 
              /* Assign the next available module ID.  */
              l->l_tls_modid = _dl_next_tls_modid ();