[PATCH] ldso/libdl: include dl-tls.h for mips static lin
Vincent Wen
wenvincent90 at gmail.com
Fri Feb 22 22:13:03 UTC 2013
Bernhard,
I submitted the following forwarded patch email to uclibc at uclibc.org by the
"git send-email". I used a different subject line because this original
thread has a typo. The new subject line is as
Subject: [PATCH] libdl.c: static link fail for mips
Please let me know if this is OK. If not I re-submit it.
Thanks,
Vincent
---------- Forwarded message ----------
From: Vincent Wen <wenvincent90 at gmail.com>
Date: Fri, Feb 22, 2013 at 2:06 PM
Subject: [PATCH] libdl.c: static link fail for mips
To: uclibc at uclibc.org
Cc: Vincent Wen <wenvincent90 at gmail.com>
When build statically linked applications for MIPS platform,
sometimes the linker fails with following errors:
undefined reference to TLS_DTPREL_VALUE
undefined reference to TLS_TPREL_VALUE
The include of dl-tls.h is defined for shared library build.
Removing the SHARED compilation option to cover static link too.
Signed-off-by: Vincent Wen <wenvincent90 at gmail.com>
---
ldso/libdl/libdl.c | 5 ++++-
1 files changed, 4 insertions(+), 1 deletions(-)
diff --git a/ldso/libdl/libdl.c b/ldso/libdl/libdl.c
index 2337223..5172754 100644
--- a/ldso/libdl/libdl.c
+++ b/ldso/libdl/libdl.c
@@ -49,9 +49,12 @@ 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);
-#ifdef SHARED
# if defined(USE_TLS) && USE_TLS
# include <dl-tls.h>
+# endif
+
+#ifdef SHARED
+# if defined(USE_TLS) && USE_TLS
extern struct link_map *_dl_update_slotinfo(unsigned long int req_modid);
# endif
--
1.7.9.1.g8d994
More information about the uClibc
mailing list