You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
examples/fdpicxip: Build the module fixtures without nuttx/tools/fdpic.
The modules this example and testing/fs/xipfs carry are built by an explicit
'make regen', which reached into nuttx/tools/fdpic for a makefile that builds
a module, a script that turns one into a header, and two more that checked
its imports. Review of apache/nuttx#19940 asked that NuttX not carry a
module build of its own, and it no longer does: with CONFIG_FDPIC an
ordinary FDPIC module is built by apps/Application.mk like any other.
These are not ordinary modules, which is why they keep a build of their own.
They are fixtures for loader edge cases: a library with a SONAME, a module
with more DT_NEEDED entries than the loader will follow, one whose imports
stay in the lazy binding table, and one naming a symbol the firmware does
not export, which exists to be refused. Application.mk cannot say any of
that. So the build stays, and it is here beside them rather than in NuttX.
It is also much smaller. The generic module makefile is gone: it existed to
be included by anything, and only this one directory ever did, so its dozen
useful lines are rules here. fdpic-embed.py is gone: xxd does that, as
examples/elf already does it, and the license header it also wrote is a
template beside it. fdpic-verify.sh and nuttx-exports.sh are gone with no
replacement; they checked at build time what the xipfs suite already asserts
at run time, for two hundred lines.
What the fixtures no longer carry is a crt0 and a linker script. Both come
from the tree named by NUTTX_DIR, which is where the in-tree module build
takes them, so a fixture is built the way a module is. The crt0 source is
compiled here rather than the built object taken, because these are
deliberately built for cortex-m3 while the firmware is not: a v7-M module
runs on both the v7-M and v8-M targets, so one set of headers serves the
RP2350 and mps2-an500 alike.
Regenerated qsorter, libshape and cxxuser against a tree configured with
CONFIG_FDPIC. qsorter is ARM FDPIC, v7-M, two PT_LOAD segments, entering at
_start; libshape carries its SONAME and its DT_INIT_ARRAY.
The committed headers are left as they are. They will change when they are
next regenerated, because a fixture now carries the tree's crt0 rather than
one of its own, and that is a change the xipfs suite should be run against
rather than made blind.
Signed-off-by: Marco Casaroli <marco.casaroli@gmail.com>
0 commit comments