summaryrefslogtreecommitdiff
path: root/components/libdl
diff options
context:
space:
mode:
authorBernard Xiong <[email protected]>2016-05-10 09:22:01 +0800
committerBernard Xiong <[email protected]>2016-05-10 09:22:01 +0800
commit64feef0dde9d8353ffe4a3f257ab17848ccf6f53 (patch)
treedd3f096b8a3c249e5327cc34a0c105c5125099e1 /components/libdl
parenteb320a0104bbaa6c1235fe899b6d099fdabe8c25 (diff)
[LIBC] mv pthreads/libdl to libc and rename dfs_lwip to dfs_net
Diffstat (limited to 'components/libdl')
-rw-r--r--components/libdl/SConscript9
-rw-r--r--components/libdl/dlclose.c36
-rw-r--r--components/libdl/dlerror.c24
-rw-r--r--components/libdl/dlfcn.h18
-rw-r--r--components/libdl/dlopen.c55
-rw-r--r--components/libdl/dlsym.c37
6 files changed, 0 insertions, 179 deletions
diff --git a/components/libdl/SConscript b/components/libdl/SConscript
deleted file mode 100644
index 4b16063eb3..0000000000
--- a/components/libdl/SConscript
+++ /dev/null
@@ -1,9 +0,0 @@
-Import('RTT_ROOT')
-Import('rtconfig')
-from building import *
-
-src = Glob('*.c')
-CPPPATH = [RTT_ROOT + '/components/libdl']
-group = DefineGroup('libdl', src, depend = ['RT_USING_MODULE', 'RT_USING_LIBDL'], CPPPATH = CPPPATH)
-
-Return('group')
diff --git a/components/libdl/dlclose.c b/components/libdl/dlclose.c
deleted file mode 100644
index af070891fc..0000000000
--- a/components/libdl/dlclose.c
+++ /dev/null
@@ -1,36 +0,0 @@
-/*
- * File : dlclose.c
- * This file is part of RT-Thread RTOS
- * COPYRIGHT (C) 2006 - 2010, RT-Thread Development Team
- *
- * The license and distribution terms for this file may be
- * found in the file LICENSE in this distribution or at
- * http://www.rt-thread.org/license/LICENSE
- *
- * Change Logs:
- * Date Author Notes
- * 2010-11-17 yi.qiu first version
- */
-
-#include <rtthread.h>
-#include <rtm.h>
-
-int dlclose (void *handle)
-{
- rt_module_t module;
-
- RT_ASSERT(handle != RT_NULL);
-
- module = (rt_module_t)handle;
- module->nref--;
-
- if(module->nref <= 0)
- {
- rt_module_unload(module);
- }
-
- return RT_TRUE;
-}
-
-RTM_EXPORT(dlclose)
-
diff --git a/components/libdl/dlerror.c b/components/libdl/dlerror.c
deleted file mode 100644
index dd076412fe..0000000000
--- a/components/libdl/dlerror.c
+++ /dev/null
@@ -1,24 +0,0 @@
-/*
- * File : dlerror.c
- * This file is part of RT-Thread RTOS
- * COPYRIGHT (C) 2006 - 2010, RT-Thread Development Team
- *
- * The license and distribution terms for this file may be
- * found in the file LICENSE in this distribution or at
- * http://www.rt-thread.org/license/LICENSE
- *
- * Change Logs:
- * Date Author Notes
- * 2010-11-17 yi.qiu first version
- */
-
-#include <rtthread.h>
-#include <rtm.h>
-
-const char *dlerror(void)
-{
- return "TODO";
-}
-
-RTM_EXPORT(dlerror)
-
diff --git a/components/libdl/dlfcn.h b/components/libdl/dlfcn.h
deleted file mode 100644
index 069f0d9c46..0000000000
--- a/components/libdl/dlfcn.h
+++ /dev/null
@@ -1,18 +0,0 @@
-#ifndef __DLFCN_H_
-#define __DLFCN_H_
-
-#define RTLD_LAZY 0x00000
-#define RTLD_NOW 0x00001
-
-#define RTLD_LOCAL 0x00000
-#define RTLD_GLOBAL 0x10000
-
-#define RTLD_DEFAULT ((void*)1)
-#define RTLD_NEXT ((void*)2)
-
-void *dlopen (const char *filename, int flag);
-const char *dlerror(void);
-void *dlsym(void *handle, const char *symbol);
-int dlclose (void *handle);
-
-#endif
diff --git a/components/libdl/dlopen.c b/components/libdl/dlopen.c
deleted file mode 100644
index 5e063eed96..0000000000
--- a/components/libdl/dlopen.c
+++ /dev/null
@@ -1,55 +0,0 @@
-/*
- * File : dlopen.c
- * This file is part of RT-Thread RTOS
- * COPYRIGHT (C) 2006 - 2010, RT-Thread Development Team
- *
- * The license and distribution terms for this file may be
- * found in the file LICENSE in this distribution or at
- * http://www.rt-thread.org/license/LICENSE
- *
- * Change Logs:
- * Date Author Notes
- * 2010-11-17 yi.qiu first version
- */
-
-#include <rtthread.h>
-#include <rtm.h>
-#include <string.h>
-
-#define MODULE_ROOT_DIR "/module/lib"
-
-void* dlopen(const char *filename, int flags)
-{
- rt_module_t module;
- char *fullpath;
- const char*def_path = MODULE_ROOT_DIR;
-
- /* check parameters */
- RT_ASSERT(filename != RT_NULL);
-
- if (filename[0] != '/') /* it's a absolute path, use it directly */
- {
- fullpath = rt_malloc(strlen(def_path) + strlen(filename) + 2);
-
- /* join path and file name */
- rt_snprintf(fullpath, strlen(def_path) + strlen(filename) + 2,
- "%s/%s", def_path, filename);
- }
- else
- {
- rt_kprintf("use absolute path\n");
- return RT_NULL;
- }
-
- /* find in module list */
- module = rt_module_find(fullpath);
-
- if(module != RT_NULL) module->nref++;
- else module = rt_module_open(fullpath);
-
- rt_free(fullpath);
- return (void*)module;
-}
-
-RTM_EXPORT(dlopen)
-
diff --git a/components/libdl/dlsym.c b/components/libdl/dlsym.c
deleted file mode 100644
index 36c7b01fce..0000000000
--- a/components/libdl/dlsym.c
+++ /dev/null
@@ -1,37 +0,0 @@
-/*
- * File : dlsym.c
- * This file is part of RT-Thread RTOS
- * COPYRIGHT (C) 2006 - 2010, RT-Thread Development Team
- *
- * The license and distribution terms for this file may be
- * found in the file LICENSE in this distribution or at
- * http://www.rt-thread.org/license/LICENSE
- *
- * Change Logs:
- * Date Author Notes
- * 2010-11-17 yi.qiu first version
- */
-
-#include <rtthread.h>
-#include <rtm.h>
-
-void* dlsym(void *handle, const char* symbol)
-{
- int i;
- rt_module_t module;
-
- RT_ASSERT(handle != RT_NULL);
-
- module = (rt_module_t)handle;
-
- for(i=0; i<module->nsym; i++)
- {
- if (rt_strcmp(module->symtab[i].name, symbol) == 0)
- return (void*)module->symtab[i].addr;
- }
-
- return RT_NULL;
-}
-
-RTM_EXPORT(dlsym)
-