You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@nuttx.apache.org by GitBox <gi...@apache.org> on 2021/03/15 12:44:59 UTC

[GitHub] [incubator-nuttx] codebje opened a new pull request #3065: symtabs: remove leading underscores

codebje opened a new pull request #3065:
URL: https://github.com/apache/incubator-nuttx/pull/3065


   ## Summary
   
   Adds `CONFIG_SYMTAB_DECORATED` to control stripping leading underscores from symbols imported into relocatable objects.
   
   ## Impact
   
   Allows Elf objects compiled with toolchains that prepend an underscore to be relocated and loaded. With the configuration setting deselected (default is 'N') there is no change in behaviour.
   
   ## Testing
   
   eZ80 clang build launches an nsh Elf binary on boot. Other toolchains have not been tested.


----------------------------------------------------------------
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:
users@infra.apache.org



[GitHub] [incubator-nuttx] codebje commented on a change in pull request #3065: symtabs: remove leading underscores

Posted by GitBox <gi...@apache.org>.
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:
users@infra.apache.org



[GitHub] [incubator-nuttx] xiaoxiang781216 merged pull request #3065: symtabs: remove leading underscores and simplify lookups

Posted by GitBox <gi...@apache.org>.
xiaoxiang781216 merged pull request #3065:
URL: https://github.com/apache/incubator-nuttx/pull/3065


   


----------------------------------------------------------------
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:
users@infra.apache.org



[GitHub] [incubator-nuttx] xiaoxiang781216 commented on a change in pull request #3065: symtabs: remove leading underscores

Posted by GitBox <gi...@apache.org>.
xiaoxiang781216 commented on a change in pull request #3065:
URL: https://github.com/apache/incubator-nuttx/pull/3065#discussion_r594822726



##########
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:
       sounds good, thanks.




----------------------------------------------------------------
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:
users@infra.apache.org



[GitHub] [incubator-nuttx] xiaoxiang781216 commented on a change in pull request #3065: symtabs: remove leading underscores

Posted by GitBox <gi...@apache.org>.
xiaoxiang781216 commented on a change in pull request #3065:
URL: https://github.com/apache/incubator-nuttx/pull/3065#discussion_r594313483



##########
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:
       Should we move SYMTAB_ORDEREDBYNAME and SYMTAB_DECORATED to libs/libc/symtab/Kconfig? so both modlib and binfmt can use the same config.




----------------------------------------------------------------
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:
users@infra.apache.org