about summary refs log tree commit diff
path: root/sysdeps
diff options
context:
space:
mode:
Diffstat (limited to 'sysdeps')
-rw-r--r--sysdeps/generic/segfault.c9
-rw-r--r--sysdeps/unix/sysv/linux/dl-sysdep.c11
2 files changed, 8 insertions, 12 deletions
diff --git a/sysdeps/generic/segfault.c b/sysdeps/generic/segfault.c
index 8a8ee1d1a2..7e364f025f 100644
--- a/sysdeps/generic/segfault.c
+++ b/sysdeps/generic/segfault.c
@@ -237,6 +237,11 @@ install_handler (void)
 
   /* Preserve the output file name if there is any given.  */
   name = getenv ("SEGFAULT_OUTPUT_NAME");
-  if (name != NULL && name[0] != '\0' && access (name, R_OK | W_OK) == 0)
-    fname = __strdup (name);
+  if (name != NULL && name[0] != '\0')
+    {
+      int ret = access (name, R_OK | W_OK);
+
+      if (ret == 0 || (ret == -1 && errno == ENOENT))
+	fname = __strdup (name);
+    }
 }
diff --git a/sysdeps/unix/sysv/linux/dl-sysdep.c b/sysdeps/unix/sysv/linux/dl-sysdep.c
index 07338573dc..b58f4c13e2 100644
--- a/sysdeps/unix/sysv/linux/dl-sysdep.c
+++ b/sysdeps/unix/sysv/linux/dl-sysdep.c
@@ -1,5 +1,5 @@
 /* Dynamic linker system dependencies for Linux.
-   Copyright (C) 1995, 1997 Free Software Foundation, Inc.
+   Copyright (C) 1995, 1997, 2001 Free Software Foundation, Inc.
    This file is part of the GNU C Library.
 
    The GNU C Library is free software; you can redistribute it and/or
@@ -27,16 +27,7 @@
 static inline void
 frob_brk (void)
 {
-  extern size_t _dl_pagesize;
-  extern void _end;
   __brk (0);			/* Initialize the break.  */
-  if (__sbrk (0) == &_end)
-    /* The dynamic linker was run as a program, and so the initial break
-       starts just after our bss, at &_end.  The malloc in dl-minimal.c
-       will consume the rest of this page, so tell the kernel to move the
-       break up that far.  When the user program examines its break, it
-       will see this new value and not clobber our data.  */
-    __sbrk (_dl_pagesize - ((&_end - (void *) 0) & _dl_pagesize));
 }
 
 #include <sysdeps/generic/dl-sysdep.c>