libs/symtab: move symtab/ to libs/symtab. Let's no clutter up the top level directory. Shorten CONFIG_EXECFUNCS_GENERATE_SYSTEM_SYSTAB to just CONFIG_EXECFUNCS_SYSTEM_SYMTAB. Some items in syscall/syscall.csv are only valid when CONFIG_LIB_SYSCALL is defined. That is always defined when really building the syatem calls, but causes errors in libs/symtab because they are not valid in the normal, FLAT build context.

This commit is contained in:
Gregory Nutt 2019-08-25 19:28:04 -06:00
parent da9433a4c7
commit 65aabe3048
9 changed files with 15 additions and 14 deletions

View File

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

View File

@ -1,5 +1,5 @@
############################################################################
# symtab/Makefile
# libs/symtab/Makefile
#
# Copyright (C) 2019 Gregory Nutt. All rights reserved.
# Author: Gregory Nutt <gnutt@nuttx.org>
@ -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

View File

@ -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","..."

Can't render this file because it has a wrong number of fields in line 2.

View File

@ -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)

View File

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

View File

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

View File

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

View File

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