binfmt/elf: both regular file and non-regular file (such as /dev/node) should be accessible

Signed-off-by: wanggang26 <wanggang26@xiaomi.com>
This commit is contained in:
wanggang26 2023-07-11 10:06:04 +08:00 committed by Xiang Xiao
parent 7d281f46de
commit 9d67c7b6ac

View File

@ -89,14 +89,6 @@ static inline int elf_filelen(FAR struct elf_loadinfo_s *loadinfo)
return ret; return ret;
} }
/* Verify that it is a regular file */
if (!S_ISREG(buf.st_mode))
{
berr("Not a regular file. mode: %d\n", buf.st_mode);
return -ENOENT;
}
/* Return the size of the file in the loadinfo structure */ /* Return the size of the file in the loadinfo structure */
loadinfo->filelen = buf.st_size; loadinfo->filelen = buf.st_size;