The cirros image was rebuilt against the 3.13.0-83 kernel, drivers e1000e, igbvf...
[packages/trusty/cirros-testvm.git] / cirros-testvm / src-cirros / buildroot-2015.05 / package / uclibc / 0.9.33.2 / 0062-ldso-libdl-Also-include-dl-tls.h-for-for-SHARED.patch
1 uClibc: ldso/libdl: Also include dl-tls.h for for !SHARED.
2
3 Signed-off-by: Vicente Olivert Riera <Vincent.Riera@imgtec.com>
4
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.
9
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
14 !SHARED.
15
16 Relevant: http://www.linux-mips.org/wiki/NPTL#History
17
18 Original patch by Vincent Wen <wenvincent@gmail.com>:
19 http://lists.uclibc.org/pipermail/uclibc/2013-April/047707.html
20
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.
27
28 Signed-off-by: Vincent Wen <wenvincent90@gmail.com>
29
30 Signed-off-by: Gregory Fong <gregory.0xf0@gmail.com>
31 Signed-off-by: Bernhard Reutner-Fischer <rep.dot.nop@gmail.com>
32 ---
33  ldso/libdl/libdl.c |    2 +-
34  1 files changed, 1 insertions(+), 1 deletions(-)
35
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
40 @@ -42,6 +42,7 @@
41  
42  #if defined(USE_TLS) && USE_TLS
43  #include <ldsodefs.h>
44 +#include <dl-tls.h>
45  extern void _dl_add_to_slotinfo(struct link_map  *l);
46  #endif
47  
48 @@ -51,7 +52,6 @@ __UCLIBC_MUTEX_STATIC(_dl_mutex, PTHREAD_RECURSIVE_MUTEX_INITIALIZER_NP);
49  
50  #ifdef SHARED
51  # if defined(USE_TLS) && USE_TLS
52 -# include <dl-tls.h>
53  extern struct link_map *_dl_update_slotinfo(unsigned long int req_modid);
54  # endif
55  
56 -- 
57 1.7.1
58