[prev in list] [next in list] [prev in thread] [next in thread] 

List:       uclibc
Subject:    [PATCH] ldso/libdl: include dl-tls.h for mips static link
From:       xinglong.liao () gmail ! com (Xinglong Liao)
Date:       2012-10-26 11:12:25
Message-ID: 1351249945-12167-1-git-send-email-xinglong.liao () gmail ! com
[Download RAW message or body]

without this patch, static link with libdl.a in mips will cause
undefined reference error, TLS_DTPREL_VALUE and TLS_TPREL_VALUE
used in function _dl_parse_relocation_information are defined in
dl-tls.h

Signed-off-by: Xinglong Liao <xinglong.liao at gmail.com>
---
 ldso/libdl/libdl.c |    4 ++++
 1 file changed, 4 insertions(+)

diff --git a/ldso/libdl/libdl.c b/ldso/libdl/libdl.c
index 8bc3071..981a194 100644
--- a/ldso/libdl/libdl.c
+++ b/ldso/libdl/libdl.c
@@ -49,6 +49,10 @@ extern void _dl_add_to_slotinfo(struct link_map  *l);
  * perhaps RCU for the global structures */
 __UCLIBC_MUTEX_STATIC(_dl_mutex, PTHREAD_RECURSIVE_MUTEX_INITIALIZER_NP);
 
+# if defined(USE_TLS) && USE_TLS && defined(__mips__) && !defined(SHARED)
+# include <dl-tls.h>
+#endif
+
 #ifdef SHARED
 # if defined(USE_TLS) && USE_TLS
 # include <dl-tls.h>
-- 
1.7.9.5


[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic