From 9d67c7b6ac0ae8905f96287c0b3385d2027632fd Mon Sep 17 00:00:00 2001 From: wanggang26 Date: Tue, 11 Jul 2023 10:06:04 +0800 Subject: [PATCH] binfmt/elf: both regular file and non-regular file (such as /dev/node) should be accessible Signed-off-by: wanggang26 --- binfmt/libelf/libelf_init.c | 8 -------- 1 file changed, 8 deletions(-) diff --git a/binfmt/libelf/libelf_init.c b/binfmt/libelf/libelf_init.c index 6a2600a4e1..c355e34dfa 100644 --- a/binfmt/libelf/libelf_init.c +++ b/binfmt/libelf/libelf_init.c @@ -89,14 +89,6 @@ static inline int elf_filelen(FAR struct elf_loadinfo_s *loadinfo) 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 */ loadinfo->filelen = buf.st_size;