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-apps.git


The following commit(s) were added to refs/heads/master by this push:
     new 9587c6017 examples/nxflatxip: Update the header comment of the module.
9587c6017 is described below

commit 9587c60176081095800f9f742e828aa40ad23f1b
Author: Marco Casaroli <[email protected]>
AuthorDate: Sat Oct 17 20:42:51 2026 +0200

    examples/nxflatxip: Update the header comment of the module.
    
    The comment said that the module has no static data and no strings
    because of bugs in the ldnxflat in circulation, and that the firmware
    is entered with the data base in r10.  ldnxflat is now in the NuttX
    tree (tools/nxflat) without these bugs, and the PIC base register is
    r9.
    
    Assisted-by: Claude Code:claude-opus-5-5
    Signed-off-by: Marco Casaroli <[email protected]>
---
 examples/nxflatxip/module/xipmod.c | 23 +++++++----------------
 1 file changed, 7 insertions(+), 16 deletions(-)

diff --git a/examples/nxflatxip/module/xipmod.c 
b/examples/nxflatxip/module/xipmod.c
index 1c721acbd..d1504ecc4 100644
--- a/examples/nxflatxip/module/xipmod.c
+++ b/examples/nxflatxip/module/xipmod.c
@@ -31,22 +31,13 @@
  * is the same in both instances, and the module is executing from it rather
  * than from a copy in RAM.
  *
- * Two things this module deliberately does not have, both because of what
- * the ldnxflat in circulation does with them:
- *
- *   - No global or static variables.  Those are reached through the GOT,
- *     and the GOT entries come out pointing into the import table rather
- *     than into .bss, so the module overwrites the addresses of the
- *     functions it imports and jumps into nothing on its next call out.
- *   - No string constants.  With this linker script .rodata lives in the
- *     text segment and is reached PC-relatively, and the addend already
- *     in the instruction is dropped when that relocation is resolved, so
- *     the pointer lands somewhere in the middle of the code.
- *
- * Hence the reporting callback: the module passes numbers to the firmware
- * and the firmware, which has a working printf and a format string, does
- * the printing.  It also exercises the other direction of the interface --
- * firmware code entered with the module's data base still in r10.
+ * The module has no global or static variables and no string constants.
+ * The old out-of-tree ldnxflat pointed the GOT entries of .bss into the
+ * import table and dropped the addend of PC-relative .rodata references,
+ * so the module avoided both.  The ldnxflat in tools/nxflat handles them,
+ * but the module keeps the reporting callback: it passes numbers to the
+ * firmware, which has printf and the format string, and so it also
+ * exercises firmware code entered with the module's data base in r9.
  *
  ****************************************************************************/
 

Reply via email to