libs/libc: Add CONFIG_MODLIB_SYSTEM_SYMTAB to generate the symbol table for dlopen/insmod.
This commit is contained in:
parent
8e74365b96
commit
389ac36f20
|
@ -2,6 +2,7 @@
|
||||||
/Make_ubin.dep
|
/Make_ubin.dep
|
||||||
/Make_kbin.dep
|
/Make_kbin.dep
|
||||||
/exec_symtab.c
|
/exec_symtab.c
|
||||||
|
/modlib_symtab.c
|
||||||
/.depend
|
/.depend
|
||||||
/*.lib
|
/*.lib
|
||||||
|
|
||||||
|
|
|
@ -126,6 +126,17 @@ CSRCS += exec_symtab.c
|
||||||
|
|
||||||
endif
|
endif
|
||||||
|
|
||||||
|
ifeq ($(CONFIG_MODLIB_SYSTEM_SYMTAB),y)
|
||||||
|
|
||||||
|
modlib_symtab.c : $(CSVFILES) $(MKSYMTAB)
|
||||||
|
$(Q) cat $(CSVFILES) | LC_ALL=C sort >$@.csv
|
||||||
|
$(Q) $(MKSYMTAB) $@.csv $@ $(CONFIG_MODLIB_SYMTAB_ARRAY) $(CONFIG_MODLIB_NSYMBOLS_VAR)
|
||||||
|
$(Q) rm -f $@.csv
|
||||||
|
|
||||||
|
CSRCS += modlib_symtab.c
|
||||||
|
|
||||||
|
endif
|
||||||
|
|
||||||
# REVISIT: Backslash causes problems in $(COBJS) target
|
# REVISIT: Backslash causes problems in $(COBJS) target
|
||||||
DELIM := $(strip /)
|
DELIM := $(strip /)
|
||||||
BINDIR ?= bin
|
BINDIR ?= bin
|
||||||
|
|
|
@ -91,6 +91,10 @@ config MODLIB_NSYMBOLS_VAR
|
||||||
default "g_mod_nsymbols" if !EXECFUNCS_HAVE_SYMTAB
|
default "g_mod_nsymbols" if !EXECFUNCS_HAVE_SYMTAB
|
||||||
default EXECFUNCS_NSYMBOLS_VAR if EXECFUNCS_HAVE_SYMTAB
|
default EXECFUNCS_NSYMBOLS_VAR if EXECFUNCS_HAVE_SYMTAB
|
||||||
|
|
||||||
|
config MODLIB_SYSTEM_SYMTAB
|
||||||
|
bool "Generate the system symbol table"
|
||||||
|
default n
|
||||||
|
|
||||||
endif # MODLIB_HAVE_SYMTAB
|
endif # MODLIB_HAVE_SYMTAB
|
||||||
|
|
||||||
endmenu # Module library configuration
|
endmenu # Module library configuration
|
||||||
|
|
Loading…
Reference in New Issue