binfmt/ and libs/libc: Make exepath_*() more common:

1. Move exepath_*() related code to libc/misc
  1. Rename exepath_ to envpath_
  2. Rename BINFMT_EXEPATH to LIB_ENVPATH

libs/libc/modlib:  Add pre module library symbol table support
This commit is contained in:
nchao
2018-11-08 07:27:14 -06:00
committed by Gregory Nutt
parent da737f3167
commit 6509a0c0ca
43 changed files with 368 additions and 235 deletions
+2 -2
View File
@@ -70,8 +70,8 @@
"prctl","sys/prctl.h", "CONFIG_TASK_NAME_SIZE > 0","int","int","..."
"pread","unistd.h","CONFIG_NSOCKET_DESCRIPTORS > 0 || CONFIG_NFILE_DESCRIPTORS > 0","ssize_t","int","FAR void*","size_t","off_t"
"pwrite","unistd.h","CONFIG_NSOCKET_DESCRIPTORS > 0 || CONFIG_NFILE_DESCRIPTORS > 0","ssize_t","int","FAR const void*","size_t","off_t"
"posix_spawnp","spawn.h","!defined(CONFIG_BINFMT_DISABLE) && defined(CONFIG_LIBC_EXECFUNCS) && defined(CONFIG_BINFMT_EXEPATH)","int","FAR pid_t *","FAR const char *","FAR const posix_spawn_file_actions_t *","FAR const posix_spawnattr_t *","FAR char *const []|FAR char *const *","FAR char *const []|FAR char *const *"
"posix_spawn","spawn.h","!defined(CONFIG_BINFMT_DISABLE) && defined(CONFIG_LIBC_EXECFUNCS) && !defined(CONFIG_BINFMT_EXEPATH)","int","FAR pid_t *","FAR const char *","FAR const posix_spawn_file_actions_t *","FAR const posix_spawnattr_t *","FAR char *const []|FAR char *const *","FAR char *const []|FAR char *const *"
"posix_spawnp","spawn.h","!defined(CONFIG_BINFMT_DISABLE) && defined(CONFIG_LIBC_EXECFUNCS) && defined(CONFIG_LIB_ENVPATH)","int","FAR pid_t *","FAR const char *","FAR const posix_spawn_file_actions_t *","FAR const posix_spawnattr_t *","FAR char *const []|FAR char *const *","FAR char *const []|FAR char *const *"
"posix_spawn","spawn.h","!defined(CONFIG_BINFMT_DISABLE) && defined(CONFIG_LIBC_EXECFUNCS) && !defined(CONFIG_LIB_ENVPATH)","int","FAR pid_t *","FAR const char *","FAR const posix_spawn_file_actions_t *","FAR const posix_spawnattr_t *","FAR char *const []|FAR char *const *","FAR char *const []|FAR char *const *"
"pthread_cancel","pthread.h","!defined(CONFIG_DISABLE_PTHREAD)","int","pthread_t"
"pthread_cleanup_pop","pthread.h","defined(CONFIG_PTHREAD_CLEANUP)","void","int"
"pthread_cleanup_push","pthread.h","defined(CONFIG_PTHREAD_CLEANUP)","void","pthread_cleanup_t","FAR void*"
1 _exit unistd.h void int
70 prctl sys/prctl.h CONFIG_TASK_NAME_SIZE > 0 int int
71 pread unistd.h CONFIG_NSOCKET_DESCRIPTORS > 0 || CONFIG_NFILE_DESCRIPTORS > 0 ssize_t int
72 pwrite unistd.h CONFIG_NSOCKET_DESCRIPTORS > 0 || CONFIG_NFILE_DESCRIPTORS > 0 ssize_t int
73 posix_spawnp spawn.h !defined(CONFIG_BINFMT_DISABLE) && defined(CONFIG_LIBC_EXECFUNCS) && defined(CONFIG_BINFMT_EXEPATH) !defined(CONFIG_BINFMT_DISABLE) && defined(CONFIG_LIBC_EXECFUNCS) && defined(CONFIG_LIB_ENVPATH) int FAR pid_t *
74 posix_spawn spawn.h !defined(CONFIG_BINFMT_DISABLE) && defined(CONFIG_LIBC_EXECFUNCS) && !defined(CONFIG_BINFMT_EXEPATH) !defined(CONFIG_BINFMT_DISABLE) && defined(CONFIG_LIBC_EXECFUNCS) && !defined(CONFIG_LIB_ENVPATH) int FAR pid_t *
75 pthread_cancel pthread.h !defined(CONFIG_DISABLE_PTHREAD) int pthread_t
76 pthread_cleanup_pop pthread.h defined(CONFIG_PTHREAD_CLEANUP) void int
77 pthread_cleanup_push pthread.h defined(CONFIG_PTHREAD_CLEANUP) void pthread_cleanup_t
+1 -1
View File
@@ -135,7 +135,7 @@ SYSCALL_LOOKUP(up_assert, 2, STUB_up_assert)
SYSCALL_LOOKUP(exec, 4, STUB_exec)
#endif
#ifdef CONFIG_LIBC_EXECFUNCS
#ifdef CONFIG_BINFMT_EXEPATH
#ifdef CONFIG_LIB_ENVPATH
SYSCALL_LOOKUP(posix_spawnp, 6, STUB_posix_spawnp)
#else
SYSCALL_LOOKUP(posix_spawn, 6, STUB_posix_spawn)