mirror of
https://github.com/apache/nuttx-apps.git
synced 2026-08-03 21:29:05 +00:00
libc/elf: rename modlib to libelf
Renaming "modlib" to "libelf" is more in line with the implementation content, which makes it easier for individual developers to understand the capabilities of this module. CONFIG_LIBC_MODLIB -> CONFIG_LIBC_ELF Signed-off-by: chao an <anchao.archer@bytedance.com>
This commit is contained in:
parent
69cb2e89e9
commit
27846ffec7
6 changed files with 14 additions and 14 deletions
|
|
@ -6,7 +6,7 @@
|
|||
config BENCHMARK_FIO
|
||||
tristate "Flexible I/O Tester"
|
||||
default n
|
||||
depends on LIBC_MODLIB && LIBC_DLFCN
|
||||
depends on LIBC_ELF && LIBC_DLFCN
|
||||
---help---
|
||||
https://github.com/axboe/fio Fio spawns a number of threads or processes
|
||||
doing a particular type of I/O action as specified by the user.
|
||||
|
|
|
|||
|
|
@ -35,7 +35,7 @@
|
|||
#include <debug.h>
|
||||
|
||||
#include <nuttx/module.h>
|
||||
#include <nuttx/lib/modlib.h>
|
||||
#include <nuttx/lib/elf.h>
|
||||
#include <nuttx/fs/fs.h>
|
||||
|
||||
/****************************************************************************
|
||||
|
|
|
|||
|
|
@ -107,7 +107,7 @@ int main(int argc, FAR char *argv[])
|
|||
#ifdef CONFIG_EXAMPLES_SOTEST_BUILTINFS
|
||||
char devname[32];
|
||||
#endif
|
||||
#if CONFIG_MODLIB_MAXDEPEND > 0
|
||||
#if CONFIG_LIBC_ELF_MAXDEPEND > 0
|
||||
FAR void *handle1;
|
||||
#endif
|
||||
FAR void *handle2;
|
||||
|
|
@ -170,7 +170,7 @@ int main(int argc, FAR char *argv[])
|
|||
}
|
||||
#endif /* CONFIG_EXAMPLES_SOTEST_BUILTINFS */
|
||||
|
||||
#if CONFIG_MODLIB_MAXDEPEND > 0
|
||||
#if CONFIG_LIBC_ELF_MAXDEPEND > 0
|
||||
/* Install the first test shared library. The first shared library only
|
||||
* verifies that symbols exported by one shared library can be used to
|
||||
* resolve undefined symbols in a second shared library.
|
||||
|
|
@ -253,7 +253,7 @@ int main(int argc, FAR char *argv[])
|
|||
|
||||
testfunc(msg);
|
||||
|
||||
#if CONFIG_MODLIB_MAXDEPEND > 0
|
||||
#if CONFIG_LIBC_ELF_MAXDEPEND > 0
|
||||
/* This should fail because the second shared library depends on
|
||||
* the first.
|
||||
*/
|
||||
|
|
@ -276,7 +276,7 @@ int main(int argc, FAR char *argv[])
|
|||
exit(EXIT_FAILURE);
|
||||
}
|
||||
|
||||
#if CONFIG_MODLIB_MAXDEPEND > 0
|
||||
#if CONFIG_LIBC_ELF_MAXDEPEND > 0
|
||||
/* Now we should be able to close the first shared library. */
|
||||
|
||||
ret = dlclose(handle1);
|
||||
|
|
|
|||
|
|
@ -32,7 +32,7 @@
|
|||
#include <syslog.h>
|
||||
|
||||
#include <nuttx/symtab.h>
|
||||
#include <nuttx/lib/modlib.h>
|
||||
#include <nuttx/lib/elf.h>
|
||||
|
||||
/****************************************************************************
|
||||
* Private Functions
|
||||
|
|
|
|||
|
|
@ -32,13 +32,13 @@
|
|||
#include <syslog.h>
|
||||
|
||||
#include <nuttx/symtab.h>
|
||||
#include <nuttx/lib/modlib.h>
|
||||
#include <nuttx/lib/elf.h>
|
||||
|
||||
/****************************************************************************
|
||||
* Public Function Prototypes
|
||||
****************************************************************************/
|
||||
|
||||
#if CONFIG_MODLIB_MAXDEPEND > 0
|
||||
#if CONFIG_LIBC_ELF_MAXDEPEND > 0
|
||||
void modprint(FAR const char *fmt, ...) printf_like(1, 2);
|
||||
#endif
|
||||
|
||||
|
|
@ -62,7 +62,7 @@ visibility_default const char g_msg3[] = "Yes, don't be a stranger!";
|
|||
* Name: modprint
|
||||
****************************************************************************/
|
||||
|
||||
#if CONFIG_MODLIB_MAXDEPEND < 1
|
||||
#if CONFIG_LIBC_ELF_MAXDEPEND < 1
|
||||
static void modprint(FAR const char *fmt, ...)
|
||||
{
|
||||
va_list ap;
|
||||
|
|
|
|||
|
|
@ -116,8 +116,8 @@ if [ -z "$prefix" ]; then
|
|||
echo "const struct symtab_s CONFIG_EXECFUNCS_SYMTAB_ARRAY[] = "
|
||||
echo "#elif defined(CONFIG_NSH_SYMTAB)"
|
||||
echo "const struct symtab_s CONFIG_NSH_SYMTAB_ARRAYNAME[] = "
|
||||
echo "#elif defined(CONFIG_MODLIB_HAVE_SYMTAB)"
|
||||
echo "const struct symtab_s CONFIG_MODLIB_SYMTAB_ARRAY[] = "
|
||||
echo "#elif defined(CONFIG_LIBC_ELF_HAVE_SYMTAB)"
|
||||
echo "const struct symtab_s CONFIG_LIBC_ELF_SYMTAB_ARRAY[] = "
|
||||
echo "#else"
|
||||
echo "const struct symtab_s dummy_symtab[] = "
|
||||
echo "#endif"
|
||||
|
|
@ -138,8 +138,8 @@ if [ -z "$prefix" ]; then
|
|||
echo "const int CONFIG_EXECFUNCS_NSYMBOLS_VAR = sizeof(CONFIG_EXECFUNCS_SYMTAB_ARRAY) / sizeof(struct symtab_s);"
|
||||
echo "#elif defined(CONFIG_NSH_SYMTAB)"
|
||||
echo "const int CONFIG_NSH_SYMTAB_COUNTNAME = sizeof(CONFIG_NSH_SYMTAB_ARRAYNAME) / sizeof(struct symtab_s);"
|
||||
echo "#elif defined(CONFIG_MODLIB_HAVE_SYMTAB)"
|
||||
echo "const int CONFIG_MODLIB_NSYMBOLS_VAR = sizeof(CONFIG_MODLIB_SYMTAB_ARRAY) / sizeof(struct symtab_s);"
|
||||
echo "#elif defined(CONFIG_LIBC_ELF_HAVE_SYMTAB)"
|
||||
echo "const int CONFIG_LIBC_ELF_NSYMBOLS_VAR = sizeof(CONFIG_LIBC_ELF_SYMTAB_ARRAY) / sizeof(struct symtab_s);"
|
||||
echo "#else"
|
||||
echo "const int dummy_nsymtabs = sizeof(dummy_symtab) / sizeof(struct symtab_s);"
|
||||
echo "#endif"
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue