xiaoxiang781216 commented on code in PR #19600:
URL: https://github.com/apache/nuttx/pull/19600#discussion_r3701189067
##########
tools/nxflat/thunk_thumb2.c:
##########
@@ -33,13 +33,21 @@
#include "nxflat_thunk.h"
-/* The format strings are file-scope statics inside the .def, so each
+/* The format strings have file scope inside the .def, so each
* architecture gets its own translation unit and the two sets cannot
- * collide. The .def is byte-for-byte the upstream file.
+ * collide. The .def is the upstream file, less one comment typo.
*/
#include "dyncall_skeleton_thumb2.def"
+/****************************************************************************
+ * Private Functions
+ ****************************************************************************/
+
+/* None: this translation unit exists only to give one architecture's
Review Comment:
move to previous patch
##########
tools/Unix.mk:
##########
@@ -286,6 +286,9 @@ tools/cnvwindeps$(HOSTEXEEXT):
tools/mkpasswd$(HOSTEXEEXT):
$(Q) $(MAKE) -C tools -f Makefile.host mkpasswd$(HOSTEXEEXT)
+tools/mknxflat$(HOSTEXEEXT):
Review Comment:
move to the first patch
##########
boards/hc/m9s12/demo9s12ne64/scripts/Make.defs:
##########
@@ -54,7 +54,7 @@ ARCHCFLAGS = -fno-common
ARCHCXXFLAGS = -fno-common -fno-exceptions -fcheck-new
ARCHWARNINGS = -Wall -Wstrict-prototypes -Wshadow -Wundef
ARCHWARNINGSXX = -Wall -Wshadow -Wundef
-ARCHPICFLAGS = -fpic -msingle-pic-base -mpic-register=r10
+ARCHPICFLAGS = -fpic -msingle-pic-base
Review Comment:
remove ALL ARCHPICFLAGS under boards folder and move to arch's Toolchain.defs
##########
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:
why need
##########
boards/arm/tiva/eagle100/scripts/Make.defs:
##########
@@ -31,7 +31,6 @@ CXXFLAGS := $(ARCHCXXFLAGS) $(ARCHOPTIMIZATION)
$(ARCHCPUFLAGS) $(ARCHXXINCLUDES
CPPFLAGS := $(ARCHINCLUDES) $(ARCHDEFINES) $(EXTRAFLAGS)
AFLAGS := $(CFLAGS) -D__ASSEMBLY__
-MKNXFLAT = mknxflat
LDNXFLAT = ldnxflat
Review Comment:
remove too in ALL places
##########
boards/arm/cxd56xx/spresense/scripts/Make.defs:
##########
@@ -35,7 +35,6 @@ endif
ARCHSCRIPT += $(BOARD_DIR)$(DELIM)scripts$(DELIM)$(LDSCRIPT)
-MKNXFLAT = mknxflat
LDNXFLAT = ldnxflat
Review Comment:
remove too
##########
boards/arm/am67/t3-gem-o1/scripts/Make.defs:
##########
@@ -27,7 +27,7 @@ include $(TOPDIR)/arch/arm/src/armv7-r/Toolchain.defs
LDSCRIPT = sdram.ld
ARCHSCRIPT += $(BOARD_DIR)$(DELIM)scripts$(DELIM)$(LDSCRIPT)
-ARCHPICFLAGS = -fpic -msingle-pic-base -mpic-register=r10 -ffixed-r10
+ARCHPICFLAGS = -fpic -msingle-pic-base -mpic-register=r9 -ffixed-r9
Review Comment:
remove, use arch's definition
--
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]