hitHuang commented on code in PR #19593:
URL: https://github.com/apache/nuttx/pull/19593#discussion_r3695850806


##########
libs/libc/symtab/symtab_allsyms.c:
##########
@@ -31,6 +31,8 @@
  * Public Data
  ****************************************************************************/
 
+#if defined(CONFIG_BUILD_FLAT) || defined(__KERNEL__)

Review Comment:
   I tried moving it after seeing your comment, and it made sense in theory. 
But then I realized lib_libvsprintf.c also calls allsyms_findbyvalue() for %pS, 
and that file has to stay in libc. So moving the code doesn't really remove the 
guard — it just pushes it into a big unrelated file, which feels messy.
   
   Keeping the guard in symtab_allsyms.c itself seems like the least messy 
option. As a bonus, it leaves a stub in user space: if we ever want to add 
user-side symbol lookup later, %pS should just work without touching anything 
else.
   
   Happy to go another way if you see something cleaner!



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