Source-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[src/netbsd-2-0]: src/lib/libc/dlfcn Pull up revision 1.5 (requested by thorp...
details: https://anonhg.NetBSD.org/src/rev/76719320455a
branches: netbsd-2-0
changeset: 562113:76719320455a
user: tron <tron%NetBSD.org@localhost>
date: Mon Jul 19 09:07:13 2004 +0000
description:
Pull up revision 1.5 (requested by thorpej in ticket #676):
- Change the strong dlfcn names in libc to ___name, and make the __name
versions used by others in libc weak, so that we have:
name: weak
__name: weak
___name: strong
- Add __name strong aliases of the dlfcn names in ld.elf_so, so that
we have:
name: strong
__name: strong
This allows ld.elf_so to self-resolve both the name and __name variants
of the dlfcn functions, the former being required for dlfcn support in
applications, the latter being required for dlfcn support in libc.
Fixes the problem described in:
http://mail-index.netbsd.org/tech-toolchain/2004/07/17/0000.html
Reviewed by Nick.
diffstat:
lib/libc/dlfcn/dlfcn_elf.c | 32 +++++++++++++++++++++++++-------
1 files changed, 25 insertions(+), 7 deletions(-)
diffs (54 lines):
diff -r cf29ee17d1e3 -r 76719320455a lib/libc/dlfcn/dlfcn_elf.c
--- a/lib/libc/dlfcn/dlfcn_elf.c Mon Jul 19 09:06:52 2004 +0000
+++ b/lib/libc/dlfcn/dlfcn_elf.c Mon Jul 19 09:07:13 2004 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: dlfcn_elf.c,v 1.4 2003/08/12 09:18:43 skrll Exp $ */
+/* $NetBSD: dlfcn_elf.c,v 1.4.2.1 2004/07/19 09:07:13 tron Exp $ */
/*
* Copyright (c) 2000 Takuya SHIOZAKI
@@ -27,20 +27,38 @@
#include <sys/cdefs.h>
#if defined(LIBC_SCCS) && !defined(lint)
-__RCSID("$NetBSD: dlfcn_elf.c,v 1.4 2003/08/12 09:18:43 skrll Exp $");
+__RCSID("$NetBSD: dlfcn_elf.c,v 1.4.2.1 2004/07/19 09:07:13 tron Exp $");
#endif /* LIBC_SCCS and not lint */
#include "namespace.h"
+#undef dlopen
+#undef dlclose
+#undef dlsym
+#undef dlerror
+#undef dladdr
+
+#define dlopen ___dlopen
+#define dlclose ___dlclose
+#define dlsym ___dlsym
+#define dlerror ___dlerror
+#define dladdr ___dladdr
+
#define ELFSIZE ARCH_ELFSIZE
#include "rtld.h"
#ifdef __weak_alias
-__weak_alias(dlopen,__dlopen)
-__weak_alias(dlclose,__dlclose)
-__weak_alias(dlsym,__dlsym)
-__weak_alias(dlerror,__dlerror)
-__weak_alias(dladdr,__dladdr)
+__weak_alias(dlopen,___dlopen)
+__weak_alias(dlclose,___dlclose)
+__weak_alias(dlsym,___dlsym)
+__weak_alias(dlerror,___dlerror)
+__weak_alias(dladdr,___dladdr)
+
+__weak_alias(__dlopen,___dlopen)
+__weak_alias(__dlclose,___dlclose)
+__weak_alias(__dlsym,___dlsym)
+__weak_alias(__dlerror,___dlerror)
+__weak_alias(__dladdr,___dladdr)
#endif
/*
Home |
Main Index |
Thread Index |
Old Index