pkarashchenko commented on a change in pull request #5696:
URL: https://github.com/apache/incubator-nuttx/pull/5696#discussion_r822065333
##########
File path: libs/libc/symtab/symtab_allsyms.c
##########
@@ -58,13 +58,16 @@ allsyms_lookup(FAR const char *name, FAR void *value,
symbol = symtab_findbyvalue(g_allsyms, value, g_nallsyms);
}
- if (symbol && symbol != &g_allsyms[g_nallsyms - 1])
+ if (size)
Review comment:
yeah. you see.. this is confusing. I just expanded review and looked
into the prototype. when I was writing a comment I assumed that `size` was
checked for non zero value, but it actually is a pointer. haha :)
##########
File path: arch/sim/src/sim/up_head.c
##########
@@ -52,6 +53,43 @@ char **g_argv;
static char g_logbuffer[4096];
#endif
+/****************************************************************************
+ * Private Functions
+ ****************************************************************************/
+
+/****************************************************************************
+ * Name: allsyms_relocate
+ *
+ * Description:
+ * Simple relocate to redirect the address from symbol table.
+ *
+ ****************************************************************************/
+
+#ifdef CONFIG_ALLSYMS
+static void allsyms_relocate(void)
+{
+ extern struct symtab_s g_allsyms[1];
+ extern int g_nallsyms;
Review comment:
can we move externs out of `allsyms_relocate`?
Also `extern struct symtab_s g_allsyms[];` should work better than `[1]`
from warnings point of view perspective.
--
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]