about summary refs log tree commit diff
path: root/sysdeps/unix/sysv/linux/powerpc/dl-sysdep.c
diff options
context:
space:
mode:
Diffstat (limited to 'sysdeps/unix/sysv/linux/powerpc/dl-sysdep.c')
-rw-r--r--sysdeps/unix/sysv/linux/powerpc/dl-sysdep.c35
1 files changed, 0 insertions, 35 deletions
diff --git a/sysdeps/unix/sysv/linux/powerpc/dl-sysdep.c b/sysdeps/unix/sysv/linux/powerpc/dl-sysdep.c
index 1c79f6a93c..7280315933 100644
--- a/sysdeps/unix/sysv/linux/powerpc/dl-sysdep.c
+++ b/sysdeps/unix/sysv/linux/powerpc/dl-sysdep.c
@@ -149,38 +149,3 @@ _dl_sysdep_open_zero_fill (void)
   return __open ("/dev/zero", O_RDONLY);
 }
 #endif
-
-/* Read the whole contents of FILE into new mmap'd space with given
-   protections.  *SIZEP gets the size of the file.  */
-
-void *
-_dl_sysdep_read_whole_file (const char *file, size_t *sizep, int prot)
-{
-  void *result;
-  struct stat st;
-  int fd = __open (file, O_RDONLY);
-  if (fd < 0)
-    return NULL;
-  if (__fstat (fd, &st) < 0)
-    result = NULL;
-  else
-    {
-      /* Map a copy of the file contents.  */
-      result = __mmap (0, st.st_size, prot,
-#ifdef MAP_COPY
-		       MAP_COPY
-#else
-		       MAP_PRIVATE
-#endif
-#ifdef MAP_FILE
-		       | MAP_FILE
-#endif
-		       , fd, 0);
-      if (result == (void *) -1)
-	result = NULL;
-      else
-	*sizep = st.st_size;
-    }
-  __close (fd);
-  return result;
-}