mirror of
https://github.com/apache/nuttx.git
synced 2026-10-01 03:16:24 +00:00
CONFIG_FDPIC teaches the ELF module path what an FDPIC object is, so an application built as a module gets -mfdpic -fPIC and the arm-uclinuxfdpiceabi linker. The loadable module path, which apps builds with DYNLIB = y and which apps/Library.mk uses for a shared library, was left as it was: a -r partial link with the stock linker. That leaves an object with no dynamic section, so the loader has nothing to bind an import to, and there is no way to build a library an FDPIC module can call. Give that path the same treatment. CMODULEFLAGS and CXXMODULEFLAGS gain the FDPIC compiler flags, and LDMODULEFLAGS links a shared object rather than a partial one. The entry point is left to the caller, because a module is entered at _start while a library is only ever called into. CXXMODULEFLAGS is also defined for the first time. apps/Library.mk compiles every C++ source of a shared library with it and no architecture defined it, so those sources were compiled with no architecture flags at all. Assisted-by: Claude Opus 5 (1M context) <noreply@anthropic.com> Signed-off-by: Marco Casaroli <marco.casaroli@gmail.com> |
||
|---|---|---|
| .. | ||
| include | ||
| src | ||
| CMakeLists.txt | ||
| Kconfig | ||