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> |
||
|---|---|---|
| .. | ||
| CMakeLists.txt | ||
| gnu-nxflat-gotoff.ld | ||
| gnu-nxflat-pcrel.ld | ||
| Kconfig | ||
| libnxflat.h | ||
| libnxflat_addrenv.c | ||
| libnxflat_bind.c | ||
| libnxflat_init.c | ||
| libnxflat_load.c | ||
| libnxflat_read.c | ||
| libnxflat_uninit.c | ||
| libnxflat_unload.c | ||
| libnxflat_verify.c | ||
| Make.defs | ||