codebje commented on a change in pull request #3065:
URL: https://github.com/apache/incubator-nuttx/pull/3065#discussion_r594756394



##########
File path: binfmt/Kconfig
##########
@@ -75,3 +75,11 @@ config SYMTAB_ORDEREDBYNAME
                the logic can perform faster lookups using a binary search.
                Otherwise, the symbol table is assumed to be un-ordered and only
                slow, linear searches are supported.
+
+config SYMTAB_DECORATED

Review comment:
       Perhaps we should move the logic around `SYMTAB_ORDEREDBYNAME` into 
libs/libc/symtab as well. Both modlib and binfmt test this for all symbol 
lookups. modlib will assume all modules exported symbol tables are sorted if 
the define is set, as well as any symbol table set for the kernel.  
sched/module/mod_modsym.c always calls `symtab_findbyname()`, as does 
libs/libc/dlfcn/lib_dlsym.c - both of these should also benefit from an ordered 
symbol table assumption.
   
   I'd like to remove `symtab_findorderedbyname()` and instead have 
`symtab_findbyname()` conditionally perform a binary or linear search based on 
the Kconfig setting (which would be moved to libc). How does that sound?




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

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


Reply via email to