nuttx/tools
Marco Casaroli 295f0e373c tools/nxflat: Leave ARM unwind tables out of an NXFLAT module.
CONFIG_UNWINDER_ARM compiles everything with -funwind-tables, modules
included, so each module carries .ARM.exidx and .ARM.extab.  The NXFLAT
link scripts do not name them, and ldnxflat placed them in D-Space, where
the first R_ARM_PREL31 entry stopped the conversion:

  ldnxflat: arm relocation 42 at D-Space 00000018 is not handled

That relocation cannot be handled: an exidx entry is an offset from itself
to a function in I-Space, and the distance between the two segments is only
known when the loader places them.  Nothing unwinds through a module
either, since the unwinder only reads the firmware's own table.

So ldnxflat leaves both sections out of the images, and with them the
relocations against them, as it already does for sections it does not
place.  A module without unwind tables converts exactly as before.

On mps3-an547:nsh under QEMU with CONFIG_UNWINDER_ARM and examples/nxflat,
the modules failed to convert; now they convert and errno, hello, mutex,
pthread and struct run.  The eleven modules of tools/nxflat/testsuite.sh
convert to the same bytes as before.

Assisted-by: Claude Code:claude-opus-5-5
Signed-off-by: Marco Casaroli <marco.casaroli@gmail.com>
2026-09-28 16:45:09 -03:00
..
ameba
bcm2711
bl602
ci tools/ci: Build the NXFLAT configurations that convert a module. 2026-09-27 11:25:12 -03:00
codeowners
cxd56
esp32
esp32c3
esp32s2
esp32s3
espressif
imx9
imxrt1180 tools/imxrt1180: Add a standalone C program for simple AHAB container creation 2026-09-19 22:38:45 +08:00
licensing tools: escape Python string backslashes 2026-08-21 20:07:26 +08:00
lwl
mpfs
nix
nxflat tools/nxflat: Leave ARM unwind tables out of an NXFLAT module. 2026-09-28 16:45:09 -03:00
pic32
pynuttx tools/pynuttx: Update the preemption field annotations. 2026-09-07 21:06:53 +08:00
rp23xx
rp2040
simwifi
zds
.gitignore tools/nxflat: Add an Apache-licensed NXFLAT converter. 2026-09-27 11:25:12 -03:00
aarch64-unknown-nuttx-macho.json
aarch64-unknown-nuttx.json
abi_check.py
b16.c
bdf-converter.c
board_romfs_mkpasswd.sh sched,fs,docs: support setuid sudo helper 2026-08-18 15:57:52 +08:00
btdecode.sh
build-globals.sh
callstack.py
cfgdefine.c
cfgdefine.h
cfgparser.c
cfgparser.h
check_passwd_keys.sh
checkkconfig.py
checkpatch.sh
checkrelease.sh
CMakeLists.txt
cmpconfig.c
cnvwindeps.c
Config.mk tools: pass TOPDIR in SDIR_template and MAKE_template 2026-09-17 13:49:05 +08:00
configure.bat
configure.c
configure.sh
configure_completion.bash
convert-comments.c
copydir.bat
copydir.sh
coredump.py
csvparser.c
csvparser.h
D.defs
define.bat
define.sh
detab.c
Directories.mk
discover.py
doreleasenotes.py
Export.mk
find_symbol_callers.sh
flash_writer.py
FlatLibs.mk
gcov.py
gdbserver.py
gen_passwd_keys.sh
gencromfs.c
host_info_dump.py
host_info_parse.py
i486-unknown-nuttx.json
ide_exporter.py tools: escape Python string backslashes 2026-08-21 20:07:26 +08:00
incdir.bat
incdir.c
incdir.sh
indent.sh
initialconfig.c
jlink-nuttx.c
kasan_global.py
kconfig.bat
kconfig2html.c tools: kconfig2html: Explain blank-line guard 2026-08-21 20:08:18 +08:00
KernelLibs.mk
LibTargets.mk
link.bat
link.sh
lowhex.c
macar-qcs.sh
Make.defs
Makefile.host tools/nxflat: Add an Apache-licensed NXFLAT converter. 2026-09-27 11:25:12 -03:00
merge_config.py
mkallsyms.py
mkallsyms.sh
mkconfig.c
mkconfigvars.sh
mkctags.sh
mkdeps.c
mkexport.sh
mkfsdata.pl
mkfsdata.py
mknulldeps.sh
mkpasswd.c
mkromfsimg.sh
mksymtab.c
mksyscall.c
mkversion.c
mkwindeps.sh
netusb.sh
noteinfo.c
nxstyle.c tools/nxstyle: allow the OpenGL and TinyGL identifier prefixes 2026-09-25 18:18:10 +08:00
nxstyle_sweep.sh
nxtagspkgsfetch.sh
parsecallstack.py
parsememdump.py
parsetrace.py
passwd_keys.mk
pre-commit
process_config.py
process_config.sh
promptpasswd.sh
ProtectedLibs.mk
refresh.sh tools/refresh.sh: Fix multi-argument parsing 2026-09-10 16:26:53 +02:00
rmcr.c
Rust.defs
sethost.sh
showsize.sh
simbridge.sh
simhostroute.sh
simlaunch.sh
size_report.py
splashscreen_converter.py
stackusage.py
stm32_pinmap_tool.py
Swift.defs
testbuild.ps1
testbuild.sh
toolchain.cmake.export tools/export: prefix each linker script in toolchain.cmake. 2026-09-01 17:41:42 +08:00
uncrustify.cfg
Unix.mk tools/nxflat: Add an Apache-licensed NXFLAT converter. 2026-09-27 11:25:12 -03:00
unlink.bat
unlink.sh
update_romfs_password.sh sched,fs,docs: support setuid sudo helper 2026-08-18 15:57:52 +08:00
version.sh
Win.mk
x86_64-unknown-nuttx-macho.json
x86_64-unknown-nuttx.json
xmlrpc_test.py
Zig.defs
zipme.sh