nuttx/Documentation
Marco Casaroli 6be9ba5d53 Documentation: Add a developer guide for FDPIC modules.
Documentation/components/fdpic.rst covers what someone building or loading an
FDPIC module needs: how the format works and what the loader does with it, how
it differs from NXFLAT and from the ELF loader's own PIC/XIP path, what the
target and toolchain have to provide, how to build a module, a shared library
and a C++ module, and what a firmware entry point must do to accept a module
callback.

The comparison is the part worth stating plainly, because two of the three
properties are shared.  All three formats run position-independent code from
flash with no MMU and give several instances of one module a shared .text with
private .data.  NXFLAT needs its own tools and cannot export symbols, so it
has no shared libraries.  ELF PIC needs no extra tools at all, but one base
register per task means a shared object is loaded as a single allocation --
its text cannot stay in flash -- and there is no DT_NEEDED walk.  FDPIC costs
an arm-uclinuxfdpiceabi linker and buys a pointer that carries its own data
base, which is what makes shared libraries and callbacks on a thread the
module never created possible.

The reference material at the end is the part that is expensive to
rediscover: the FDPIC marker being in EI_OSABI rather than e_flags, the three
relocation types that survive a static link, why both relocation tables are
bound eagerly, why .rofixup is skipped, and the two binfmt contract details
that fail as a panic or a bare -EINVAL.

Also adds the fdpic and reject sections to the xipfs test suite document, which
apps/testing/fs/xipfs grows in the matching apps change.

Assisted-by: Claude Code:claude-opus-5
Signed-off-by: Marco Casaroli <marco.casaroli@gmail.com>
2026-08-01 12:25:43 +02:00
..
_extensions
_static
_templates
applications Documentation: Add a developer guide for FDPIC modules. 2026-08-01 12:25:43 +02:00
components Documentation: Add a developer guide for FDPIC modules. 2026-08-01 12:25:43 +02:00
contributing !arch/stm32: move stm32l1 and finalize the directory split 2026-06-24 14:54:44 -03:00
debugging Documentation: Add documentation of SCHED_DUMP_TASKS and SCHED_DUMP_STACK 2026-06-09 08:04:54 -04:00
faq
guides arch/arm/src/stm32: unify pulse count driver into common/stm32 2026-07-12 09:35:51 +08:00
implementation Documentation: describe credential APIs and pseudo-fs ownership 2026-07-30 09:48:10 +08:00
introduction
logos
platforms arch/arm/rtl8721f: add GPIO character driver support 2026-07-31 08:49:23 +02:00
quickstart Documentation: fill in pass1 directory description in organization.rst 2026-07-06 10:18:42 -03:00
reference arch/avr/src/avrdx/avrdx_delay: add custom up_udelay function 2026-06-12 09:55:11 -04:00
ReleaseNotes Documentation: add NuttX 13.0.0 release notes 2026-06-25 19:50:07 +08:00
standards libc/unistd: add getgroups() 2026-06-24 14:55:11 -03:00
testing Documentation/testing: Document MemBrowse integration 2026-06-19 12:21:54 -03:00
.gitignore
conf.py Documentation: conf: Ignore .venv 2026-05-29 01:26:21 +08:00
glossary.rst
index.rst
known-warnings.txt
legacy_README.md
make.bat
Makefile
Pipfile
Pipfile.lock build(deps): bump starlette from 1.0.1 to 1.3.1 in /Documentation 2026-06-18 12:49:49 -04:00
security.rst
substitutions.rst