1 uClibc: ldso/libdl: Also include dl-tls.h for for !SHARED.
3 Signed-off-by: Vicente Olivert Riera <Vincent.Riera@imgtec.com>
5 From b57e9640db53166c88cdac66b79a046e46b8d728 Mon Sep 17 00:00:00 2001
6 From: Gregory Fong <gregory.0xf0@gmail.com>
7 Date: Mon, 3 Jun 2013 13:32:55 -0700
8 Subject: [PATCH] ldso/libdl: Also include dl-tls.h for for !SHARED.
10 On MIPS, several relocations that were original only resolved by the
11 dynamic linker were reused as static relocations. Consequently the
12 macros TLS_DTPREL_VALUE and TLS_TPREL_VALUE defined in
13 libpthread/nptl/sysdeps/mips/dl-tls.h need to be available even for
16 Relevant: http://www.linux-mips.org/wiki/NPTL#History
18 Original patch by Vincent Wen <wenvincent@gmail.com>:
19 http://lists.uclibc.org/pipermail/uclibc/2013-April/047707.html
21 When build statically linked applications for MIPS platform,
22 sometimes the linker fails with following errors:
23 undefined reference to TLS_DTPREL_VALUE
24 undefined reference to TLS_TPREL_VALUE
25 The include of dl-tls.h is only in code guarded by SHARED,
26 Removing the SHARED compilation option to cover static link too.
28 Signed-off-by: Vincent Wen <wenvincent90@gmail.com>
30 Signed-off-by: Gregory Fong <gregory.0xf0@gmail.com>
31 Signed-off-by: Bernhard Reutner-Fischer <rep.dot.nop@gmail.com>
33 ldso/libdl/libdl.c | 2 +-
34 1 files changed, 1 insertions(+), 1 deletions(-)
36 diff --git a/ldso/libdl/libdl.c b/ldso/libdl/libdl.c
37 index 3a78696..ed4e735 100644
38 --- a/ldso/libdl/libdl.c
39 +++ b/ldso/libdl/libdl.c
42 #if defined(USE_TLS) && USE_TLS
45 extern void _dl_add_to_slotinfo(struct link_map *l);
48 @@ -51,7 +52,6 @@ __UCLIBC_MUTEX_STATIC(_dl_mutex, PTHREAD_RECURSIVE_MUTEX_INITIALIZER_NP);
51 # if defined(USE_TLS) && USE_TLS
53 extern struct link_map *_dl_update_slotinfo(unsigned long int req_modid);