* elf/dl-load.c (_dl_map_object_from_fd): Use l_addr instead of
authorRoland McGrath <roland@gnu.org>
Thu, 12 Sep 2002 05:16:00 +0000 (05:16 +0000)
committerRoland McGrath <roland@gnu.org>
Thu, 12 Sep 2002 05:16:00 +0000 (05:16 +0000)
l_map_start to adjust l_tls_initimage.

ChangeLog
elf/dl-load.c
nss/getXXbyYY_r.c

index 87c225b..687291b 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,5 +1,8 @@
 2002-09-11  Roland McGrath  <roland@redhat.com>
 
+       * elf/dl-load.c (_dl_map_object_from_fd): Use l_addr instead of
+       l_map_start to adjust l_tls_initimage.
+
        * nss/getnssent_r.c (__nss_getent_r): Use EAGAIN instead of errno
        when using h_errno and it's not set to NETDB_INTERNAL.
        * nss/getXXbyYY_r.c [NEED_H_ERRNO]: Likewise.
index e7747fa..1d10541 100644 (file)
@@ -1131,7 +1131,7 @@ _dl_map_object_from_fd (const char *name, int fd, struct filebuf *fbp,
 #ifdef USE_TLS
     /* Adjust the address of the TLS initialization image.  */
     if (l->l_tls_initimage != NULL)
-      l->l_tls_initimage = (char *) l->l_tls_initimage + l->l_map_start;
+      l->l_tls_initimage = (char *) l->l_tls_initimage + l->l_addr;
 #endif
 
   /* We are done mapping in the file.  We no longer need the descriptor.  */
index 0208480..ca81cf4 100644 (file)
@@ -242,8 +242,6 @@ done:
 #ifdef POSTPROCESS
   POSTPROCESS;
 #endif
-  return (status == NSS_STATUS_SUCCESS
-         ? 0 : (status == NSS_STATUS_TRYAGAIN ? errno : ENOENT));
   return (status == NSS_STATUS_SUCCESS ? 0
          : status != NSS_STATUS_TRYAGAIN ? ENOENT
 #ifdef NEED_H_ERRNO