Correct more improper global variable naming: All must begin with g_
This commit is contained in:
parent
7c1082bfcc
commit
e778a6990d
@ -1465,14 +1465,14 @@ examples/posix_spawn
|
|||||||
|
|
||||||
Requires:
|
Requires:
|
||||||
|
|
||||||
CONFIG_BINFMT_DISABLE=n - Don't disable the binary loader
|
CONFIG_BINFMT_DISABLE=n - Don't disable the binary loader
|
||||||
CONFIG_ELF=y - Enable ELF binary loader
|
CONFIG_ELF=y - Enable ELF binary loader
|
||||||
CONFIG_LIBC_EXECFUNCS=y - Enable support for posix_spawn
|
CONFIG_LIBC_EXECFUNCS=y - Enable support for posix_spawn
|
||||||
CONFIG_EXECFUNCS_SYMTAB="exports" - The name of the symbol table
|
CONFIG_EXECFUNCS_SYMTAB="g_exports" - The name of the symbol table
|
||||||
created by the test.
|
created by the test.
|
||||||
CONFIG_EXECFUNCS_NSYMBOLS=10 - Value does not matter, it will be
|
CONFIG_EXECFUNCS_NSYMBOLS=10 - Value does not matter, it will be
|
||||||
corrected at runtime.
|
corrected at runtime.
|
||||||
CONFIG_POSIX_SPAWN_STACKSIZE=768 - This default setting.
|
CONFIG_POSIX_SPAWN_STACKSIZE=768 - This default setting.
|
||||||
|
|
||||||
Test-specific configuration options:
|
Test-specific configuration options:
|
||||||
|
|
||||||
|
@ -30,6 +30,14 @@ config EXAMPLES_NSH_SYMTAB
|
|||||||
and g_nexports holds the number of entries in the application symbol
|
and g_nexports holds the number of entries in the application symbol
|
||||||
table.
|
table.
|
||||||
|
|
||||||
|
This is done very early in the NSH initialization sequence.
|
||||||
|
|
||||||
|
Why might you want to do this? There is really only one reason: You
|
||||||
|
would like to have the symbol tables in place early so that programs
|
||||||
|
started by NSH, perhaps via an initialization script, will have all
|
||||||
|
of the necessary symbols in place. Otherwise, you probably do *not*
|
||||||
|
want this option!
|
||||||
|
|
||||||
config EXAMPLES_NSH_PROGNAME
|
config EXAMPLES_NSH_PROGNAME
|
||||||
string "Program name"
|
string "Program name"
|
||||||
default "nsh"
|
default "nsh"
|
||||||
|
@ -233,7 +233,7 @@ int nxflat_main(int argc, char *argv[])
|
|||||||
*/
|
*/
|
||||||
|
|
||||||
args[0] = NULL;
|
args[0] = NULL;
|
||||||
ret = exec(filename, args, exports, NEXPORTS);
|
ret = exec(filename, args, g_exports, NEXPORTS);
|
||||||
if (ret < 0)
|
if (ret < 0)
|
||||||
{
|
{
|
||||||
errmsg("ERROR: exec(%s) failed: %d\n", dirlist[i], errno);
|
errmsg("ERROR: exec(%s) failed: %d\n", dirlist[i], errno);
|
||||||
|
@ -24,7 +24,7 @@ echo "#define __EXAMPLES_NXFLAT_TESTS_SYMTAB_H"
|
|||||||
echo ""
|
echo ""
|
||||||
echo "#include <nuttx/binfmt/symtab.h>"
|
echo "#include <nuttx/binfmt/symtab.h>"
|
||||||
echo ""
|
echo ""
|
||||||
echo "static const struct symtab_s exports[] = "
|
echo "static const struct symtab_s g_exports[] = "
|
||||||
echo "{"
|
echo "{"
|
||||||
|
|
||||||
for string in $varlist; do
|
for string in $varlist; do
|
||||||
@ -33,7 +33,7 @@ for string in $varlist; do
|
|||||||
done
|
done
|
||||||
|
|
||||||
echo "};"
|
echo "};"
|
||||||
echo "#define NEXPORTS (sizeof(exports)/sizeof(struct symtab_s))"
|
echo "#define NEXPORTS (sizeof(g_exports)/sizeof(struct symtab_s))"
|
||||||
echo ""
|
echo ""
|
||||||
echo "#endif /* __EXAMPLES_NXFLAT_TESTS_SYMTAB_H */"
|
echo "#endif /* __EXAMPLES_NXFLAT_TESTS_SYMTAB_H */"
|
||||||
|
|
||||||
|
@ -24,7 +24,7 @@ echo "#define __EXAMPLES_NXFLAT_TESTS_SYMTAB_H"
|
|||||||
echo ""
|
echo ""
|
||||||
echo "#include <nuttx/binfmt/symtab.h>"
|
echo "#include <nuttx/binfmt/symtab.h>"
|
||||||
echo ""
|
echo ""
|
||||||
echo "static const struct symtab_s exports[] = "
|
echo "static const struct symtab_s g_exports[] = "
|
||||||
echo "{"
|
echo "{"
|
||||||
|
|
||||||
for string in $varlist; do
|
for string in $varlist; do
|
||||||
@ -33,7 +33,7 @@ for string in $varlist; do
|
|||||||
done
|
done
|
||||||
|
|
||||||
echo "};"
|
echo "};"
|
||||||
echo "#define NEXPORTS (sizeof(exports)/sizeof(struct symtab_s))"
|
echo "#define NEXPORTS (sizeof(g_exports)/sizeof(struct symtab_s))"
|
||||||
echo ""
|
echo ""
|
||||||
echo "#endif /* __EXAMPLES_NXFLAT_TESTS_SYMTAB_H */"
|
echo "#endif /* __EXAMPLES_NXFLAT_TESTS_SYMTAB_H */"
|
||||||
|
|
||||||
|
@ -338,7 +338,7 @@ int thttp_main(int argc, char *argv[])
|
|||||||
/* Start THTTPD. At present, symbol table info is passed via global variables */
|
/* Start THTTPD. At present, symbol table info is passed via global variables */
|
||||||
|
|
||||||
#ifdef CONFIG_THTTPD_NXFLAT
|
#ifdef CONFIG_THTTPD_NXFLAT
|
||||||
g_thttpdsymtab = exports;
|
g_thttpdsymtab = g_exports;
|
||||||
g_thttpdnsymbols = NEXPORTS;
|
g_thttpdnsymbols = NEXPORTS;
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user