diff --git a/configs/Kconfig b/configs/Kconfig index 78fb41ad774..e9ee04ffdc7 100644 --- a/configs/Kconfig +++ b/configs/Kconfig @@ -1725,6 +1725,13 @@ config BOARDCTL_RESET Architecture specific logic must provide the board_reset() interface. +config BOARDCTL_SYMTAB + bool "Enable symbol table interfaces" + default n + depends on EXECFUNCS_HAVE_SYMTAB + ---help--- + Enables support for the BOARDIOC_SYMTAB boardctl() command. + config BOARDCTL_TSCTEST bool "Enable touchscreen test interfaces" default n diff --git a/configs/boardctl.c b/configs/boardctl.c index 0f3de6d4be7..b058561c93a 100644 --- a/configs/boardctl.c +++ b/configs/boardctl.c @@ -45,7 +45,7 @@ #include #include -#include +#include #ifdef CONFIG_LIB_BOARDCTL @@ -130,22 +130,22 @@ int boardctl(unsigned int cmd, uintptr_t arg) break; #endif -#ifdef CONFIG_LIBC_SYMTAB +#ifdef CONFIG_BOARDCTL_SYMTAB /* CMD: BOARDIOC_SYMTAB * DESCRIPTION: Select a symbol table - * ARG: A pointer to an instance of struct symtab_desc_s - * (See include/nuttx/binfmt/canned_symtab.h). - * CONFIGURATION: CONFIG_LIBC_SYMTAB + * ARG: A pointer to an instance of struct boardioc_symtab_s + * CONFIGURATION: CONFIG_BOARDCTL_SYMTAB * DEPENDENCIES: None */ case BOARDIOC_SYMTAB: { - FAR const struct symtab_desc_s *symdesc = - (FAR const struct symtab_desc_s *)arg; + FAR const struct boardioc_symtab_s *symdesc = + (FAR const struct boardioc_symtab_s *)arg; DEBUGASSERT(symdesc != NULL); - ret = canned_symtab_select(symdesc); + exec_setsymtab(symdesc->symtab, symdesc->nsymbols); + ret = OK; } break; #endif