mirror of
https://github.com/apache/nuttx.git
synced 2026-10-04 04:38:10 +00:00
Every NXFLAT module imports __nxflat_abi_v2, and the loader resolves it against the symbol table exec() is given, like any other import. It was defined in binfmt/libnxflat, which is enough for a flat build, where the firmware and the applications are one image. In a protected build the table comes from the application, in the user image, which cannot see a kernel symbol: the user image fails to link with an undefined reference to __nxflat_abi_v2 as soon as an application generates its table from the modules' imports, as examples/nxflat does. A kernel build is the same, with one image per process. libc is linked into each of those images, so the marker is defined there now. Nothing else changes: its value is still never used. On mps3-an547:knsh under QEMU with CONFIG_NXFLAT and examples/nxflat, the user image links, and errno, hello, mutex, pthread and struct run. lm3s6965-ek:qemu-nxflat still runs every module to the end. Assisted-by: Claude Code:claude-opus-5-5 Signed-off-by: Marco Casaroli <marco.casaroli@gmail.com> |
||
|---|---|---|
| .. | ||
| libbuiltin | ||
| libc | ||
| libdsp | ||
| libm | ||
| libnx | ||
| libxx | ||
| CMakeLists.txt | ||