nuttx/libs/libc/elf
Marco Casaroli 1fe1cd4eaa libs/libc/elf: Read the symbol table at once for RELA relocations.
libelf_relocateadd() keeps a cache of CONFIG_LIBC_ELF_SYMBOL_CACHECOUNT
symbols in a list and reads each missing symbol from the file.  A large
module has many more relocations than symbols (one with 1.1 million
relocations against 82000 symbols took more than 30 minutes to load
from a 9P share), and most of that time is spent in single reads.

If there is memory for it, read the whole symbol table in one read and
resolve each symbol only once.  Otherwise use the cache as before.

Assisted-by: Claude Code:claude-opus-5-5
Signed-off-by: Marco Casaroli <marco.casaroli@gmail.com>
2026-10-10 02:09:57 +08: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: Read the symbol table at once for RELA relocations. 2026-10-10 02:09:57 +08: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: Lay out the PLT of an FDPIC module as the linker expects. 2026-10-07 11:45:09 -03:00
Kconfig
Make.defs
Makefile