[git commit nptl] ldso: simplify handling of extra _dl_lookup_hash() arg

Mike Frysinger vapier at gentoo.org
Fri Oct 16 09:38:53 UTC 2009


commit: http://git.uclibc.org/uClibc/commit/?id=1b1627c7ca2ba1cd6aca214ed9a4065feacc31d5
branch: http://git.uclibc.org/uClibc/commit/?id=refs/heads/nptl

Signed-off-by: Mike Frysinger <vapier at gentoo.org>
Signed-off-by: Austin Foxley <austinf at cetoncorp.com>
---
 ldso/include/dl-hash.h |   20 ++++++--------------
 ldso/ldso/dl-hash.c    |    2 +-
 2 files changed, 7 insertions(+), 15 deletions(-)

diff --git a/ldso/include/dl-hash.h b/ldso/include/dl-hash.h
index 496ec0f..2204214 100644
--- a/ldso/include/dl-hash.h
+++ b/ldso/include/dl-hash.h
@@ -137,27 +137,19 @@ extern struct elf_resolve * _dl_add_elf_hash_table(const char * libname,
 	DL_LOADADDR_TYPE loadaddr, unsigned long * dynamic_info,
 	unsigned long dynamic_addr, unsigned long dynamic_size);
 
-#if USE_TLS || defined __FDPIC__
-#define _DL_LOOKUP_HASH_NEEDS_EXTRA_TPNT
-#define _DL_LOOKUP_HASH_EXTRA_TPNT	, struct elf_resolve **tpntp
-#else
-#undef _DL_LOOKUP_HASH_NEEDS_EXTRA_TPNT
-#define _DL_LOOKUP_HASH_EXTRA_TPNT
+/* Only need extra arg with some configurations */
+#if !(USE_TLS || defined __FDPIC__)
+# define _dl_lookup_hash(n, r, m, c, t) _dl_lookup_hash(n, r, m, c)
 #endif
-
-extern char * _dl_lookup_hash(const char * name, struct dyn_elf * rpnt,
-			    struct elf_resolve *mytpnt, int type_class
-			    _DL_LOOKUP_HASH_EXTRA_TPNT);
+extern char *_dl_lookup_hash(const char *name, struct dyn_elf *rpnt,
+	struct elf_resolve *mytpnt, int type_class,
+	struct elf_resolve **tpntp);
 
 static __always_inline char *_dl_find_hash(const char *name, struct dyn_elf *rpnt,
 					struct elf_resolve *mytpnt, int type_class,
 					struct elf_resolve **tpntp)
 {
-#ifdef _DL_LOOKUP_HASH_NEEDS_EXTRA_TPNT
 	return _dl_lookup_hash(name, rpnt, mytpnt, type_class, tpntp);
-#else
-	return _dl_lookup_hash(name, rpnt, mytpnt, type_class);
-#endif
 }
 
 extern int _dl_linux_dynamic_link(void);
diff --git a/ldso/ldso/dl-hash.c b/ldso/ldso/dl-hash.c
index 1ac5b94..5f90a54 100644
--- a/ldso/ldso/dl-hash.c
+++ b/ldso/ldso/dl-hash.c
@@ -269,7 +269,7 @@ _dl_lookup_sysv_hash(struct elf_resolve *tpnt, ElfW(Sym) *symtab, unsigned long
  * relocations or when we call an entry in the PLT table for the first time.
  */
 char *_dl_lookup_hash(const char *name, struct dyn_elf *rpnt, struct elf_resolve *mytpnt,
-	int type_class _DL_LOOKUP_HASH_EXTRA_TPNT)
+	int type_class, struct elf_resolve **tpntp)
 {
 	struct elf_resolve *tpnt = NULL;
 	ElfW(Sym) *symtab;
-- 
1.6.3.3



More information about the uClibc-cvs mailing list