summaryrefslogtreecommitdiffstats
path: root/mdk-stage1/dietlibc/libdl/dlclose.c
diff options
context:
space:
mode:
authorPascal Rigaux <pixel@mandriva.com>2005-05-06 02:43:04 +0000
committerPascal Rigaux <pixel@mandriva.com>2005-05-06 02:43:04 +0000
commit4e506c9aefe5b89970ae6894d05ad53c81af0d83 (patch)
tree2fac98df209e72eaba773cad2d7b90c99d9d9249 /mdk-stage1/dietlibc/libdl/dlclose.c
parent793707b39bf2e9df40a6d2d60b83b3061088ae9e (diff)
downloaddrakx-backup-do-not-use-4e506c9aefe5b89970ae6894d05ad53c81af0d83.tar
drakx-backup-do-not-use-4e506c9aefe5b89970ae6894d05ad53c81af0d83.tar.gz
drakx-backup-do-not-use-4e506c9aefe5b89970ae6894d05ad53c81af0d83.tar.bz2
drakx-backup-do-not-use-4e506c9aefe5b89970ae6894d05ad53c81af0d83.tar.xz
drakx-backup-do-not-use-4e506c9aefe5b89970ae6894d05ad53c81af0d83.zip
use installed dietlibc, not our forked cvs version
Diffstat (limited to 'mdk-stage1/dietlibc/libdl/dlclose.c')
-rw-r--r--mdk-stage1/dietlibc/libdl/dlclose.c38
1 files changed, 0 insertions, 38 deletions
diff --git a/mdk-stage1/dietlibc/libdl/dlclose.c b/mdk-stage1/dietlibc/libdl/dlclose.c
deleted file mode 100644
index 6fafedcf5..000000000
--- a/mdk-stage1/dietlibc/libdl/dlclose.c
+++ /dev/null
@@ -1,38 +0,0 @@
-#include <sys/mman.h>
-
-#include "_dl_int.h"
-
-static void dec_referenced_libs(struct _dl_handle*dh) {
- Elf_Dyn* dyn_tab=dh->dynamic;
- int i;
- for(i=0;dyn_tab[i].d_tag;i++) {
- if (dyn_tab[i].d_tag==DT_NEEDED) {
- char *lib_name=dh->dyn_str_tab+dyn_tab[i].d_un.d_val;
-#ifdef DEBUG
- pf(__FUNCTION__); pf(": lib: "); pf(lib_name); pf("\n");
-#endif
- dlclose(_dl_find_lib(lib_name));
- }
- }
-}
-
-int dlclose(void*handle) {
- _dl_error_location="dlclose";
- if (handle) {
- struct _dl_handle*dh=handle;
- if (--(dh->lnk_count)) return 0; /* not yet unreferenced */
-
-#ifdef DEBUG
- pf(__FUNCTION__); pf(": "); pf(dh->name); pf("\n");
-#endif
- if (dh->fini) dh->fini();
- dec_referenced_libs(dh);
-#ifdef __DIET_LD_SO__
- if (_dl_sys_munmap(dh->mem_base,dh->mem_size)<0) return -1;
-#else
- if (munmap(dh->mem_base,dh->mem_size)==-1) return -1;
-#endif
- _dl_free_handle(handle);
- }
- return 0;
-}