summaryrefslogtreecommitdiff
path: root/ldso
diff options
context:
space:
mode:
Diffstat (limited to 'ldso')
-rw-r--r--ldso/include/dl-hash.h20
-rw-r--r--ldso/ldso/dl-hash.c2
2 files changed, 7 insertions, 15 deletions
diff --git a/ldso/include/dl-hash.h b/ldso/include/dl-hash.h
index 496ec0fa5..22042145e 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 1ac5b948d..5f90a544b 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;