nuttx/libs/libc/unistd
Pavel Pisa 380198c985 symtab/, tools/: NuttX provides lists of available syscalls and library functions and tools to process them. The lists can be used to build symbol table which allows runtime program loading which can reuse functions already compiled into NuttX system image. List processing, compilation and linking to the final system image has been possible only under manual control until now.
Provided changes add option (CONFIG_EXECFUNCS_GENERATE_SYSTEM_SYMTAB) to build complete list of available functions and syscalls automatically.  The symbolic table is generated in form libsymtab.a which can be reused by application or directly pull in when "g_symtab" and "g_nsymbols" variables are requested by EXECFUNCS configuration.

I have tried to follow mechanisms for library compilation in different kernel protection modes but tested only flat no-MMU build. The basic assumption is that this library and libraries providing syscall stubs and C-library functions are available in user-space context and initial application (usually NSH) registers the symbol table through IOCTL.  The table can be reused then by another applications in their address space as kernel allows. Simple for flat or protected mode, I am not sure if really support in MMU mode. It is highly probable that I have made some mistake, overlooked something, but functionality is optional (should not cause troubles in any mode if disabled) and main purpose is to lower memory overhead when more applications are loaded on memory constrained system which usually use direct kernel calling without protection or address space separation. If the table should be provided by kernel to applications then makefiles has to be adjusted.
2019-08-13 09:09:43 -06:00
..
Kconfig symtab/, tools/: NuttX provides lists of available syscalls and library functions and tools to process them. The lists can be used to build symbol table which allows runtime program loading which can reuse functions already compiled into NuttX system image. List processing, compilation and linking to the final system image has been possible only under manual control until now. 2019-08-13 09:09:43 -06:00
lib_access.c This commit moves all of the libraries under a common directory called libs/. This most certainly break libcxx and uClibc++ for now. 2018-05-29 13:21:26 -06:00
lib_chdir.c CONFIG_NFILE_DESCRIPTORS=0 can no longer be used to disable the file system. NuttX with no file system does not make sense. 2019-02-11 12:09:26 -06:00
lib_daemon.c CONFIG_NFILE_DESCRIPTORS=0 can no longer be used to disable the file system. NuttX with no file system does not make sense. 2019-02-11 12:09:26 -06:00
lib_execl.c binfmt/ and libs/libc: Make exepath_*() more common: 2018-11-08 07:27:14 -06:00
lib_getcwd.c CONFIG_NFILE_DESCRIPTORS=0 can no longer be used to disable the file system. NuttX with no file system does not make sense. 2019-02-11 12:09:26 -06:00
lib_getgid.c sched/group and syscall/: Implement 'real' setuid, getuid, setgid, and getgid interfaces. These will be inheritance by all child task groups. 2019-08-06 14:13:43 -06:00
lib_gethostname.c libs/unistd and other affected files: Hostname support no longer depends on CONFIG_NET since the host name is also useful in the non-network environment. CONFIG_NET_HOSTNAME changed to CONFIG_LIB_HOSTNAME. 2019-01-27 06:56:16 -06:00
lib_getopt.c libs/libc/unistd/lib_getopt.c: Add logic to reinitialize the stale context for the FLAT/PROTECTED builds. In these builds getopt() global varriables may be shared by many tasks. If any task exits the getopt() loop before all command line arguments have been parsed, then getopt() global variables will be left in a bad state. The next time getopt() is called, this logic should detect the bad state and force the state of getopt() to be re-initialized so that it can be reused. This logic is not full proof (it would fail, for example, if you tried to parse the same command line twice) but should catch the typical misuse cases. 2019-02-05 10:30:59 -06:00
lib_getoptargp.c This commit moves all of the libraries under a common directory called libs/. This most certainly break libcxx and uClibc++ for now. 2018-05-29 13:21:26 -06:00
lib_getoptindp.c This commit moves all of the libraries under a common directory called libs/. This most certainly break libcxx and uClibc++ for now. 2018-05-29 13:21:26 -06:00
lib_getoptoptp.c This commit moves all of the libraries under a common directory called libs/. This most certainly break libcxx and uClibc++ for now. 2018-05-29 13:21:26 -06:00
lib_getuid.c sched/group and syscall/: Implement 'real' setuid, getuid, setgid, and getgid interfaces. These will be inheritance by all child task groups. 2019-08-06 14:13:43 -06:00
lib_pipe.c This commit moves all of the libraries under a common directory called libs/. This most certainly break libcxx and uClibc++ for now. 2018-05-29 13:21:26 -06:00
lib_setgid.c sched/group/group_setuid.c and group_setguid.c: Verify that the UID/GID is within range. 2019-08-10 10:42:53 -06:00
lib_sethostname.c libs/unistd and other affected files: Hostname support no longer depends on CONFIG_NET since the host name is also useful in the non-network environment. CONFIG_NET_HOSTNAME changed to CONFIG_LIB_HOSTNAME. 2019-01-27 06:56:16 -06:00
lib_setuid.c libs/libc/unistd: Stubs for setuid and setgid. Added stubbed implementations of setuid and setgid. These functions are essentially stubs pretending that NuttX supported users and groups and that the only configured user and group in the system were both 'root' with a uid and a gid of 0, respectively. The intent is not to provide meaningful new features, but to ease porting of foreign source code to NuttX. 2019-08-06 07:17:23 -06:00
lib_sleep.c This commit moves all of the libraries under a common directory called libs/. This most certainly break libcxx and uClibc++ for now. 2018-05-29 13:21:26 -06:00
lib_swab.c This commit moves all of the libraries under a common directory called libs/. This most certainly break libcxx and uClibc++ for now. 2018-05-29 13:21:26 -06:00
lib_sysconf.c Remove trailing spaces at the end of lines. 2018-08-13 07:39:38 -06:00
lib_truncate.c This commit moves all of the libraries under a common directory called libs/. This most certainly break libcxx and uClibc++ for now. 2018-05-29 13:21:26 -06:00
lib_usleep.c This commit moves all of the libraries under a common directory called libs/. This most certainly break libcxx and uClibc++ for now. 2018-05-29 13:21:26 -06:00
Make.defs sched/group and syscall/: Implement 'real' setuid, getuid, setgid, and getgid interfaces. These will be inheritance by all child task groups. 2019-08-06 14:13:43 -06:00