casaroli commented on code in PR #19600:
URL: https://github.com/apache/nuttx/pull/19600#discussion_r3701831833


##########
binfmt/libnxflat/libnxflat_bind.c:
##########
@@ -60,6 +61,22 @@
 #  define nxflat_dumpbuffer(m,b,n)
 #endif
 
+/****************************************************************************
+ * Public Data
+ ****************************************************************************/
+
+/* The module ABI marker.  Every module built by tools/nxflat/mknxflat
+ * imports this, and a board's exported symbol table picks it up the same
+ * way it picks up any other imported name, so nothing has to special-case
+ * it in the build.  Its value is never used; only its presence matters.
+ *
+ * A module built against a newer ABI than the firmware therefore fails
+ * with "Exported symbol __nxflat_abi_vN not found", which names the
+ * problem, and a module built against an older one is caught below.
+ */
+
+void *NXFLAT_ABI_MARKER;

Review Comment:
   This is part of the mechanism within our reach (mknxflat, not in ldnxflat) 
that we can use to reject old (r10) nxflat modules instead of just loading them 
and jumping to wrong r9.
   
   Ideally this should be done with the magic, but it requires bringing 
ldnxflat here (which is GPL and full of licensing problems).



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to