This is an automated email from the ASF dual-hosted git repository.
xiaoxiang pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/nuttx.git
The following commit(s) were added to refs/heads/master by this push:
new 0627b9970e binfmt: The program headers are optional.
0627b9970e is described below
commit 0627b9970e996f634fc172eba11f22659b3b9ac6
Author: wangjianyu3 <[email protected]>
AuthorDate: Mon Sep 4 16:55:35 2023 +0800
binfmt: The program headers are optional.
Fix problems mentioned in:
https://github.com/apache/nuttx/pull/10462
Brief:
rv-virt:knsh64, qemu-7.2.4
qemu-system-riscv64 -semihosting -nographic -cpu rv64 -smp 8 -M
virt,aclint=on -bios none -kernel nuttx
```
[ 0.006000] _assert: Current Version: NuttX 12.0.0 8a13da322d Sep 4
2023 14:31:15 risc-v
[ 0.006000] _assert: Assertion failed : at file: init/nx_bringup.c:302
task: Idle_Task 0x800017fc
```
Signed-off-by: wangjianyu3 <[email protected]>
---
binfmt/libelf/libelf_sections.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/binfmt/libelf/libelf_sections.c b/binfmt/libelf/libelf_sections.c
index 5de75a8855..f47f6daa85 100644
--- a/binfmt/libelf/libelf_sections.c
+++ b/binfmt/libelf/libelf_sections.c
@@ -188,8 +188,8 @@ int elf_loadphdrs(FAR struct elf_loadinfo_s *loadinfo)
if (loadinfo->ehdr.e_phnum < 1)
{
- berr("No programs(?)\n");
- return -EINVAL;
+ binfo("No programs(?)\n");
+ return 0;
}
/* Get the total size of the program header table */