-- glibc/elf/dl-load.c
++ glibc/elf/dl-load.c
/* Now run the tests. */
if (__builtin_expect (fbp->len < (ssize_t) sizeof (ElfW(Ehdr)), 0))
{
/* Make sure this isn't a directory.
http://bugs.gentoo.org/89381 */
struct stat64 st;
if (__fxstat64 (_STAT_VER, fd, &st) == 0
&& S_ISDIR(st.st_mode))
__close (fd);
return -1;
}
errval = errno;
errstring = (errval == 0
? N_("file too short") : N_("cannot read file data"));