mirror of
https://github.com/apache/nuttx.git
synced 2026-08-05 06:10:27 +00:00
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> |
||
|---|---|---|
| .. | ||
| _extensions | ||
| _static | ||
| _templates | ||
| applications | ||
| components | ||
| contributing | ||
| debugging | ||
| faq | ||
| guides | ||
| implementation | ||
| introduction | ||
| logos | ||
| platforms | ||
| quickstart | ||
| reference | ||
| ReleaseNotes | ||
| standards | ||
| testing | ||
| .gitignore | ||
| conf.py | ||
| glossary.rst | ||
| index.rst | ||
| known-warnings.txt | ||
| legacy_README.md | ||
| make.bat | ||
| Makefile | ||
| Pipfile | ||
| Pipfile.lock | ||
| security.rst | ||
| substitutions.rst | ||