nuttx/libs/libc
Marco Casaroli 4db7594eb6 libs/libc/elf: Read the dynamic relocations at their file offset.
DT_REL and DT_JMPREL hold the link-time address of their table, and the
loader read the table at that value as a file offset.  The two are equal
only when the segment that holds it starts at file offset 0.  An object
linked with its text at file offset 0x1000, as the tree's gnu-elf.ld does,
had its relocations read from padding, so none were applied and the
module called through unrelocated pointers.

Translate the address through the PT_LOAD headers first.

Assisted-by: Claude Code:claude-opus-5-5
Signed-off-by: Marco Casaroli <marco.casaroli@gmail.com>
2026-09-30 13:40:02 -03:00
..
aio
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: Read the dynamic relocations at their file offset. 2026-09-30 13:40:02 -03:00
errno
eventfd
fdt
fixedmath
gdbstub
gnssutils
grp
hex2bin
inttypes
libgen
locale
lzf
machine
misc libs/libc: Define the NXFLAT ABI marker in libc. 2026-09-28 16:45:48 -03:00
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