diff --git a/libs/libc/unistd/Kconfig b/libs/libc/unistd/Kconfig index ff38e789474..d77d3835668 100644 --- a/libs/libc/unistd/Kconfig +++ b/libs/libc/unistd/Kconfig @@ -54,6 +54,7 @@ config EXECFUNCS_HAVE_SYMTAB from your application initialization logic. if EXECFUNCS_HAVE_SYMTAB + config EXECFUNCS_SYMTAB_ARRAY string "Symbol table name used by exec[l|v]" default "g_symtab" @@ -76,7 +77,7 @@ config EXECFUNCS_NSYMBOLS_VAR symbols in that table. This selection provides the name of an 'int' variable that contains the number of symbols in the symbol table. -config EXECFUNCS_GENERATE_SYSTEM_SYMTAB +config EXECFUNCS_SYSTEM_SYMTAB bool "Generate and include system symbol table" default n ---help--- @@ -89,6 +90,7 @@ config EXECFUNCS_GENERATE_SYSTEM_SYMTAB number of exported symbols g_nsymbols. It matches expected defaults from entries above. But they can be changed and generated symbol table can be used as template by application. + endif # EXECFUNCS_HAVE_SYMTAB endif # LIBC_EXECFUNCS diff --git a/symtab/.gitignore b/libs/symtab/.gitignore similarity index 100% rename from symtab/.gitignore rename to libs/symtab/.gitignore diff --git a/symtab/Makefile b/libs/symtab/Makefile similarity index 97% rename from symtab/Makefile rename to libs/symtab/Makefile index 7a7fcd79d41..83723ccbabf 100644 --- a/symtab/Makefile +++ b/libs/symtab/Makefile @@ -1,5 +1,5 @@ ############################################################################ -# symtab/Makefile +# libs/symtab/Makefile # # Copyright (C) 2019 Gregory Nutt. All rights reserved. # Author: Gregory Nutt @@ -59,7 +59,7 @@ SYMTAB_CSRCS = BIN = libsymtab$(LIBEXT) -ifeq ($(CONFIG_EXECFUNCS_GENERATE_SYSTEM_SYMTAB),y) +ifeq ($(CONFIG_EXECFUNCS_SYSTEM_SYMTAB),y) all: symtab.c $(BIN) .PHONY: all @@ -104,4 +104,3 @@ distclean: clean $(call DELFILE, tmp.csv) -include Make.dep - diff --git a/syscall/syscall.csv b/syscall/syscall.csv index 418056b0e81..199e98682b7 100644 --- a/syscall/syscall.csv +++ b/syscall/syscall.csv @@ -63,7 +63,7 @@ "mq_timedreceive","mqueue.h","!defined(CONFIG_DISABLE_MQUEUE)","ssize_t","mqd_t","char*","size_t","FAR unsigned int*","const struct timespec*" "mq_timedsend","mqueue.h","!defined(CONFIG_DISABLE_MQUEUE)","int","mqd_t","const char*","size_t","unsigned int","const struct timespec*" "mq_unlink","mqueue.h","!defined(CONFIG_DISABLE_MQUEUE)","int","const char*" -"nx_task_spawn","nuttx/spawn.h","!defined(CONFIG_BUILD_KERNEL)","int","FAR const struct spawn_syscall_parms_s *" +"nx_task_spawn","nuttx/spawn.h","!defined(CONFIG_BUILD_KERNEL) && defined(CONFIG_LIB_SYSCALL)","int","FAR const struct spawn_syscall_parms_s *" "nx_vsyslog","nuttx/syslog/syslog.h","","int","int","FAR const IPTR char*","FAR va_list*" "on_exit","stdlib.h","defined(CONFIG_SCHED_ONEXIT)","int","CODE void (*)(int, FAR void *)","FAR void *" "open","fcntl.h","","int","const char*","int","..." diff --git a/tools/Directories.mk b/tools/Directories.mk index 2afec5151b6..33d9af92051 100644 --- a/tools/Directories.mk +++ b/tools/Directories.mk @@ -85,10 +85,10 @@ CONTEXTDIRS = boards $(APPDIR) USERDIRS = OTHERDIRS = pass1 -ifeq ($(CONFIG_EXECFUNCS_GENERATE_SYSTEM_SYMTAB),y) -USERDIRS += symtab +ifeq ($(CONFIG_EXECFUNCS_SYSTEM_SYMTAB),y) +USERDIRS += libs$(DELIM)symtab else -OTHERDIRS += symtab +OTHERDIRS += libs$(DELIM)symtab endif ifeq ($(CONFIG_BUILD_PROTECTED),y) diff --git a/tools/FlatLibs.mk b/tools/FlatLibs.mk index 783dbbf4fbe..9dbead2d5f1 100644 --- a/tools/FlatLibs.mk +++ b/tools/FlatLibs.mk @@ -144,7 +144,7 @@ endif # Add symbol table library -ifeq ($(CONFIG_EXECFUNCS_GENERATE_SYSTEM_SYMTAB),y) +ifeq ($(CONFIG_EXECFUNCS_SYSTEM_SYMTAB),y) NUTTXLIBS += staging$(DELIM)libsymtab$(LIBEXT) endif diff --git a/tools/KernelLibs.mk b/tools/KernelLibs.mk index 3ae86a987cf..0793fb4854a 100644 --- a/tools/KernelLibs.mk +++ b/tools/KernelLibs.mk @@ -138,7 +138,7 @@ endif # Add symbol table library -ifeq ($(CONFIG_EXECFUNCS_GENERATE_SYSTEM_SYMTAB),y) +ifeq ($(CONFIG_EXECFUNCS_SYSTEM_SYMTAB),y) NUTTXLIBS += staging$(DELIM)libsymtab$(LIBEXT) endif diff --git a/tools/LibTargets.mk b/tools/LibTargets.mk index 1a656d94cb4..97878238bda 100644 --- a/tools/LibTargets.mk +++ b/tools/LibTargets.mk @@ -200,10 +200,10 @@ syscall$(DELIM)libproxies$(LIBEXT): context staging$(DELIM)libproxies$(LIBEXT): syscall$(DELIM)libproxies$(LIBEXT) $(Q) $(call INSTALL_LIB,$<,$@) -symtab$(DELIM)libsymtab$(LIBEXT): context - $(Q) $(MAKE) -C symtab TOPDIR="$(TOPDIR)" libsymtab$(LIBEXT) KERNEL=n +libs$(DELIM)symtab$(DELIM)libsymtab$(LIBEXT): context + $(Q) $(MAKE) -C libs$(DELIM)symtab TOPDIR="$(TOPDIR)" libsymtab$(LIBEXT) KERNEL=n -staging$(DELIM)libsymtab$(LIBEXT): symtab$(DELIM)libsymtab$(LIBEXT) +staging$(DELIM)libsymtab$(LIBEXT): libs$(DELIM)symtab$(DELIM)libsymtab$(LIBEXT) $(Q) $(call INSTALL_LIB,$<,$@) # Possible non-kernel builds diff --git a/tools/ProtectedLibs.mk b/tools/ProtectedLibs.mk index 4adb31b1ec0..79e5aa6631a 100644 --- a/tools/ProtectedLibs.mk +++ b/tools/ProtectedLibs.mk @@ -145,7 +145,7 @@ endif # Add symbol table library -ifeq ($(CONFIG_EXECFUNCS_GENERATE_SYSTEM_SYMTAB),y) +ifeq ($(CONFIG_EXECFUNCS_SYSTEM_SYMTAB),y) NUTTXLIBS += staging$(DELIM)libsymtab$(LIBEXT) endif