YAMAMOTO Takashi
24c9fa3cd9
Kconfig: Move ELF_64BIT out of !BINFMT_DISABLE
...
Because it's also used by LIBC_MODLIB.
2020-03-27 00:04:36 -05:00
YAMAMOTO Takashi
bb09d564db
libelf: Don't truncate 64-bit values
2020-03-27 00:04:36 -05:00
YAMAMOTO Takashi
f8077022bd
Introduce CONFIG_DEFAULT_TASK_STACKSIZE
...
* The appropriate size of stack varies among archs.
E.g. for 64-bit sim, 2048 is way too small, especially when the task
happens to use host OS functionalities.
I plan to allow an arch provide its own default.
* I plan to use this to replace hardcoded "STACKSIZE = 2048" in APPDIR.
2020-03-26 22:30:13 -05:00
YAMAMOTO Takashi
8ad9d1e0b4
libelf: Appease nxstyle complaints
...
Also, fix a minor typo.
2020-03-26 02:51:34 -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
Xiang Xiao
bd4e8e19d3
Run codespell -w against all files
...
and fix the wrong correction
2020-02-22 14:45:07 -06: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
68951e8d72
Remove exra whitespace from files ( #189 )
...
* Remove multiple newlines at the end of files
* Remove the whitespace from the end of lines
2020-01-31 09:24:49 -06:00
Xiang Xiao
f8bcd58be2
Fix format warn ( #96 )
...
* fix warning: format '%x' expects argument of type 'unsigned int', but argument 4 has type 'long unsigned int'
* fix warning: implicit declaration of function 'up_init_exidx'
2020-01-13 16:41:09 -06:00
Gregory Nutt
dd5748cee8
binfmt/: Update copyright dates in all modified files.
2020-01-11 13:44:58 -03:00
Gregory Nutt
7a72d1e8ca
binfmt/: Run all .c files under binfmt/ through tools/nxstyle and fix all resulting complaints.
2020-01-11 13:44:58 -03:00
Gregory Nutt
9d5d60fee1
Run all .c and .h files in last PR49 through nxstyle.
2020-01-07 09:54:35 -06:00
Alin Jerpelea
a8d63c0cec
various fixes ( #49 )
...
* libs: libc: math: Fix tanh() math functions
* drivers: mtd: smart: Fix trivial debug message in smartfs
* binfmt: libelf: Fix fd not closed on error
* binfmt: Fix stack memory leak on error
* fs: romfs: Fix private data not free on error
* sched: group: Fix reference after free memory
* sched: clock: Fix clock sync
Fix clock sync when CONFIG_RTC_HIRES is enabled
2020-01-07 09:06:02 -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
2925c28f8f
All linker scripts: Preface all _edata defininitions with . = ALIGN(4). Otherwise, the last bytes in the .data section may not be initialized properly. Also convert all linker scripts indent in units of 8-spaces to units of 4-spaces.
2019-09-15 17:22:16 -06:00
Gregory Nutt
da1a561b6e
binfmt/libelf/libelf_bind.c: Make naming of internal type compliant with coding standard. Yes, the ELF32 types do not follow the standard for historical reasons (and will be fixed someday), but let's not perpetuate the naming violation.
2019-03-20 09:34:08 -06:00
Xiang Xiao
64252a298f
arch/: Unify the cache interface for all architectures
2019-03-19 10:37:13 -06:00
anchao
6e69dba341
binfmt/libelf/ and libs/libc/modlib: Add symbol buffer table to reduce filesystem access.
2019-03-19 09:13:50 -06:00
anchao
2f2d432f7c
binfmt/libelf and libs/libc/modlib: Add relocation buffer table to reduce access fs.
2019-03-19 08:57:13 -06:00
Gregory Nutt
c17145e550
Revert "binfmt/libelf/libelf_load.c: Remove the guard(CONFIG_BUILD_KERNEL) for umm_initialize()"
...
This commit has to be reverted because it causes errors in build testing.
This reverts commit b9c7a9a18f
.
2019-02-03 18:08:46 -06:00
Xiang Xiao
b9c7a9a18f
binfmt/libelf/libelf_load.c: Remove the guard(CONFIG_BUILD_KERNEL) for umm_initialize()
2019-01-28 06:19:48 -06:00
Gregory Nutt
78c8485b0d
Fix some warnings found in build testing.
2019-01-27 17:23:01 -06:00
Xiang Xiao
b7f958a02e
binfmt/, binfmt/libelf: binfmt/elf: Call umm_initialize as soon as possible otherwise elf_loadctors/elf_loaddtors will fail to allocate memory.
2019-01-26 11:36:38 -06:00
Xiang Xiao
0edcd6b85e
binfmt/libelf, libs/libc/modlib: Optimize elf load speed: (1) Don't zero out memory, (2) Reduce the initial buffer size to 32 bytes.
2019-01-26 11:34:40 -06:00
Xiang Xiao
264a7164bc
binfmt/: If there is an address environment (CONFIG_ARCH_ADDRENV), binfmt/elf doesn't need to free ctor/dtor alloc since freeing the address environment releases the heap automatically.
2019-01-26 11:29:08 -06:00
Xiang Xiao
38ffb98f1b
Kconfig files, binfmt/libelf, libs/libc/machin, libs/libxx: Correct libcxx exception handling by introducing the generic config(CXX_EXCEPTION and CXX_LIBSUPCXX)
2019-01-26 11:23:31 -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
a7fd58c4db
Squashed commit of the following:
...
many locations: Change occurences of open() followed by file_detach() to file_open(). Change most non-controversion calls to open() to nx_open().
fs/inode/fs_fileopen.c: Flesh out file_open() with some interim, placeholder logic.
fs/inode/fs_fileopen.c: Add a framework for a file_open() implementation (no real logic in place yet).
fs/vfs/fs_open.c: Add nx_open() which is the same as open() except that it does not create a cancellation point nor does it modify the errno variable.
2018-09-15 10:49:41 -06:00
Gregory Nutt
3521aaf944
Squashed commit of the following:
...
binfmt/, configs/, grahics/, libc/, mm/, net/, sched/: OS references to the errno variable should always use the set_errno(), get_errno() macros
arch/arm/src/stm32 and stm32f7: Architecture-specific code is not permitted to modify the errno variable. drivers/ and libc/: OS references to the errno variable should always use the set_errno(), get_errno() macros
2018-01-30 17:57:36 -06:00
Gregory Nutt
181875f3ba
fs/vfs: Add new internal OS interface nx_read(). nx_read() is functionally equivalent to read() except that it does not modify the errno variable and it is not a cancellation point. Changed all references to read() in the OS to nx_read().
2017-10-11 12:13:41 -06:00
Cristian Condurache
2ea054fead
Merged in ccondurache/nuttx/fix_elf_arm_checkarch (pull request #422 )
...
Fix ELF loader up_checkarch on ARM arch
Approved-by: Gregory Nutt <gnutt@nuttx.org>
2017-06-28 16:19:51 +00:00
Cristian Condurache
d4add14823
Fix ELF loader up_checkarch on ARM arch
2017-06-28 18:11:39 +03:00
Yasuhiro Osaki
b1008477ac
binfmt: Fix .dtor memory allocation
...
Jira: PDFW15IS-265
Coverity-ID: 11053
Signed-off-by: Masayuki Ishikawa <Masayuki.Ishikawa@jp.sony.com>
2017-05-19 17:01:48 +09:00
Yasuhiro Osaki
c109e92962
binfmt: Fix offset value when calling elf_read() in elf_sectname()
...
Jira: PDFW15IS-3030
Signed-off-by: Masayuki Ishikawa <Masayuki.Ishikawa@jp.sony.com>
2017-04-28 17:23:02 +09:00
Yasuhiro Osaki
dd2efb909a
binfmt: Fix offset value when calling elf_read() in elf_symname()
...
Jira: PDFW15IS-1650
Signed-off-by: Masayuki Ishikawa <Masayuki.Ishikawa@jp.sony.com>
2017-04-26 14:46:34 +09:00
Gregory Nutt
3fa41c0f18
Kconfig files: Fix some dependencies that have CONFIG_ in the variable name
2016-06-17 19:30:19 -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
05cb7a9043
Call initializer entry point on start-up; do not create a task
2015-12-11 07:27:45 -06:00
Gregory Nutt
45eebacbb4
binfmt/: More spacing/alignment fixes
2015-10-08 19:20:17 -06:00
Gregory Nutt
342f5fe33d
Fix references to the no-longer-existent misc/ directory in comments, README files, and documentation
2015-06-28 08:08:57 -06:00
Gregory Nutt
c704a5289c
Comment out references to fstat(). It is not yet supported.
2015-06-02 11:43:44 -06:00
Gregory Nutt
6068820bf3
Add support uClibc++ excpetions. This involves additional handling for relative relation types, additional support for unwinding, as well as additional changes. The culmination of a big effort fromo Leo Aloe3132
2015-06-01 14:16:18 -06:00
Gregory Nutt
56dee97fbf
Fix a misnamed symbol in a linker script. I don't think that this symbol is used
2015-05-04 13:45:24 -06:00
Gregory Nutt
916ccc78bb
binfmt: Fix a debug statement that does not have the correct number of arguments. From Leo aloe3132
2015-04-30 14:31:04 -06:00
Gregory Nutt
48271cca05
Make some file section headers more consistent with standard
2015-04-08 08:29:03 -06:00
Gregory Nutt
179fabb019
Add description of work queues to the porting guide. Update comments
2014-10-14 10:21:18 -06:00
Gregory Nutt
dd9e42ec0c
Fix a compile problem noted by Marco Cruz
2014-10-13 12:07:40 -06:00