[libc] Add dl features in KConfig.

This commit is contained in:
Bernard Xiong 2018-04-25 23:26:20 +08:00
parent 3c31567f14
commit cdd12b7930
3 changed files with 38 additions and 32 deletions

View File

@ -27,6 +27,12 @@ if RT_USING_LIBC && RT_USING_DFS
bool "Enable AIO"
default n
endif
if RT_USING_MODULE
config RT_USING_LIBDL
bool "Enable dlopen/dlsym/dlclose feature"
default n
endif
endif
config HAVE_SYS_SIGNALS

View File

@ -16,3 +16,4 @@ void *dlsym(void *handle, const char *symbol);
int dlclose (void *handle);
#endif

View File

@ -16,7 +16,7 @@
#include <rtm.h>
#include <string.h>
#define MODULE_ROOT_DIR "/module/lib"
#define MODULE_ROOT_DIR "/modules"
void* dlopen(const char *filename, int flags)
{
@ -53,6 +53,5 @@ void* dlopen(const char *filename, int flags)
return (void*)module;
}
RTM_EXPORT(dlopen)
RTM_EXPORT(dlopen);