raiden00pl opened a new pull request, #21481: URL: https://github.com/apache/nuttx/pull/21481
## Summary
Since #21436, `CONFIG_LIBC_MAX_EXITFUNS` defaults to 1 when `CONFIG_ELF`
and
`CONFIG_HAVE_CXX` are enabled, so `crt0.c` calls `atexit(exec_dtors)` in
every
ELF program. `libs/libc/libc.csv` does not list `atexit`, so with
`CONFIG_EXECFUNCS_SYSTEM_SYMTAB=y` the symbol cannot be resolved and every
`exec()`/`posix_spawn()` of a program fails with ENOENT.
Add `atexit` to `libc.csv`, under `CONFIG_LIBC_MAX_EXITFUNS > 0` (it is
not
built otherwise).
## Impact
Flat builds that load ELF programs through the system symbol table with
C++
initialization enabled can run programs again. No change with
`CONFIG_LIBC_MAX_EXITFUNS=0`.
## Testing
qemu-armv8a flat build, ELF programs loaded from a virtio 9P mount:
- master (6e1126a2362): `nsh: /mnt/v9fs/bin/elftl: command not found`, 6
ELF tests fail
- this PR: all ELF tests pass
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]
