Commit Graph

40 Commits

Author SHA1 Message Date
YAMAMOTO Takashi
061b796d47 Adapt dlfcn/modlib to use the instruction memory allocator 2020-03-16 07:54:49 -06:00
YAMAMOTO Takashi
793b0c2040 sched/module: Wrap long lines to make nxstyle happy 2020-03-10 03:56:06 -05:00
Xiang Xiao
cde88cabcc Run codespell -w with the latest dictonary again
Signed-off-by: Xiang Xiao <xiaoxiang@xiaomi.com>
2020-02-23 22:27:46 +01:00
Masayuki Ishikawa
81f1133174 ELF64 support (#220)
* include: Introduce elf64.h and elf.h

    Added elf64.h for 64bit ELF support and moved common definitions
    from elf32.h to elf.h. Also introduced Elf_xxx to be used in
    common libraries such as binfmt.

  * binfmt, include, modlib, module: Add support for ELF64

    Elf_xxx must be used instead of Elf32_xxx to support ELF64.
    To use ELF64, CONFIG_ELF_64BIT must be enabled.

  * binfmt, modlib: Add support for relocate address

  * arch: risc-v: Add include/elf.h

  * libs: machine: Add risc-v related files.

    NOTE: Currently only supports ELF64

  * boards: maix-bit: Add elf and posix_spawn configurations

  * boards: maix-bit: Add support for module configuration
2020-02-07 17:10:23 -06:00
Xiang Xiao
6a3c2aded6 Fix wait loop and void cast (#24)
* Simplify EINTR/ECANCEL error handling

1. Add semaphore uninterruptible wait function
2 .Replace semaphore wait loop with a single uninterruptible wait
3. Replace all sem_xxx to nxsem_xxx

* Unify the void cast usage

1. Remove void cast for function because many place ignore the returned value witout cast
2. Replace void cast for variable with UNUSED macro
2020-01-02 10:54:43 -06:00
Gregory Nutt
d2af57169b tools/nxstyle.c: Fix a rare false alarm that could occur if a variable or function name begins with the sub-string 'union' or 'struct'. misc fixes under fs/ and sched/ from application of current version of nxstyle. 2019-12-01 13:01:16 -06:00
Xiang Xiao
9e2238f6cd libs/libc/dllfcn: Implement dlerror using strerror. 2019-01-26 11:39:05 -06:00
Xiang Xiao
095e28d45e binfmt/, binfmt/libelf/, include/nuttx, libs/libc/machine, libs/libc/modlib, and others: Move elf related arch function to include/nuttx/elf.h because the implementation is located in libs/libc/machine and in order to avoid the conflict with the 3rd party libraries and clean up the file inclusion: (1) Remove redundant elf32.h, (2) Remove nuttx/binfmt/elf.h in libs/libc/machine, (2) Remove nuttx/binfmt/elf.h in modlib, and (4) Rmove nuttx/module.h in modlib. 2019-01-26 11:18:45 -06:00
Gregory Nutt
9546481054 Fix some typographical errors. 2018-09-14 06:55:45 -06:00
Gregory Nutt
a2428db499 configs/olimex-stm32_p407: Add logic to support initialization of the kernel module symbol table installed in the pass2/ directory during the application phase of the build. The kmodule configuration appears to be fully functional. 2018-08-07 10:50:25 -06:00
Gregory Nutt
a6a88198c0 sched/modules: Be consistent use of binary loader debug instrumentation. Was mixed system and binary loader debug. libs/libc/modlib: Switch from systemb to binary load debug to be consistent with sched/modules. 2018-06-01 10:10:17 -06:00
Alan Carvalho de Assis
f3d940aac5 sched/module/mod_modhandle.c: Fix typo in debug statement. 2018-06-01 08:54:37 -06:00
Gregory Nutt
12e3e47d3c Update comments, mostly spelling errors. 2018-01-27 09:37:46 -06:00
Arjun Hary
b274a97840 Miscellaneous fixes from astyle tool. 2017-08-14 17:19:27 -06:00
Gregory Nutt
e30b2617e3 Shared Libs: Implement module based shared libraries for the PROTECTED mode build 2017-01-29 13:03:53 -06:00
Gregory Nutt
2c45f482b1 Module names are not needed in libc/modlib when the module library is used only for shared library support. 2017-01-29 12:23:24 -06:00
Gregory Nutt
86bdd0a4c7 Modules: Move last of many C files from sched/module to libc/modlib 2017-01-29 11:54:54 -06:00
Gregory Nutt
6da66fb5c8 Modules: Move next five of many C files from sched/module to libc/modlib 2017-01-29 11:17:29 -06:00
Gregory Nutt
5e94dd22bb Modules: Move first five of many C files from sched/module to libc/modlib 2017-01-29 10:05:15 -06:00
Gregory Nutt
00e46b5966 Move gnu-elf.ld from sched/module to libc/modlib. Update paths in Make.defs files to account for new location of file 2017-01-29 09:03:01 -06:00
Gregory Nutt
2717e781f0 libc/modlib: Add build a configuration logic for a shared module library. 2017-01-29 08:55:27 -06:00
Gregory Nutt
b79ca9dcdd Modules: Move sched/module/module.h to include/nuttx/lib/modlib.h 2017-01-29 08:24:42 -06:00
Gregory Nutt
68a7110195 sched/modules: Add support for dependencies between modules. 2017-01-27 11:43:27 -06:00
Gregory Nutt
4574a1ca42 Modules: Extend the module interface so that we can access symbols exported by the module. 2017-01-22 14:26:22 -06:00
Gregory Nutt
d90e66a024 Kernel Modules: Module initializer may now return a symbol table (not yet used for anything) 2017-01-22 11:37:49 -06:00
Gregory Nutt
43eb04bb8f Without lowsyslog() *llinfo() is not useful. Eliminate and replace with *info(). 2016-06-20 11:59:15 -06:00
Gregory Nutt
13cac3b592 sched/: Change some *err() message to *info() messages if what was a *dbg() message does not indicate and error condition. 2016-06-11 16:42:42 -06:00
Gregory Nutt
a1469a3e95 Add CONFIG_DEBUG_ERROR. Change names of *dbg() * *err() 2016-06-11 15:50:49 -06:00
Gregory Nutt
1cdc746726 Rename CONFIG_DEBUG to CONFIG_DEBUG_FEATURES 2016-06-11 14:14:08 -06:00
Gregory Nutt
fc3540cffe Replace all occurrences of vdbg with vinfo 2016-06-11 11:59:51 -06:00
Gregory Nutt
3a74a438d9 Rename CONFIG_DEBUG_VERBOSE to CONFIG_DEBUG_INFO 2016-06-11 11:50:18 -06:00
Gregory Nutt
e8d0f85c8b Modules: Add mod_setsymtab to set global symtol table once. Now we can remove symbol table parameters from the insmod call. This will make implementing an NSH insmod command much easier 2015-12-13 08:10:01 -06:00
Gregory Nutt
076f382f79 Module: Remove some unused members of a structure 2015-12-13 06:48:30 -06:00
Gregory Nutt
917dbc8540 modules: Add more information to registry just for procfs 2015-12-12 18:56:32 -06:00
Gregory Nutt
795ddd7e80 OS modules: Add basic procfs support. A module registry that will eventually be used to support lsmod 2015-12-12 17:42:25 -06:00
Gregory Nutt
a908a61c5a Various module-related cosmetic changes 2015-12-12 12:55:50 -06:00
Gregory Nutt
303123deb9 Add syscall support for insmod and rmmod 2015-12-12 11:11:09 -06:00
Gregory Nutt
040835de00 Add an implementation of rmmod 2015-12-12 10:51:54 -06:00
Gregory Nutt
0efcb5445b Fix compile error when cache coherency logic is enabled 2015-12-12 09:38:06 -06:00
Gregory Nutt
49554fe4fc Move module support from binfmt/ to sched/ so that it can be configured and built independently from binfmt features 2015-12-12 07:09:17 -06:00