/* Miscellaneous support functions for dynamic linker
- Copyright (C) 1997 Free Software Foundation, Inc.
+ Copyright (C) 1997, 1998 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
int fd = __open (file, O_RDONLY);
if (fd < 0)
return NULL;
- if (__fxstat (_STAT_VER, fd, &st) < 0)
+ if (__fxstat (_STAT_VER, fd, &st) < 0
+ /* No need to map the file if it is empty. */
+ || st.st_size == 0)
result = NULL;
else
{