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>