diff --git a/examples/README.txt b/examples/README.txt index 7e7935e46..304dc53ce 100644 --- a/examples/README.txt +++ b/examples/README.txt @@ -1465,14 +1465,14 @@ examples/posix_spawn Requires: - CONFIG_BINFMT_DISABLE=n - Don't disable the binary loader - CONFIG_ELF=y - Enable ELF binary loader - CONFIG_LIBC_EXECFUNCS=y - Enable support for posix_spawn - CONFIG_EXECFUNCS_SYMTAB="g_exports" - The name of the symbol table - created by the test. - CONFIG_EXECFUNCS_NSYMBOLS=10 - Value does not matter, it will be - corrected at runtime. - CONFIG_POSIX_SPAWN_STACKSIZE=768 - This default setting. + CONFIG_BINFMT_DISABLE=n - Don't disable the binary loader + CONFIG_ELF=y - Enable ELF binary loader + CONFIG_LIBC_EXECFUNCS=y - Enable support for posix_spawn + CONFIG_EXECFUNCS_SYMTAB="g_spawn_exports" - The name of the symbol table + created by the test. + CONFIG_EXECFUNCS_NSYMBOLS=10 - Value does not matter, it will be + corrected at runtime. + CONFIG_POSIX_SPAWN_STACKSIZE=768 - This default setting. Test-specific configuration options: diff --git a/examples/elf/elf_main.c b/examples/elf/elf_main.c index 9c4c0b75f..f6f68a06f 100644 --- a/examples/elf/elf_main.c +++ b/examples/elf/elf_main.c @@ -164,8 +164,8 @@ static char fullpath[128]; * Symbols from Auto-Generated Code ****************************************************************************/ -extern const struct symtab_s g_exports[]; -extern const int g_nexports; +extern const struct symtab_s g_elf_exports[]; +extern const int g_elf_nexports; /**************************************************************************** * Private Functions @@ -343,7 +343,7 @@ int elf_main(int argc, char *argv[]) */ args[0] = NULL; - ret = exec(filename, args, g_exports, g_nexports); + ret = exec(filename, args, g_elf_exports, g_elf_nexports); mm_update(&g_mmstep, "after exec"); diff --git a/examples/elf/tests/mksymtab.sh b/examples/elf/tests/mksymtab.sh index b0c3ca133..20e090864 100755 --- a/examples/elf/tests/mksymtab.sh +++ b/examples/elf/tests/mksymtab.sh @@ -38,7 +38,7 @@ for var in $varlist; do done echo "" -echo "const struct symtab_s g_exports[] = " +echo "const struct symtab_s g_elf_exports[] = " echo "{" for var in $varlist; do @@ -47,5 +47,5 @@ done echo "};" echo "" -echo "const int g_nexports = sizeof(g_exports) / sizeof(struct symtab_s);" +echo "const int g_elf_nexports = sizeof(g_elf_exports) / sizeof(struct symtab_s);" diff --git a/examples/nxflat/nxflat_main.c b/examples/nxflat/nxflat_main.c index c559e82ef..d2fa4631a 100644 --- a/examples/nxflat/nxflat_main.c +++ b/examples/nxflat/nxflat_main.c @@ -233,7 +233,7 @@ int nxflat_main(int argc, char *argv[]) */ args[0] = NULL; - ret = exec(filename, args, g_exports, NEXPORTS); + ret = exec(filename, args, g_nxflat_exports, NEXPORTS); if (ret < 0) { errmsg("ERROR: exec(%s) failed: %d\n", dirlist[i], errno); diff --git a/examples/nxflat/tests/mksymtab.sh b/examples/nxflat/tests/mksymtab.sh index b539c0d29..3221e0283 100755 --- a/examples/nxflat/tests/mksymtab.sh +++ b/examples/nxflat/tests/mksymtab.sh @@ -24,7 +24,7 @@ echo "#define __EXAMPLES_NXFLAT_TESTS_SYMTAB_H" echo "" echo "#include " echo "" -echo "static const struct symtab_s g_exports[] = " +echo "static const struct symtab_s g_nxflat_exports[] = " echo "{" for string in $varlist; do @@ -33,7 +33,7 @@ for string in $varlist; do done echo "};" -echo "#define NEXPORTS (sizeof(g_exports)/sizeof(struct symtab_s))" +echo "#define NEXPORTS (sizeof(g_nxflat_exports)/sizeof(struct symtab_s))" echo "" echo "#endif /* __EXAMPLES_NXFLAT_TESTS_SYMTAB_H */" diff --git a/examples/posix_spawn/filesystem/mksymtab.sh b/examples/posix_spawn/filesystem/mksymtab.sh index b0c3ca133..7382398bf 100755 --- a/examples/posix_spawn/filesystem/mksymtab.sh +++ b/examples/posix_spawn/filesystem/mksymtab.sh @@ -38,7 +38,7 @@ for var in $varlist; do done echo "" -echo "const struct symtab_s g_exports[] = " +echo "const struct symtab_s g_spawn_exports[] = " echo "{" for var in $varlist; do @@ -47,5 +47,5 @@ done echo "};" echo "" -echo "const int g_nexports = sizeof(g_exports) / sizeof(struct symtab_s);" +echo "const int g_spawn_nexports = sizeof(g_spawn_exports) / sizeof(struct symtab_s);" diff --git a/examples/posix_spawn/spawn_main.c b/examples/posix_spawn/spawn_main.c index 48a88d1dd..91c60a057 100644 --- a/examples/posix_spawn/spawn_main.c +++ b/examples/posix_spawn/spawn_main.c @@ -160,8 +160,8 @@ static char * const g_argv[4] = * Symbols from Auto-Generated Code ****************************************************************************/ -extern const struct symtab_s g_exports[]; -extern const int g_nexports; +extern const struct symtab_s g_spawn_exports[]; +extern const int g_spawn_nexports; /**************************************************************************** * Private Functions @@ -300,8 +300,8 @@ int spawn_main(int argc, char *argv[]) /* Make sure that we are using our symbol tablee */ - symdesc.symtab = (FAR struct symtab_s *)g_exports; /* Discard 'const' */ - symdesc.nsymbols = g_nexports; + symdesc.symtab = (FAR struct symtab_s *)g_spawn_exports; /* Discard 'const' */ + symdesc.nsymbols = g_spawn_nexports; (void)boardctl(BOARDIOC_APP_SYMTAB, (uintptr_t)&symdesc); /************************************************************************* diff --git a/examples/sotest/lib/modprint/modprint.c b/examples/sotest/lib/modprint/modprint.c index 92447c709..0b375638d 100644 --- a/examples/sotest/lib/modprint/modprint.c +++ b/examples/sotest/lib/modprint/modprint.c @@ -57,7 +57,7 @@ static void modprint(FAR const char *fmt, ...); * Private Data ****************************************************************************/ -static const struct symtab_s g_exports[1] = +static const struct symtab_s g_modprint_exports[1] = { { (FAR const char *)"modprint", (FAR const void *)modprint, @@ -109,7 +109,7 @@ int module_initialize(FAR struct mod_info_s *modinfo) modinfo->uninitializer = module_uninitialize; modinfo->arg = NULL; - modinfo->exports = g_exports; + modinfo->exports = g_modprint_exports; modinfo->nexports = 1; return OK; diff --git a/examples/sotest/lib/sotest/sotest.c b/examples/sotest/lib/sotest/sotest.c index 6172b5129..308bab13e 100644 --- a/examples/sotest/lib/sotest/sotest.c +++ b/examples/sotest/lib/sotest/sotest.c @@ -72,7 +72,7 @@ static const char g_msg1[] = "Hello to you too!"; static const char g_msg2[] = "Not so bad so far."; static const char g_msg3[] = "Yes, don't be a stranger!"; -static const struct symtab_s g_exports[6] = +static const struct symtab_s g_sotest_exports[6] = { { (FAR const char *)"testfunc1", (FAR const void *)testfunc1, @@ -171,7 +171,7 @@ int module_initialize(FAR struct mod_info_s *modinfo) modinfo->uninitializer = module_uninitialize; modinfo->arg = NULL; - modinfo->exports = g_exports; + modinfo->exports = g_sotest_exports; modinfo->nexports = 6; return OK; diff --git a/examples/thttpd/content/mksymtab.sh b/examples/thttpd/content/mksymtab.sh index fc5af268e..91074e28e 100755 --- a/examples/thttpd/content/mksymtab.sh +++ b/examples/thttpd/content/mksymtab.sh @@ -24,7 +24,7 @@ echo "#define __EXAMPLES_NXFLAT_TESTS_SYMTAB_H" echo "" echo "#include " echo "" -echo "static const struct symtab_s g_exports[] = " +echo "static const struct symtab_s g_thttpd_exports[] = " echo "{" for string in $varlist; do @@ -33,7 +33,7 @@ for string in $varlist; do done echo "};" -echo "#define NEXPORTS (sizeof(g_exports)/sizeof(struct symtab_s))" +echo "#define NEXPORTS (sizeof(g_thttpd_exports)/sizeof(struct symtab_s))" echo "" echo "#endif /* __EXAMPLES_NXFLAT_TESTS_SYMTAB_H */" diff --git a/examples/thttpd/thttpd_main.c b/examples/thttpd/thttpd_main.c index 8b2ede52e..01c6c7344 100644 --- a/examples/thttpd/thttpd_main.c +++ b/examples/thttpd/thttpd_main.c @@ -338,7 +338,7 @@ int thttp_main(int argc, char *argv[]) /* Start THTTPD. At present, symbol table info is passed via global variables */ #ifdef CONFIG_THTTPD_NXFLAT - g_thttpdsymtab = g_exports; + g_thttpdsymtab = g_thttpd_exports; g_thttpdnsymbols = NEXPORTS; #endif