nuttx/libs/libc/elf
Marco Casaroli ba1ae7947a libs/libc/elf: Find the symbols of a stripped shared object.
libelf_findsymtab() accepted only a SHT_SYMTAB section.  A shared object
that strip has processed has no SHT_SYMTAB: only its SHT_DYNSYM remains.
With CONFIG_DEBUG_SYMBOLS the application build strips each module in
bin/, so every FDPIC module that it builds fails to load with "No symbols
in ELF file".

Use the dynamic symbol table of a shared object when it has no other
symbol table.  It holds every symbol that the object imports or exports,
which is what the loader looks up.  An object with SHT_SYMTAB still uses
it.

Assisted-by: Claude Code:claude-opus-5-5
Signed-off-by: Marco Casaroli <marco.casaroli@gmail.com>
2026-10-07 11:45:09 -03:00
..
CMakeLists.txt cmake: Use NUTTX(_DIR/_BIN_DIR) instead CMAKE(_SRC_DIR/_BIN_DIR) 2026-08-09 11:13:08 -03:00
elf.h libs/libc/elf: Load the libraries a module names in DT_NEEDED. 2026-10-06 17:48:49 -03:00
elf_addrenv.c include/debug.h: Move to include/nuttx/debug.h 2026-04-07 07:50:06 -03:00
elf_bind.c libs/libc/elf: Load the libraries a module names in DT_NEEDED. 2026-10-06 17:48:49 -03:00
elf_depend.c libs/libc/elf: Load the libraries a module names in DT_NEEDED. 2026-10-06 17:48:49 -03:00
elf_gethandle.c include/debug.h: Move to include/nuttx/debug.h 2026-04-07 07:50:06 -03:00
elf_getsymbol.c include/debug.h: Move to include/nuttx/debug.h 2026-04-07 07:50:06 -03:00
elf_globals.S
elf_init.c include/debug.h: Move to include/nuttx/debug.h 2026-04-07 07:50:06 -03:00
elf_insert.c binfmt/elf: Load FDPIC modules through the ELF loader. 2026-09-26 11:13:30 -03:00
elf_iobuffer.c include/debug.h: Move to include/nuttx/debug.h 2026-04-07 07:50:06 -03:00
elf_load.c libs/libc/elf: Load an FDPIC object's data into the data heap. 2026-09-30 13:39:45 -03:00
elf_loadhdrs.c libs/libc/elf: Place an FDPIC object's segments independently. 2026-09-08 16:31:16 -03:00
elf_read.c include/debug.h: Move to include/nuttx/debug.h 2026-04-07 07:50:06 -03:00
elf_registry.c include/debug.h: Move to include/nuttx/debug.h 2026-04-07 07:50:06 -03:00
elf_remove.c libs/libc/elf: Load the libraries a module names in DT_NEEDED. 2026-10-06 17:48:49 -03:00
elf_sections.c include/debug.h: Move to include/nuttx/debug.h 2026-04-07 07:50:06 -03:00
elf_symbols.c libs/libc/elf: Find the symbols of a stripped shared object. 2026-10-07 11:45:09 -03:00
elf_symtab.c
elf_uninit.c include/debug.h: Move to include/nuttx/debug.h 2026-04-07 07:50:06 -03:00
elf_unload.c libs/libc/elf: Load an FDPIC object's data into the data heap. 2026-09-30 13:39:45 -03:00
elf_verify.c include/debug.h: Move to include/nuttx/debug.h 2026-04-07 07:50:06 -03:00
gnu-elf.ld.in libs/libc/elf: Link a kernel-build program the way the loader loads it. 2026-09-26 11:13:57 -03:00
Kconfig
Make.defs
Makefile