summaryrefslogtreecommitdiffstats
path: root/meta/recipes-core/uclibc/uclibc-git/rtld_no.patch
diff options
context:
space:
mode:
Diffstat (limited to 'meta/recipes-core/uclibc/uclibc-git/rtld_no.patch')
-rw-r--r--meta/recipes-core/uclibc/uclibc-git/rtld_no.patch83
1 files changed, 42 insertions, 41 deletions
diff --git a/meta/recipes-core/uclibc/uclibc-git/rtld_no.patch b/meta/recipes-core/uclibc/uclibc-git/rtld_no.patch
index 30cb7f6ef6..36fec651fe 100644
--- a/meta/recipes-core/uclibc/uclibc-git/rtld_no.patch
+++ b/meta/recipes-core/uclibc/uclibc-git/rtld_no.patch
@@ -3,11 +3,11 @@ http://lists.busybox.net/pipermail/uclibc/2011-March/045004.html
3 3
4Upstream-Status: Pending 4Upstream-Status: Pending
5 5
6diff --git a/ldso/include/dl-elf.h b/ldso/include/dl-elf.h 6Index: git/ldso/include/dl-elf.h
7index 7fbb373..7102351 100644 7===================================================================
8--- a/ldso/include/dl-elf.h 8--- git.orig/ldso/include/dl-elf.h 2011-07-01 15:20:51.000000000 -0700
9+++ b/ldso/include/dl-elf.h 9+++ git/ldso/include/dl-elf.h 2011-07-01 15:30:43.274364603 -0700
10@@ -25,16 +25,18 @@ static __inline__ void _dl_map_cache(void) { } 10@@ -26,16 +26,18 @@
11 static __inline__ void _dl_unmap_cache(void) { } 11 static __inline__ void _dl_unmap_cache(void) { }
12 #endif 12 #endif
13 13
@@ -18,21 +18,21 @@ index 7fbb373..7102351 100644
18 extern void _dl_parse_lazy_relocation_information(struct dyn_elf *rpnt, 18 extern void _dl_parse_lazy_relocation_information(struct dyn_elf *rpnt,
19 unsigned long rel_addr, unsigned long rel_size); 19 unsigned long rel_addr, unsigned long rel_size);
20 extern int _dl_parse_relocation_information(struct dyn_elf *rpnt, 20 extern int _dl_parse_relocation_information(struct dyn_elf *rpnt,
21 unsigned long rel_addr, unsigned long rel_size); 21 struct r_scope_elem *scope, unsigned long rel_addr, unsigned long rel_size);
22-extern struct elf_resolve * _dl_load_shared_library(int secure, 22-extern struct elf_resolve * _dl_load_shared_library(int secure,
23+extern struct elf_resolve * _dl_load_shared_library(int resolve_flags, 23+extern struct elf_resolve * _dl_load_shared_library(int resolve_flags,
24 struct dyn_elf **rpnt, struct elf_resolve *tpnt, char *full_libname, 24 struct dyn_elf **rpnt, struct elf_resolve *tpnt, char *full_libname,
25 int trace_loaded_objects); 25 int trace_loaded_objects);
26-extern struct elf_resolve * _dl_load_elf_shared_library(int secure, 26-extern struct elf_resolve * _dl_load_elf_shared_library(int secure,
27+extern struct elf_resolve * _dl_load_elf_shared_library(int resolve_flags, 27+extern struct elf_resolve * _dl_load_elf_shared_library(int resolve_flags,
28 struct dyn_elf **rpnt, char *libname); 28 struct dyn_elf **rpnt, const char *libname);
29 extern struct elf_resolve *_dl_check_if_named_library_is_loaded(const char *full_libname, 29 extern struct elf_resolve *_dl_check_if_named_library_is_loaded(const char *full_libname,
30 int trace_loaded_objects); 30 int trace_loaded_objects);
31diff --git a/ldso/ldso/dl-elf.c b/ldso/ldso/dl-elf.c 31Index: git/ldso/ldso/dl-elf.c
32index 2b2d429..6d35bf2 100644 32===================================================================
33--- a/ldso/ldso/dl-elf.c 33--- git.orig/ldso/ldso/dl-elf.c 2011-07-01 15:21:47.000000000 -0700
34+++ b/ldso/ldso/dl-elf.c 34+++ git/ldso/ldso/dl-elf.c 2011-07-01 15:31:29.814432859 -0700
35@@ -132,7 +132,7 @@ _dl_protect_relro (struct elf_resolve *l) 35@@ -132,7 +132,7 @@
36 /* This function's behavior must exactly match that 36 /* This function's behavior must exactly match that
37 * in uClibc/ldso/util/ldd.c */ 37 * in uClibc/ldso/util/ldd.c */
38 static struct elf_resolve * 38 static struct elf_resolve *
@@ -41,7 +41,7 @@ index 2b2d429..6d35bf2 100644
41 struct dyn_elf **rpnt, const char *origin) 41 struct dyn_elf **rpnt, const char *origin)
42 { 42 {
43 char *mylibname; 43 char *mylibname;
44@@ -162,7 +162,7 @@ search_for_named_library(const char *name, int secure, const char *path_list, 44@@ -162,7 +162,7 @@
45 45
46 if (plen >= 7 && _dl_memcmp(p, "$ORIGIN", 7) == 0) { 46 if (plen >= 7 && _dl_memcmp(p, "$ORIGIN", 7) == 0) {
47 int olen; 47 int olen;
@@ -50,7 +50,7 @@ index 2b2d429..6d35bf2 100644
50 continue; 50 continue;
51 if (origin == NULL) 51 if (origin == NULL)
52 continue; 52 continue;
53@@ -182,7 +182,7 @@ search_for_named_library(const char *name, int secure, const char *path_list, 53@@ -182,7 +182,7 @@
54 _dl_strcat(mylibname, "/"); 54 _dl_strcat(mylibname, "/");
55 _dl_strcat(mylibname, name); 55 _dl_strcat(mylibname, name);
56 56
@@ -59,7 +59,7 @@ index 2b2d429..6d35bf2 100644
59 if (tpnt != NULL) 59 if (tpnt != NULL)
60 return tpnt; 60 return tpnt;
61 } 61 }
62@@ -194,7 +194,7 @@ search_for_named_library(const char *name, int secure, const char *path_list, 62@@ -194,7 +194,7 @@
63 unsigned long _dl_error_number; 63 unsigned long _dl_error_number;
64 unsigned long _dl_internal_error_number; 64 unsigned long _dl_internal_error_number;
65 65
@@ -68,7 +68,7 @@ index 2b2d429..6d35bf2 100644
68 struct elf_resolve *tpnt, char *full_libname, int attribute_unused trace_loaded_objects) 68 struct elf_resolve *tpnt, char *full_libname, int attribute_unused trace_loaded_objects)
69 { 69 {
70 char *pnt; 70 char *pnt;
71@@ -223,7 +223,7 @@ struct elf_resolve *_dl_load_shared_library(int secure, struct dyn_elf **rpnt, 71@@ -223,7 +223,7 @@
72 72
73 if (libname != full_libname) { 73 if (libname != full_libname) {
74 _dl_if_debug_dprint("\ttrying file='%s'\n", full_libname); 74 _dl_if_debug_dprint("\ttrying file='%s'\n", full_libname);
@@ -77,7 +77,7 @@ index 2b2d429..6d35bf2 100644
77 if (tpnt1) { 77 if (tpnt1) {
78 return tpnt1; 78 return tpnt1;
79 } 79 }
80@@ -238,7 +238,7 @@ struct elf_resolve *_dl_load_shared_library(int secure, struct dyn_elf **rpnt, 80@@ -238,7 +238,7 @@
81 if (pnt) { 81 if (pnt) {
82 pnt += (unsigned long) tpnt->dynamic_info[DT_STRTAB]; 82 pnt += (unsigned long) tpnt->dynamic_info[DT_STRTAB];
83 _dl_if_debug_dprint("\tsearching RPATH='%s'\n", pnt); 83 _dl_if_debug_dprint("\tsearching RPATH='%s'\n", pnt);
@@ -86,7 +86,7 @@ index 2b2d429..6d35bf2 100644
86 tpnt->libname)) != NULL) 86 tpnt->libname)) != NULL)
87 return tpnt1; 87 return tpnt1;
88 } 88 }
89@@ -247,7 +247,7 @@ struct elf_resolve *_dl_load_shared_library(int secure, struct dyn_elf **rpnt, 89@@ -247,7 +247,7 @@
90 /* Check in LD_{ELF_}LIBRARY_PATH, if specified and allowed */ 90 /* Check in LD_{ELF_}LIBRARY_PATH, if specified and allowed */
91 if (_dl_library_path) { 91 if (_dl_library_path) {
92 _dl_if_debug_dprint("\tsearching LD_LIBRARY_PATH='%s'\n", _dl_library_path); 92 _dl_if_debug_dprint("\tsearching LD_LIBRARY_PATH='%s'\n", _dl_library_path);
@@ -95,7 +95,7 @@ index 2b2d429..6d35bf2 100644
95 { 95 {
96 return tpnt1; 96 return tpnt1;
97 } 97 }
98@@ -261,7 +261,7 @@ struct elf_resolve *_dl_load_shared_library(int secure, struct dyn_elf **rpnt, 98@@ -261,7 +261,7 @@
99 if (pnt) { 99 if (pnt) {
100 pnt += (unsigned long) tpnt->dynamic_info[DT_STRTAB]; 100 pnt += (unsigned long) tpnt->dynamic_info[DT_STRTAB];
101 _dl_if_debug_dprint("\tsearching RUNPATH='%s'\n", pnt); 101 _dl_if_debug_dprint("\tsearching RUNPATH='%s'\n", pnt);
@@ -104,7 +104,7 @@ index 2b2d429..6d35bf2 100644
104 return tpnt1; 104 return tpnt1;
105 } 105 }
106 #endif 106 #endif
107@@ -284,7 +284,7 @@ struct elf_resolve *_dl_load_shared_library(int secure, struct dyn_elf **rpnt, 107@@ -284,7 +284,7 @@
108 || libent[i].flags == LIB_ELF_LIBC0 108 || libent[i].flags == LIB_ELF_LIBC0
109 || libent[i].flags == LIB_ELF_LIBC5) 109 || libent[i].flags == LIB_ELF_LIBC5)
110 && _dl_strcmp(libname, strs + libent[i].sooffset) == 0 110 && _dl_strcmp(libname, strs + libent[i].sooffset) == 0
@@ -113,7 +113,7 @@ index 2b2d429..6d35bf2 100644
113 ) { 113 ) {
114 return tpnt1; 114 return tpnt1;
115 } 115 }
116@@ -295,14 +295,14 @@ struct elf_resolve *_dl_load_shared_library(int secure, struct dyn_elf **rpnt, 116@@ -295,14 +295,14 @@
117 /* Look for libraries wherever the shared library loader 117 /* Look for libraries wherever the shared library loader
118 * was installed */ 118 * was installed */
119 _dl_if_debug_dprint("\tsearching ldso dir='%s'\n", _dl_ldsopath); 119 _dl_if_debug_dprint("\tsearching ldso dir='%s'\n", _dl_ldsopath);
@@ -130,16 +130,16 @@ index 2b2d429..6d35bf2 100644
130 UCLIBC_RUNTIME_PREFIX "lib:" 130 UCLIBC_RUNTIME_PREFIX "lib:"
131 UCLIBC_RUNTIME_PREFIX "usr/lib" 131 UCLIBC_RUNTIME_PREFIX "usr/lib"
132 #ifndef __LDSO_CACHE_SUPPORT__ 132 #ifndef __LDSO_CACHE_SUPPORT__
133@@ -329,7 +329,7 @@ goof: 133@@ -444,7 +444,7 @@
134 * are required. 134 * are required.
135 */ 135 */
136 136
137-struct elf_resolve *_dl_load_elf_shared_library(int secure, 137-struct elf_resolve *_dl_load_elf_shared_library(int secure,
138+struct elf_resolve *_dl_load_elf_shared_library(int resolve_flags, 138+struct elf_resolve *_dl_load_elf_shared_library(int resolve_flags,
139 struct dyn_elf **rpnt, char *libname) 139 struct dyn_elf **rpnt, const char *libname)
140 { 140 {
141 ElfW(Ehdr) *epnt; 141 ElfW(Ehdr) *epnt;
142@@ -368,7 +368,7 @@ struct elf_resolve *_dl_load_elf_shared_library(int secure, 142@@ -483,7 +483,7 @@
143 } 143 }
144 /* If we are in secure mode (i.e. a setu/gid binary using LD_PRELOAD), 144 /* If we are in secure mode (i.e. a setu/gid binary using LD_PRELOAD),
145 we don't load the library if it isn't setuid. */ 145 we don't load the library if it isn't setuid. */
@@ -148,7 +148,7 @@ index 2b2d429..6d35bf2 100644
148 if (!(st.st_mode & S_ISUID)) { 148 if (!(st.st_mode & S_ISUID)) {
149 _dl_close(infile); 149 _dl_close(infile);
150 return NULL; 150 return NULL;
151@@ -384,6 +384,10 @@ struct elf_resolve *_dl_load_elf_shared_library(int secure, 151@@ -499,6 +499,10 @@
152 return tpnt; 152 return tpnt;
153 } 153 }
154 } 154 }
@@ -159,11 +159,11 @@ index 2b2d429..6d35bf2 100644
159 header = _dl_mmap((void *) 0, _dl_pagesize, PROT_READ | PROT_WRITE, 159 header = _dl_mmap((void *) 0, _dl_pagesize, PROT_READ | PROT_WRITE,
160 MAP_PRIVATE | MAP_ANONYMOUS | MAP_UNINITIALIZE, -1, 0); 160 MAP_PRIVATE | MAP_ANONYMOUS | MAP_UNINITIALIZE, -1, 0);
161 if (_dl_mmap_check_error(header)) { 161 if (_dl_mmap_check_error(header)) {
162diff --git a/ldso/ldso/ldso.c b/ldso/ldso/ldso.c 162Index: git/ldso/ldso/ldso.c
163index 9423670..b71af34 100644 163===================================================================
164--- a/ldso/ldso/ldso.c 164--- git.orig/ldso/ldso/ldso.c 2011-07-01 15:24:32.000000000 -0700
165+++ b/ldso/ldso/ldso.c 165+++ git/ldso/ldso/ldso.c 2011-07-01 15:24:55.143854007 -0700
166@@ -646,7 +646,9 @@ void _dl_get_ready_to_run(struct elf_resolve *tpnt, DL_LOADADDR_TYPE load_addr, 166@@ -854,7 +854,9 @@
167 if (!_dl_secure || _dl_strchr(str, '/') == NULL) { 167 if (!_dl_secure || _dl_strchr(str, '/') == NULL) {
168 _dl_if_debug_dprint("\tfile='%s'; needed by '%s'\n", str, _dl_progname); 168 _dl_if_debug_dprint("\tfile='%s'; needed by '%s'\n", str, _dl_progname);
169 169
@@ -173,12 +173,12 @@ index 9423670..b71af34 100644
173+ &rpnt, NULL, str, trace_loaded_objects); 173+ &rpnt, NULL, str, trace_loaded_objects);
174 if (!tpnt1) { 174 if (!tpnt1) {
175 #ifdef __LDSO_LDD_SUPPORT__ 175 #ifdef __LDSO_LDD_SUPPORT__
176 if (trace_loaded_objects) 176 if (trace_loaded_objects || _dl_trace_prelink)
177diff --git a/ldso/libdl/libdl.c b/ldso/libdl/libdl.c 177Index: git/ldso/libdl/libdl.c
178index 68cd579..edf38d2 100644 178===================================================================
179--- a/ldso/libdl/libdl.c 179--- git.orig/ldso/libdl/libdl.c 2011-07-01 15:20:51.000000000 -0700
180+++ b/ldso/libdl/libdl.c 180+++ git/ldso/libdl/libdl.c 2011-07-01 15:24:55.143854007 -0700
181@@ -288,7 +288,7 @@ void *dlopen(const char *libname, int flag) 181@@ -305,7 +305,7 @@
182 #endif 182 #endif
183 183
184 /* A bit of sanity checking... */ 184 /* A bit of sanity checking... */
@@ -187,7 +187,7 @@ index 68cd579..edf38d2 100644
187 _dl_error_number = LD_BAD_HANDLE; 187 _dl_error_number = LD_BAD_HANDLE;
188 return NULL; 188 return NULL;
189 } 189 }
190@@ -358,8 +358,9 @@ void *dlopen(const char *libname, int flag) 190@@ -375,8 +375,9 @@
191 /* Try to load the specified library */ 191 /* Try to load the specified library */
192 _dl_if_debug_print("Trying to dlopen '%s', RTLD_GLOBAL:%d RTLD_NOW:%d\n", 192 _dl_if_debug_print("Trying to dlopen '%s', RTLD_GLOBAL:%d RTLD_NOW:%d\n",
193 (char*)libname, (flag & RTLD_GLOBAL ? 1:0), (now_flag & RTLD_NOW ? 1:0)); 193 (char*)libname, (flag & RTLD_GLOBAL ? 1:0), (now_flag & RTLD_NOW ? 1:0));
@@ -198,10 +198,10 @@ index 68cd579..edf38d2 100644
198 if (tpnt == NULL) { 198 if (tpnt == NULL) {
199 _dl_unmap_cache(); 199 _dl_unmap_cache();
200 return NULL; 200 return NULL;
201diff --git a/libc/sysdeps/linux/common/bits/dlfcn.h b/libc/sysdeps/linux/common/bits/dlfcn.h 201Index: git/libc/sysdeps/linux/common/bits/dlfcn.h
202index 4bfbbff..47b42ad 100644 202===================================================================
203--- a/libc/sysdeps/linux/common/bits/dlfcn.h 203--- git.orig/libc/sysdeps/linux/common/bits/dlfcn.h 2011-07-01 15:20:52.000000000 -0700
204+++ b/libc/sysdeps/linux/common/bits/dlfcn.h 204+++ git/libc/sysdeps/linux/common/bits/dlfcn.h 2011-07-01 15:24:55.143854007 -0700
205@@ -24,9 +24,9 @@ 205@@ -24,9 +24,9 @@
206 /* The MODE argument to `dlopen' contains one of the following: */ 206 /* The MODE argument to `dlopen' contains one of the following: */
207 #define RTLD_LAZY 0x00001 /* Lazy function call binding. */ 207 #define RTLD_LAZY 0x00001 /* Lazy function call binding. */
@@ -213,3 +213,4 @@ index 4bfbbff..47b42ad 100644
213+#if 0 /* uClibc doesnt support these */ 213+#if 0 /* uClibc doesnt support these */
214 #define RTLD_DEEPBIND 0x00008 /* Use deep binding. */ 214 #define RTLD_DEEPBIND 0x00008 /* Use deep binding. */
215 #endif 215 #endif
216