about summary refs log tree commit diff
path: root/elf/dl-load.c
diff options
context:
space:
mode:
Diffstat (limited to 'elf/dl-load.c')
-rw-r--r--elf/dl-load.c12
1 files changed, 2 insertions, 10 deletions
diff --git a/elf/dl-load.c b/elf/dl-load.c
index 0deb51e445..0052bc22d4 100644
--- a/elf/dl-load.c
+++ b/elf/dl-load.c
@@ -85,14 +85,6 @@
 
 #define STRING(x) __STRING (x)
 
-#ifdef MAP_ANON
-/* The fd is not examined when using MAP_ANON.  */
-# define ANONFD -1
-#else
-int _dl_zerofd = -1;
-# define ANONFD _dl_zerofd
-#endif
-
 /* Handle situations where we have a preferred location in memory for
    the shared objects.  */
 #ifdef ELF_PREFERRED_ADDRESS_DATA
@@ -1312,7 +1304,7 @@ cannot allocate TLS data structures for initial thread");
 		caddr_t mapat;
 		mapat = __mmap ((caddr_t) zeropage, zeroend - zeropage,
 				c->prot, MAP_ANON|MAP_PRIVATE|MAP_FIXED,
-				ANONFD, 0);
+				-1, 0);
 		if (__builtin_expect (mapat == MAP_FAILED, 0))
 		  {
 		    errstring = N_("cannot map zero-fill pages");
@@ -1967,7 +1959,7 @@ _dl_map_object (struct link_map *loader, const char *name, int preloaded,
   struct filebuf fb;
 
   assert (nsid >= 0);
-  assert (nsid < DL_NNS);
+  assert (nsid < GL(dl_nns));
 
   /* Look for this name among those already loaded.  */
   for (l = GL(dl_ns)[nsid]._ns_loaded; l; l = l->l_next)