This is an automated email from the ASF dual-hosted git repository.

acassis pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/nuttx.git

commit 8b6495a68bcf1457689c15bd118e75caf3fc6a39
Author: Marco Casaroli <[email protected]>
AuthorDate: Tue Oct 20 00:03:29 2026 +0200

    Documentation: Describe the coverage of loadable modules.
    
    A loadable module of a flat or protected build can use the coverage of
    CONFIG_COVERAGE_ALL with CONFIG_COVERAGE_MINI and GCC, and its data
    goes away when the module is unloaded.  Say so, say how to keep the
    data, and say that the other runtimes do not export their functions.
    
    Assisted-by: Claude Code:claude-opus-5-5
    Signed-off-by: Marco Casaroli <[email protected]>
---
 Documentation/os/libs/libbuiltin.rst | 9 +++++++++
 1 file changed, 9 insertions(+)

diff --git a/Documentation/os/libs/libbuiltin.rst 
b/Documentation/os/libs/libbuiltin.rst
index 256e2dfdc51..0b46e574eba 100644
--- a/Documentation/os/libs/libbuiltin.rst
+++ b/Documentation/os/libs/libbuiltin.rst
@@ -44,6 +44,15 @@ to the one module you care about.  Data is written under
 ``CONFIG_COVERAGE_GCOV_DUMP_REBOOT`` dumps it on reboot.  From a shell it is
 ``gcov dump -d <path>``.
 
+A loadable module of a flat or protected build (an ELF program or a shared
+library) can use the coverage of ``CONFIG_COVERAGE_ALL`` with
+``CONFIG_COVERAGE_MINI`` and GCC.  The system symbol table exports the
+coverage functions to the module, and the loader removes the data of the
+module when it unloads the module.  The unload does not dump this data: dump
+it while the module is loaded, with ``gcov -d <path>`` or with a call to
+``__gcov_dump()`` in the module.  The other runtimes do not export their
+coverage functions, so build a module for them without the coverage options.
+
 Profiling
 =========
 

Reply via email to