about summary refs log tree commit diff
diff options
context:
space:
mode:
-rw-r--r--ChangeLog3
-rw-r--r--elf/dl-load.c2
-rw-r--r--nss/getXXbyYY_r.c2
3 files changed, 4 insertions, 3 deletions
diff --git a/ChangeLog b/ChangeLog
index 87c225bdb3..687291b639 100644
--- 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.
diff --git a/elf/dl-load.c b/elf/dl-load.c
index e7747faf22..1d10541f52 100644
--- a/elf/dl-load.c
+++ b/elf/dl-load.c
@@ -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.  */
diff --git a/nss/getXXbyYY_r.c b/nss/getXXbyYY_r.c
index 020848024b..ca81cf4c8f 100644
--- a/nss/getXXbyYY_r.c
+++ b/nss/getXXbyYY_r.c
@@ -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