Masayuki Ishikawa
304d72ed00
binfmt: Call up_module_text_free() in unload_module()
...
Summary:
- I noticed that up_module_text_free() is not called
if CONFIG_ARCH_USE_MODULE_TEXT=y
- This commit fixes this issue
Impact:
- None
Testing:
- Tested with spresense
Signed-off-by: Masayuki Ishikawa <Masayuki.Ishikawa@jp.sony.com>
2021-06-04 01:40:37 -05:00
Xiang Xiao
2e54df0f35
Don't include assert.h from public header file
...
Signed-off-by: Xiang Xiao <xiaoxiang@xiaomi.com>
2021-06-03 08:36:03 -07:00
Masayuki Ishikawa
4d492104a7
binfmt: Introduce a separate text memory for ELF
...
Summary:
- This commit introduces a separate text memory for ELF
- The logic is similar to modlib
Impact:
- None
Testing:
- Tested with spresense:elf
- NOTE: needs separate commits
Signed-off-by: Masayuki Ishikawa <Masayuki.Ishikawa@jp.sony.com>
2021-06-02 02:27:04 -05:00
Xiang Xiao
bebdbc5c87
binfmt: Remove filename/exports/nexports from binary_s
...
to simplify the life cycle management
Signed-off-by: Xiang Xiao <xiaoxiang@xiaomi.com>
2021-06-02 15:20:38 +09:00
Xiang Xiao
cf78a5b6cf
binfmt: Move argv copy into exec_module
...
and remove the related fields from struct binary_s
Signed-off-by: Xiang Xiao <xiaoxiang@xiaomi.com>
2021-06-02 15:20:38 +09:00
Xiang Xiao
d7f96003cf
Don't include debug.h from public header file
...
Signed-off-by: Xiang Xiao <xiaoxiang@xiaomi.com>
2021-06-01 06:42:02 +09:00
Xiang Xiao
8a14a13819
binfmt: Rename dump_module to binfmt_dumpmodule
...
follow other binfmt function naming convention
Signed-off-by: Xiang Xiao <xiaoxiang@xiaomi.com>
2021-05-24 12:16:06 +09:00
Alexander Lunev
4018cc186c
libelf: fix "nsh: nsh_session: readline failed: 13" error
...
Resolves issue #3751
2021-05-21 02:12:31 -07:00
Xiang Xiao
85c1354043
binfmt/elf: Don't close filfd in the fail path
...
to avoid close the same handle twice because
the caller also call elf_uninit in this case
Signed-off-by: Xiang Xiao <xiaoxiang@xiaomi.com>
Change-Id: Iddcbae9587d11d3b5b06e876d4a037ac0d11992e
2021-05-12 21:09:29 -07:00
Liio Chen
468e08c1b4
binnfmt:Fix return before close ELF fd
...
elf_init open a elf file , if both enabled
CONFIG_NSH_BUIlTAPPS and CONFIG_NSH_FILE_APPS ,
elf_init will read elf file in /bin directory, but
that length is zero , elf_read failed return and NOT
close elf fd, so this line MUST be return to errout_with_init
2021-05-07 06:42:15 -07:00
Byron Ellacott
c9db653c8d
symtabs: improve handling of symbol lookups
...
When CONFIG_SYMTAB_ORDEREDBYNAME is selected most code will use
the ordered search function. When it is not selected no code will
use the ordered search function. This change merges the two
functions and varies its behaviour based on the config setting,
such that all callers can simply call the one search function
and get the best behaviour.
An additional configuration option allows leading underscores to
be stripped from symbols being relocated in loaded objects. This
allows toolchains which prefix C symbol with underscores to make
loadable ELF objects.
2021-03-16 10:18:17 -07:00
Abdelatif Guettouche
d85c432278
Few typos fixes in binfmt and libc/machine.
...
Signed-off-by: Abdelatif Guettouche <abdelatif.guettouche@espressif.com>
2021-03-11 10:35:40 +08:00
Gustavo Henrique Nihei
330eff36d7
sourcefiles: Fix relative path in file header
2021-03-09 23:18:28 +08:00
Gustavo Henrique Nihei
13535d8725
linkerfiles: Fix relative path in file header
2021-03-09 23:18:28 +08:00
Alin Jerpelea
f9fb182809
Author: Gregory Nutt: update licenses to Apache
...
Update files from Gregory Nutt to Apache 2.0 license.
Signed-off-by: Alin Jerpelea <alin.jerpelea@sony.com>
2021-02-05 12:15:56 -03:00
Alin Jerpelea
789d3751ad
binfmt: libnxflat: nxstyle error fix
...
Fix nxstyle errors to pass CI
Signed-off-by: Alin Jerpelea <alin.jerpelea@sony.com>
2021-02-05 12:15:56 -03:00
Xiang Xiao
0dc6990166
Fix nxstyle warning
...
Signed-off-by: Xiang Xiao <xiaoxiang@xiaomi.com>
2021-01-13 08:57:58 +01:00
Xiang Xiao
0536953ded
Kernel module should prefer functions with nx/kmm prefix
...
Signed-off-by: Xiang Xiao <xiaoxiang@xiaomi.com>
2021-01-13 08:57:58 +01:00
chao.an
c56785bd0d
style/Makefile: remove unnecessary trailing whitespace
...
N/A
Signed-off-by: chao.an <anchao@xiaomi.com>
2020-11-28 12:20:30 +01:00
YAMAMOTO Takashi
85f38b01c1
binfmt/libelf/libelf_dtors.c: Fix a syslog format
2020-11-27 05:18:57 -06:00
YAMAMOTO Takashi
44e61d7fe7
binfmt/libelf/libelf_ctors.c: Fix a syslog format
2020-11-27 05:18:57 -06:00
YAMAMOTO Takashi
78797dc1da
binfmt/libnxflat/libnxflat_bind.c: Fix syslog formats
2020-11-25 05:11:26 -08:00
YAMAMOTO Takashi
ca2cc5133d
binfmt/libnxflat/libnxflat_load.c: Fix syslog formats
2020-11-25 05:11:26 -08:00
YAMAMOTO Takashi
b9538bf885
binfmt/libnxflat/libnxflat_load.c: Appease nxstyle
2020-11-25 05:11:26 -08:00
Matias N
d5b6ec450f
Parallelize depend file generation
2020-11-22 09:02:59 -03:00
YAMAMOTO Takashi
d068713738
binfmt/libelf/libelf_symbols.c: Fix syslog formats
2020-11-21 19:38:32 -08:00
YAMAMOTO Takashi
148ee150f0
binfmt/libelf/libelf_bind.c: Fix syslog formats
2020-11-21 19:38:32 -08:00
YAMAMOTO Takashi
48e3e2d390
binfmt/binfmt_dumpmodule.c: Fix syslog format errors
2020-11-20 22:22:53 -08:00
Nathan Hartman
80ce7800a9
Sources and Docs: Fix typos and nxstyle issues
...
Documentation/contributing/coding_style.rst:
* Fix repeated words: ("this this").
* Remove trailing spaces.
boards/z80/z80/z80sim/README.txt:
* Fix repeated words: ("this this") and rewrap lines.
graphics/Kconfig,
libs/libc/math/Kconfig:
* Fix repeated words: ("this this").
arch/arm/src/armv7-a/arm_assert.c,
arch/arm/src/armv7-r/arm_assert.c,
arch/arm/src/imxrt/imxrt_enet.c,
arch/arm/src/kinetis/kinetis_enet.c,
arch/arm/src/kinetis/kinetis_flexcan.c,
arch/arm/src/s32k1xx/s32k1xx_enet.c,
arch/arm/src/s32k1xx/s32k1xx_flexcan.c,
arch/arm/src/stm32/stm32_pwm.c,
arch/arm/src/stm32h7/stm32_pwm.c,
arch/arm/src/stm32l4/stm32l4_pwm.c,
arch/renesas/src/rx65n/rx65n_usbdev.c,
binfmt/libnxflat/libnxflat_bind.c,
drivers/pipes/pipe_common.c,
net/igmp/igmp_input.c,
net/tcp/tcp_conn.c,
sched/sched/sched_roundrobin.c:
* Fix typo in comment ("this this").
arch/arm/src/cxd56xx/cxd56_usbdev.c,
arch/arm/src/lc823450/lc823450_usbdev.c:
* Fix typo in comment and rewrap lines.
arch/arm/src/imxrt/imxrt_usbdev.c,
arch/arm/src/stm32/stm32_dac.c,
arch/arm/src/stm32f0l0g0/stm32_pwm.c,
arch/arm/src/stm32f7/stm32_pwm.c,
arch/arm/src/tiva/lm/lm4f_gpio.h,
fs/nxffs/nxffs_write.c,
include/nuttx/analog/pga11x.h,
include/nuttx/usb/usbdev.h,
net/mld/mld_join.c:
* Fix typo in comment ("this this").
* Fix nxstyle issues.
2020-10-02 04:54:52 +02:00
Xiang Xiao
ae356001cf
Change all files come from Xiaomi/Pinecone to Apache License 2.0
...
Signed-off-by: Xiang Xiao <xiaoxiang@xiaomi.com>
2020-08-22 17:37:21 -06:00
SPRESENSE
e249a2f82f
Makefile: Fix Make.dep not updated by config changes
...
Make.dep file should be updated by .config changed after first make.
There are 2 cases affected for this problem:
1) Add source files by config symbol
2) Include header files in #ifdef directive
These 2 cases may not be included in Make.dep and this may prevent the
differential build from working correctly.
2020-07-28 03:59:45 -05:00
Xiang Xiao
2b7528feae
binfmt: Fix warning: unused variable ‘exidx’
...
Signed-off-by: Xiang Xiao <xiaoxiang@xiaomi.com>
Change-Id: I55d3355813b8b24727e2a7f78fcd72622a1e6758
2020-07-21 00:03:47 -07:00
Xiang Xiao
fbfd9d62da
libelf: Parse .ARM.exidx only for ARM architecture
...
since other arch has the different unwind approach
Signed-off-by: Xiang Xiao <xiaoxiang@xiaomi.com>
Change-Id: Icefa0d4bc31bff967372949216d337770cd7e768
2020-07-11 10:34:22 -07:00
Xiang Xiao
14ecb8723a
sched: Change tcb_s to task_tcb_s for nxtask_[un]init
...
since these functions can just work with task not thread
Signed-off-by: Xiang Xiao <xiaoxiang@xiaomi.com>
2020-06-30 10:54:42 -06:00
chao.an
b9ad4a000e
binfmt/exec: allocate stack from internal
...
Implement of nxtask_init() support stack allocation from internal
Change-Id: I4885c5b901d90e57eb9d15d8bc1af32761584d19
Signed-off-by: chao.an <anchao@xiaomi.com>
2020-06-30 08:26:38 +02:00
chao.an
2fc02ec4a4
sched/task_init: change the stack pointer type to (void *)
...
change the stack pointer type from (uint32_t *) to (void *)
Change-Id: I90bb7d6a9cb0184c133578a1a2ae9a19c233ad30
Signed-off-by: chao.an <anchao@xiaomi.com>
2020-06-30 08:26:38 +02:00
Xiang Xiao
a69678810d
sched: Change the return type of nxtask_activate to void
...
to simplify the error handling logic
Signed-off-by: Xiang Xiao <xiaoxiang@xiaomi.com>
Change-Id: I00fedd4d69620a7cc7b9f9e8bf4ba7f7989dc2b2
2020-06-04 22:20:45 +01:00
Xiang Xiao
b932b653dd
arch: Select 64bit elf base on the architecture characteristic
...
Signed-off-by: Xiang Xiao <xiaoxiang@xiaomi.com>
Change-Id: I09eec5a76f255016a910cfec3b3f70cd7577525e
2020-05-31 21:38:32 -07:00
Gregory Nutt
82debdc213
Make task_init() and task_activate() internal OS functions.
...
-Move task_init() and task_activate() prototypes from include/sched.h to include/nuttx/sched.h. These are internal OS functions and should not be exposed to the user.
-Remove references to task_init() and task_activate() from the User Manual.
-Rename task_init() to nxtask_init() since since it is an OS internal function
-Rename task_activate() to nxtask_activate since it is an OS internal function
2020-05-25 23:54:45 +01:00
Xiang Xiao
23668a4b9b
build: Remove the empty variable assignment
...
Signed-off-by: Xiang Xiao <xiaoxiang@xiaomi.com>
2020-05-24 08:24:13 -06:00
Xiang Xiao
edb0ce2d5a
build: Don't need use $(DELIM) in include statement
...
Signed-off-by: Xiang Xiao <xiaoxiang@xiaomi.com>
2020-05-24 08:24:13 -06:00
Xiang Xiao
dd61d3d9f9
build: Remve the unnecessary .gitignore
...
Signed-off-by: Xiang Xiao <xiaoxiang@xiaomi.com>
2020-05-23 18:00:40 +01:00
Xiang Xiao
1a95cce1a3
build: Move .config check to the top Makefile
...
remove the workaround to handle the inexistence of .config/Make.defs
Signed-off-by: Xiang Xiao <xiaoxiang@xiaomi.com>
2020-05-20 17:57:34 +01:00
Xiang Xiao
5eae32577e
build: Move INCDIROPT to common place
...
Signed-off-by: Xiang Xiao <xiaoxiang@xiaomi.com>
2020-05-18 15:02:55 -06:00
Xiang Xiao
bd656888f2
build: Replace WINTOOL with CYGWIN_WINTOOL Kconfig
...
so the correct value can be determinated by Kconfig system automatically
Signed-off-by: Xiang Xiao <xiaoxiang@xiaomi.com>
2020-05-18 15:02:55 -06:00
Gregory Nutt
a4218e2144
include/nuttx/sched.h: Make naming of all internal names consistent:
...
1. Add internal scheduler functions should begin with nxsched_, not sched_
2. Follow the consistent naming patter of https://cwiki.apache.org/confluence/display/NUTTX/Naming+of+OS+Internal+Functions
2020-05-09 14:19:08 -03:00
Xiang Xiao
5c748cea2a
sched: Don't need call get_errno after task_activate
...
since task_activate don't save the error code into errno
Signed-off-by: Xiang Xiao <xiaoxiang@xiaomi.com>
2020-05-03 12:15:54 -06:00
Xiang Xiao
3c84278aa7
sched: task_init as internal function shouldn't modify errno
...
Signed-off-by: Xiang Xiao <xiaoxiang@xiaomi.com>
2020-05-03 12:15:54 -06:00
Xiang Xiao
8d1a0c2761
binfmt: exec_spawn as internal function shouldn't modify errno
...
Signed-off-by: Xiang Xiao <xiaoxiang@xiaomi.com>
2020-05-03 12:15:54 -06:00
Xiang Xiao
fe5cb9529d
builtin: Remove HAVE_BUILTIN_CONTEXT macro
...
it's enough to decide which code should be compiled with CONFIG_BUILTIN and CONFIG_FS_BINFS
Signed-off-by: Xiang Xiao <xiaoxiang@xiaomi.com>
2020-05-01 10:43:47 -03:00