Skip to content

Commit 27846ff

Browse files
anchaolupyuen
authored andcommitted
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 <[email protected]>
1 parent 69cb2e8 commit 27846ff

File tree

6 files changed

+14
-14
lines changed

6 files changed

+14
-14
lines changed

benchmarks/fio/Kconfig

+1-1
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@
66
config BENCHMARK_FIO
77
tristate "Flexible I/O Tester"
88
default n
9-
depends on LIBC_MODLIB && LIBC_DLFCN
9+
depends on LIBC_ELF && LIBC_DLFCN
1010
---help---
1111
https://github.com/axboe/fio Fio spawns a number of threads or processes
1212
doing a particular type of I/O action as specified by the user.

examples/module/chardev/chardev.c

+1-1
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,7 @@
3535
#include <debug.h>
3636

3737
#include <nuttx/module.h>
38-
#include <nuttx/lib/modlib.h>
38+
#include <nuttx/lib/elf.h>
3939
#include <nuttx/fs/fs.h>
4040

4141
/****************************************************************************

examples/sotest/main/sotest_main.c

+4-4
Original file line numberDiff line numberDiff line change
@@ -107,7 +107,7 @@ int main(int argc, FAR char *argv[])
107107
#ifdef CONFIG_EXAMPLES_SOTEST_BUILTINFS
108108
char devname[32];
109109
#endif
110-
#if CONFIG_MODLIB_MAXDEPEND > 0
110+
#if CONFIG_LIBC_ELF_MAXDEPEND > 0
111111
FAR void *handle1;
112112
#endif
113113
FAR void *handle2;
@@ -170,7 +170,7 @@ int main(int argc, FAR char *argv[])
170170
}
171171
#endif /* CONFIG_EXAMPLES_SOTEST_BUILTINFS */
172172

173-
#if CONFIG_MODLIB_MAXDEPEND > 0
173+
#if CONFIG_LIBC_ELF_MAXDEPEND > 0
174174
/* Install the first test shared library. The first shared library only
175175
* verifies that symbols exported by one shared library can be used to
176176
* resolve undefined symbols in a second shared library.
@@ -253,7 +253,7 @@ int main(int argc, FAR char *argv[])
253253

254254
testfunc(msg);
255255

256-
#if CONFIG_MODLIB_MAXDEPEND > 0
256+
#if CONFIG_LIBC_ELF_MAXDEPEND > 0
257257
/* This should fail because the second shared library depends on
258258
* the first.
259259
*/
@@ -276,7 +276,7 @@ int main(int argc, FAR char *argv[])
276276
exit(EXIT_FAILURE);
277277
}
278278

279-
#if CONFIG_MODLIB_MAXDEPEND > 0
279+
#if CONFIG_LIBC_ELF_MAXDEPEND > 0
280280
/* Now we should be able to close the first shared library. */
281281

282282
ret = dlclose(handle1);

examples/sotest/modprint/modprint.c

+1-1
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,7 @@
3232
#include <syslog.h>
3333

3434
#include <nuttx/symtab.h>
35-
#include <nuttx/lib/modlib.h>
35+
#include <nuttx/lib/elf.h>
3636

3737
/****************************************************************************
3838
* Private Functions

examples/sotest/sotest/sotest.c

+3-3
Original file line numberDiff line numberDiff line change
@@ -32,13 +32,13 @@
3232
#include <syslog.h>
3333

3434
#include <nuttx/symtab.h>
35-
#include <nuttx/lib/modlib.h>
35+
#include <nuttx/lib/elf.h>
3636

3737
/****************************************************************************
3838
* Public Function Prototypes
3939
****************************************************************************/
4040

41-
#if CONFIG_MODLIB_MAXDEPEND > 0
41+
#if CONFIG_LIBC_ELF_MAXDEPEND > 0
4242
void modprint(FAR const char *fmt, ...) printf_like(1, 2);
4343
#endif
4444

@@ -62,7 +62,7 @@ visibility_default const char g_msg3[] = "Yes, don't be a stranger!";
6262
* Name: modprint
6363
****************************************************************************/
6464

65-
#if CONFIG_MODLIB_MAXDEPEND < 1
65+
#if CONFIG_LIBC_ELF_MAXDEPEND < 1
6666
static void modprint(FAR const char *fmt, ...)
6767
{
6868
va_list ap;

tools/mksymtab.sh

+4-4
Original file line numberDiff line numberDiff line change
@@ -116,8 +116,8 @@ if [ -z "$prefix" ]; then
116116
echo "const struct symtab_s CONFIG_EXECFUNCS_SYMTAB_ARRAY[] = "
117117
echo "#elif defined(CONFIG_NSH_SYMTAB)"
118118
echo "const struct symtab_s CONFIG_NSH_SYMTAB_ARRAYNAME[] = "
119-
echo "#elif defined(CONFIG_MODLIB_HAVE_SYMTAB)"
120-
echo "const struct symtab_s CONFIG_MODLIB_SYMTAB_ARRAY[] = "
119+
echo "#elif defined(CONFIG_LIBC_ELF_HAVE_SYMTAB)"
120+
echo "const struct symtab_s CONFIG_LIBC_ELF_SYMTAB_ARRAY[] = "
121121
echo "#else"
122122
echo "const struct symtab_s dummy_symtab[] = "
123123
echo "#endif"
@@ -138,8 +138,8 @@ if [ -z "$prefix" ]; then
138138
echo "const int CONFIG_EXECFUNCS_NSYMBOLS_VAR = sizeof(CONFIG_EXECFUNCS_SYMTAB_ARRAY) / sizeof(struct symtab_s);"
139139
echo "#elif defined(CONFIG_NSH_SYMTAB)"
140140
echo "const int CONFIG_NSH_SYMTAB_COUNTNAME = sizeof(CONFIG_NSH_SYMTAB_ARRAYNAME) / sizeof(struct symtab_s);"
141-
echo "#elif defined(CONFIG_MODLIB_HAVE_SYMTAB)"
142-
echo "const int CONFIG_MODLIB_NSYMBOLS_VAR = sizeof(CONFIG_MODLIB_SYMTAB_ARRAY) / sizeof(struct symtab_s);"
141+
echo "#elif defined(CONFIG_LIBC_ELF_HAVE_SYMTAB)"
142+
echo "const int CONFIG_LIBC_ELF_NSYMBOLS_VAR = sizeof(CONFIG_LIBC_ELF_SYMTAB_ARRAY) / sizeof(struct symtab_s);"
143143
echo "#else"
144144
echo "const int dummy_nsymtabs = sizeof(dummy_symtab) / sizeof(struct symtab_s);"
145145
echo "#endif"

0 commit comments

Comments
 (0)