W-M-R commented on code in PR #14057:
URL: https://github.com/apache/nuttx/pull/14057#discussion_r1796481536


##########
libs/libc/misc/lib_utsname.c:
##########
@@ -47,6 +47,20 @@
 #include <nuttx/version.h>
 #include <unistd.h>
 
+/****************************************************************************
+ * Private Data
+ ****************************************************************************/
+
+static char g_sysname[] = "NuttX";
+static char g_machine[] = CONFIG_ARCH;
+static char g_release[] = CONFIG_VERSION_STRING;
+
+#if defined(__DATE__) && defined(__TIME__)
+static char g_version[] = CONFIG_VERSION_BUILD " " __DATE__ " " __TIME__;
+#else
+static char g_version[] = CONFIG_VERSION_BUILD;

Review Comment:
   These data do not want to be read-only, they need to exist in memory, so 
they need to be located in the data segment. For example, if we want to match 
which elf all exported memory files correspond to, we need to read out the 
version and other information from the memory



-- 
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