Having a symbol table is an option. There are no symbol tables with CONFIG_BUILD_KERNEL, for example.

This commit is contained in:
Gregory Nutt 2014-09-12 12:48:22 -06:00
parent 282fe4aa10
commit 8f30804e05
4 changed files with 20 additions and 0 deletions

View File

@ -409,6 +409,7 @@ CONFIG_LIB_RAND_ORDER=1
# CONFIG_EOL_IS_BOTH_CRLF is not set
CONFIG_EOL_IS_EITHER_CRLF=y
CONFIG_LIBC_EXECFUNCS=y
CONFIG_EXECFUNCS_HAVE_SYMTAB=y
CONFIG_EXECFUNCS_SYMTAB="g_symtab"
CONFIG_EXECFUNCS_NSYMBOLS=0
CONFIG_POSIX_SPAWN_PROXY_STACKSIZE=1024

View File

@ -609,6 +609,7 @@ CONFIG_LIB_RAND_ORDER=1
# CONFIG_EOL_IS_BOTH_CRLF is not set
CONFIG_EOL_IS_EITHER_CRLF=y
CONFIG_LIBC_EXECFUNCS=y
CONFIG_EXECFUNCS_HAVE_SYMTAB=y
CONFIG_EXECFUNCS_SYMTAB="exports"
CONFIG_EXECFUNCS_NSYMBOLS=10
CONFIG_POSIX_SPAWN_PROXY_STACKSIZE=1024

View File

@ -107,6 +107,16 @@ config LIBC_EXECFUNCS
if LIBC_EXECFUNCS
config EXECFUNCS_HAVE_SYMTAB
bool "Have symbol table"
default n if BUILD_KERNEL
default y if !BUILD_KERNEL
---help---
If you have a system symbol table, then you must select this
option in order to use it. Symbol tables are required in most
cases in order to like executable programs to the base code.
if EXECFUNCS_HAVE_SYMTAB
config EXECFUNCS_SYMTAB
string "Symbol table used by exec[l|v]"
default "g_symtab"
@ -129,6 +139,7 @@ config EXECFUNCS_NSYMBOLS
symbols in that table. This selection provides the number of
symbols in the symbol table.
endif # EXECFUNCS_HAVE_SYMTAB
endif # LIBC_EXECFUNCS
config POSIX_SPAWN_PROXY_STACKSIZE

View File

@ -69,14 +69,21 @@
* Public Variables
****************************************************************************/
#ifdef CONFIG_EXECFUNCS_HAVE_SYMTAB
extern const struct symtab_s CONFIG_EXECFUNCS_SYMTAB;
#endif
/****************************************************************************
* Private Data
****************************************************************************/
#ifdef CONFIG_EXECFUNCS_HAVE_SYMTAB
static FAR const struct symtab_s *g_exec_symtab = &CONFIG_EXECFUNCS_SYMTAB;
static int g_exec_nsymbols = CONFIG_EXECFUNCS_NSYMBOLS;
#else
static FAR const struct symtab_s *g_exec_symtab;
static int g_exec_nsymbols;
#endif
/****************************************************************************
* Public Functions