nuttx/libs/libc
Marco Casaroli 08c0cce0d9 libs/libc: Define the NXFLAT ABI marker in libc.
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>
2026-09-28 16:45:48 -03:00
..
aio libc/aio: loop in aio_suspend() until a listed request completes 2026-09-14 17:12:49 -03:00
assert
audio
builtin
ctype
dirent libs/libc/dirent: Add a blank line after a declaration. 2026-09-25 10:46:48 -03:00
dlfcn
elf libs/libc/elf: Link a kernel-build program the way the loader loads it. 2026-09-26 11:13:57 -03:00
errno
eventfd
fdt
fixedmath
gdbstub
gnssutils
grp
hex2bin
inttypes
libgen
locale
lzf
machine libs/libc/machine/arm: Relocate FDPIC function descriptors. 2026-09-13 16:03:32 -03:00
misc libs/libc: Define the NXFLAT ABI marker in libc. 2026-09-28 16:45:48 -03:00
net
netdb
obstack
pthread libc, sched: Resolve FDPIC descriptors at module callback entry points. 2026-09-25 10:46:48 -03:00
pwd
queue
regex
sched
search
semaphore sched/semaphore: Correct the return value comment of nxsem_init/nxmutex_init 2026-09-25 10:37:43 +02:00
signal
spawn
stdio libc/stdio: allocate a buffer in getdelim() when *lineptr is NULL 2026-09-23 12:52:09 +08:00
stdlib libc, sched: Resolve FDPIC descriptors at module callback entry points. 2026-09-25 10:46:48 -03:00
stream
string libs/libc/string: Copy and compare by words when pointers agree on alignment. 2026-08-24 12:02:02 +08:00
symtab
syslog
termios
time
tls
uio
unistd fs/aio: add configurable AIO_LISTIO_MAX limit 2026-09-14 17:12:49 -03:00
userfs
uuid
wchar
wctype
wqueue libc/wqueue: use the uninterruptible wait helper 2026-09-04 23:02:48 +08:00
zoneinfo
.gitignore
CMakeLists.txt
Kconfig
libc.csv sched/pthread: Implement pthread_sigqueue 2026-09-21 14:53:26 +08:00
libc.h libs/libc/string: Copy and compare by words when pointers agree on alignment. 2026-08-24 12:02:02 +08:00
limits_check.c
Makefile