about summary refs log tree commit diff
path: root/elf
diff options
context:
space:
mode:
Diffstat (limited to 'elf')
-rw-r--r--elf/dl-error.c1
-rw-r--r--elf/dl-support.c2
-rw-r--r--elf/eval.c2
-rw-r--r--elf/rtld.c2
4 files changed, 6 insertions, 1 deletions
diff --git a/elf/dl-error.c b/elf/dl-error.c
index e0a73471a4..55d9c2fc93 100644
--- a/elf/dl-error.c
+++ b/elf/dl-error.c
@@ -90,6 +90,7 @@ _dl_catch_error (char **errstring,
     }
 
   /* We get here only if we longjmp'd out of OPERATE.  */
+  catch = NULL;
   *errstring = c.errstring;
   *objname = c.objname;
   return errcode == -1 ? 0 : errcode;
diff --git a/elf/dl-support.c b/elf/dl-support.c
index 35710a0a74..593f96749b 100644
--- a/elf/dl-support.c
+++ b/elf/dl-support.c
@@ -33,6 +33,7 @@ char **_dl_argv = &__progname;	/* This is checked for some error messages.  */
    For the dynamic linker it is set by -rpath when linking.  */
 const char *_dl_rpath = DEFAULT_RPATH;
 
+#ifndef MAP_ANON
 /* This is the only dl-sysdep.c function that is actually needed at run-time
    by _dl_map_object.  */
 
@@ -41,6 +42,7 @@ _dl_sysdep_open_zero_fill (void)
 {
   return __open ("/dev/zero", O_RDONLY);
 }
+#endif
 
 /* This should never be called.  */
 void
diff --git a/elf/eval.c b/elf/eval.c
index 0fb6751a95..7d53671f6c 100644
--- a/elf/eval.c
+++ b/elf/eval.c
@@ -128,7 +128,7 @@ _start (void)
   char *buf = NULL;
   size_t bufsz = 0;
 
-  while (getline (&buf, &bufsz, stdin) > 0)
+  while (__getline (&buf, &bufsz, stdin) > 0)
     {
       char *p = buf;
       eval (&p);
diff --git a/elf/rtld.c b/elf/rtld.c
index f65bd80954..28c9fd796e 100644
--- a/elf/rtld.c
+++ b/elf/rtld.c
@@ -236,6 +236,8 @@ of this helper program; chances are you did not intend to run this program.\n",
       /* Create a link_map for the executable itself.
 	 This will be what dlopen on "" returns.  */
       l = _dl_new_object ((char *) "", "", lt_executable);
+      if (l == NULL)
+	_dl_sysdep_fatal ("cannot allocate memory for link map", NULL);
       l->l_phdr = phdr;
       l->l_phnum = phent;
       l->l_entry = *user_entry;