syscall/: The non-standard interface exec() is now enshrined as a official NuttX API. I really dislike doing this but I think that this is probably the only want to load programs in the protected mode. It is currently used by some example code under apps/ that generate their own symbol tables for linking. Other file execution APIs relay on a symbol table provided by the OS. In the protected mode, the OS cannot provide any meaning symbol table for execution of code in the user-space blob so that is they exec() is really needed in that build case. And, finally, the interface is completely useless and will not be supported in the KERNEL build mode where the contrary is true: An application process cannot provide any meaning symbolic information for use in linking a different process.

This commit is contained in:
Gregory Nutt
2017-10-03 07:09:35 -06:00
parent 5512813157
commit 8e966546c1
4 changed files with 31 additions and 15 deletions
+1
View File
@@ -18,6 +18,7 @@
"connect","sys/socket.h","CONFIG_NSOCKET_DESCRIPTORS > 0 && defined(CONFIG_NET)","int","int","FAR const struct sockaddr*","socklen_t"
"dup","unistd.h","CONFIG_NFILE_DESCRIPTORS > 0","int","int"
"dup2","unistd.h","CONFIG_NFILE_DESCRIPTORS > 0","int","int","int"
"exec","nuttx/binfmt/binfmt.h","!defined(CONFIG_BINFMT_DISABLE) && !defined(CONFIG_BUILD_KERNEL)","int","FAR const char *","FAR char * const *","FAR const struct symtab_s *","int"
"execv","unistd.h","!defined(CONFIG_BINFMT_DISABLE) && defined(CONFIG_LIBC_EXECFUNCS)","int","FAR const char *","FAR char *const []|FAR char *const *"
"exit","stdlib.h","","void","int"
"fcntl","fcntl.h","CONFIG_NFILE_DESCRIPTORS > 0","int","int","int","..."
1 _exit unistd.h void int
18 connect sys/socket.h CONFIG_NSOCKET_DESCRIPTORS > 0 && defined(CONFIG_NET) int int
19 dup unistd.h CONFIG_NFILE_DESCRIPTORS > 0 int int
20 dup2 unistd.h CONFIG_NFILE_DESCRIPTORS > 0 int int
21 exec nuttx/binfmt/binfmt.h !defined(CONFIG_BINFMT_DISABLE) && !defined(CONFIG_BUILD_KERNEL) int FAR const char *
22 execv unistd.h !defined(CONFIG_BINFMT_DISABLE) && defined(CONFIG_LIBC_EXECFUNCS) int FAR const char *
23 exit stdlib.h void int
24 fcntl fcntl.h CONFIG_NFILE_DESCRIPTORS > 0 int int