mirror of
https://github.com/apache/nuttx.git
synced 2026-10-10 15:50:23 +00:00
gnu-elf.ld.in named neither .rel.plt nor .got.plt, and the linker placed them where its FDPIC code does not expect them. It merged .rel.plt into .rel.dyn but still set DT_JMPREL as if .rel.plt came last, so the loader bound each PLT slot with the symbol of another relocation. And .got.plt came after .got: the offsets that the linker gave the local function descriptors did not match where it put them, and the first call through one jumped into data. A module without a PLT has neither section, so neither problem showed until a module called its imports through a PLT. Give .rel.dyn and .rel.plt output sections of their own, and put .got.plt first in .got, both as in the linker's own script. Only CONFIG_FDPIC changes. Assisted-by: Claude Code:claude-opus-5-5 Signed-off-by: Marco Casaroli <marco.casaroli@gmail.com> |
||
|---|---|---|
| .. | ||
| aio | ||
| assert | ||
| audio | ||
| builtin | ||
| ctype | ||
| dirent | ||
| dlfcn | ||
| elf | ||
| errno | ||
| eventfd | ||
| fdt | ||
| fixedmath | ||
| gdbstub | ||
| gnssutils | ||
| grp | ||
| hex2bin | ||
| inttypes | ||
| libgen | ||
| locale | ||
| lzf | ||
| machine | ||
| misc | ||
| net | ||
| netdb | ||
| obstack | ||
| pthread | ||
| pwd | ||
| queue | ||
| regex | ||
| sched | ||
| search | ||
| semaphore | ||
| signal | ||
| spawn | ||
| stdio | ||
| stdlib | ||
| stream | ||
| string | ||
| symtab | ||
| syslog | ||
| termios | ||
| time | ||
| tls | ||
| uio | ||
| unistd | ||
| userfs | ||
| uuid | ||
| wchar | ||
| wctype | ||
| wqueue | ||
| zoneinfo | ||
| .gitignore | ||
| CMakeLists.txt | ||
| Kconfig | ||
| libc.csv | ||
| libc.h | ||
| limits_check.c | ||
| Makefile | ||