summaryrefslogtreecommitdiff
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 30cb7f6ef..36fec651f 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
Upstream-Status: Pending
-diff --git a/ldso/include/dl-elf.h b/ldso/include/dl-elf.h
-index 7fbb373..7102351 100644
---- a/ldso/include/dl-elf.h
-+++ b/ldso/include/dl-elf.h
-@@ -25,16 +25,18 @@ static __inline__ void _dl_map_cache(void) { }
+Index: git/ldso/include/dl-elf.h
+===================================================================
+--- git.orig/ldso/include/dl-elf.h 2011-07-01 15:20:51.000000000 -0700
++++ git/ldso/include/dl-elf.h 2011-07-01 15:30:43.274364603 -0700
+@@ -26,16 +26,18 @@
static __inline__ void _dl_unmap_cache(void) { }
#endif
@@ -18,21 +18,21 @@ index 7fbb373..7102351 100644
extern void _dl_parse_lazy_relocation_information(struct dyn_elf *rpnt,
unsigned long rel_addr, unsigned long rel_size);
extern int _dl_parse_relocation_information(struct dyn_elf *rpnt,
- unsigned long rel_addr, unsigned long rel_size);
+ struct r_scope_elem *scope, unsigned long rel_addr, unsigned long rel_size);
-extern struct elf_resolve * _dl_load_shared_library(int secure,
+extern struct elf_resolve * _dl_load_shared_library(int resolve_flags,
struct dyn_elf **rpnt, struct elf_resolve *tpnt, char *full_libname,
int trace_loaded_objects);
-extern struct elf_resolve * _dl_load_elf_shared_library(int secure,
+extern struct elf_resolve * _dl_load_elf_shared_library(int resolve_flags,
- struct dyn_elf **rpnt, char *libname);
+ struct dyn_elf **rpnt, const char *libname);
extern struct elf_resolve *_dl_check_if_named_library_is_loaded(const char *full_libname,
int trace_loaded_objects);
-diff --git a/ldso/ldso/dl-elf.c b/ldso/ldso/dl-elf.c
-index 2b2d429..6d35bf2 100644
---- a/ldso/ldso/dl-elf.c
-+++ b/ldso/ldso/dl-elf.c
-@@ -132,7 +132,7 @@ _dl_protect_relro (struct elf_resolve *l)
+Index: git/ldso/ldso/dl-elf.c
+===================================================================
+--- git.orig/ldso/ldso/dl-elf.c 2011-07-01 15:21:47.000000000 -0700
++++ git/ldso/ldso/dl-elf.c 2011-07-01 15:31:29.814432859 -0700
+@@ -132,7 +132,7 @@
/* This function's behavior must exactly match that
* in uClibc/ldso/util/ldd.c */
static struct elf_resolve *
@@ -41,7 +41,7 @@ index 2b2d429..6d35bf2 100644
struct dyn_elf **rpnt, const char *origin)
{
char *mylibname;
-@@ -162,7 +162,7 @@ search_for_named_library(const char *name, int secure, const char *path_list,
+@@ -162,7 +162,7 @@
if (plen >= 7 && _dl_memcmp(p, "$ORIGIN", 7) == 0) {
int olen;
@@ -50,7 +50,7 @@ index 2b2d429..6d35bf2 100644
continue;
if (origin == NULL)
continue;
-@@ -182,7 +182,7 @@ search_for_named_library(const char *name, int secure, const char *path_list,
+@@ -182,7 +182,7 @@
_dl_strcat(mylibname, "/");
_dl_strcat(mylibname, name);
@@ -59,7 +59,7 @@ index 2b2d429..6d35bf2 100644
if (tpnt != NULL)
return tpnt;
}
-@@ -194,7 +194,7 @@ search_for_named_library(const char *name, int secure, const char *path_list,
+@@ -194,7 +194,7 @@
unsigned long _dl_error_number;
unsigned long _dl_internal_error_number;
@@ -68,7 +68,7 @@ index 2b2d429..6d35bf2 100644
struct elf_resolve *tpnt, char *full_libname, int attribute_unused trace_loaded_objects)
{
char *pnt;
-@@ -223,7 +223,7 @@ struct elf_resolve *_dl_load_shared_library(int secure, struct dyn_elf **rpnt,
+@@ -223,7 +223,7 @@
if (libname != full_libname) {
_dl_if_debug_dprint("\ttrying file='%s'\n", full_libname);
@@ -77,7 +77,7 @@ index 2b2d429..6d35bf2 100644
if (tpnt1) {
return tpnt1;
}
-@@ -238,7 +238,7 @@ struct elf_resolve *_dl_load_shared_library(int secure, struct dyn_elf **rpnt,
+@@ -238,7 +238,7 @@
if (pnt) {
pnt += (unsigned long) tpnt->dynamic_info[DT_STRTAB];
_dl_if_debug_dprint("\tsearching RPATH='%s'\n", pnt);
@@ -86,7 +86,7 @@ index 2b2d429..6d35bf2 100644
tpnt->libname)) != NULL)
return tpnt1;
}
-@@ -247,7 +247,7 @@ struct elf_resolve *_dl_load_shared_library(int secure, struct dyn_elf **rpnt,
+@@ -247,7 +247,7 @@
/* Check in LD_{ELF_}LIBRARY_PATH, if specified and allowed */
if (_dl_library_path) {
_dl_if_debug_dprint("\tsearching LD_LIBRARY_PATH='%s'\n", _dl_library_path);
@@ -95,7 +95,7 @@ index 2b2d429..6d35bf2 100644
{
return tpnt1;
}
-@@ -261,7 +261,7 @@ struct elf_resolve *_dl_load_shared_library(int secure, struct dyn_elf **rpnt,
+@@ -261,7 +261,7 @@
if (pnt) {
pnt += (unsigned long) tpnt->dynamic_info[DT_STRTAB];
_dl_if_debug_dprint("\tsearching RUNPATH='%s'\n", pnt);
@@ -104,7 +104,7 @@ index 2b2d429..6d35bf2 100644
return tpnt1;
}
#endif
-@@ -284,7 +284,7 @@ struct elf_resolve *_dl_load_shared_library(int secure, struct dyn_elf **rpnt,
+@@ -284,7 +284,7 @@
|| libent[i].flags == LIB_ELF_LIBC0
|| libent[i].flags == LIB_ELF_LIBC5)
&& _dl_strcmp(libname, strs + libent[i].sooffset) == 0
@@ -113,7 +113,7 @@ index 2b2d429..6d35bf2 100644
) {
return tpnt1;
}
-@@ -295,14 +295,14 @@ struct elf_resolve *_dl_load_shared_library(int secure, struct dyn_elf **rpnt,
+@@ -295,14 +295,14 @@
/* Look for libraries wherever the shared library loader
* was installed */
_dl_if_debug_dprint("\tsearching ldso dir='%s'\n", _dl_ldsopath);
@@ -130,16 +130,16 @@ index 2b2d429..6d35bf2 100644
UCLIBC_RUNTIME_PREFIX "lib:"
UCLIBC_RUNTIME_PREFIX "usr/lib"
#ifndef __LDSO_CACHE_SUPPORT__
-@@ -329,7 +329,7 @@ goof:
+@@ -444,7 +444,7 @@
* are required.
*/
-struct elf_resolve *_dl_load_elf_shared_library(int secure,
+struct elf_resolve *_dl_load_elf_shared_library(int resolve_flags,
- struct dyn_elf **rpnt, char *libname)
+ struct dyn_elf **rpnt, const char *libname)
{
ElfW(Ehdr) *epnt;
-@@ -368,7 +368,7 @@ struct elf_resolve *_dl_load_elf_shared_library(int secure,
+@@ -483,7 +483,7 @@
}
/* If we are in secure mode (i.e. a setu/gid binary using LD_PRELOAD),
we don't load the library if it isn't setuid. */
@@ -148,7 +148,7 @@ index 2b2d429..6d35bf2 100644
if (!(st.st_mode & S_ISUID)) {
_dl_close(infile);
return NULL;
-@@ -384,6 +384,10 @@ struct elf_resolve *_dl_load_elf_shared_library(int secure,
+@@ -499,6 +499,10 @@
return tpnt;
}
}
@@ -159,11 +159,11 @@ index 2b2d429..6d35bf2 100644
header = _dl_mmap((void *) 0, _dl_pagesize, PROT_READ | PROT_WRITE,
MAP_PRIVATE | MAP_ANONYMOUS | MAP_UNINITIALIZE, -1, 0);
if (_dl_mmap_check_error(header)) {
-diff --git a/ldso/ldso/ldso.c b/ldso/ldso/ldso.c
-index 9423670..b71af34 100644
---- a/ldso/ldso/ldso.c
-+++ b/ldso/ldso/ldso.c
-@@ -646,7 +646,9 @@ void _dl_get_ready_to_run(struct elf_resolve *tpnt, DL_LOADADDR_TYPE load_addr,
+Index: git/ldso/ldso/ldso.c
+===================================================================
+--- git.orig/ldso/ldso/ldso.c 2011-07-01 15:24:32.000000000 -0700
++++ git/ldso/ldso/ldso.c 2011-07-01 15:24:55.143854007 -0700
+@@ -854,7 +854,9 @@
if (!_dl_secure || _dl_strchr(str, '/') == NULL) {
_dl_if_debug_dprint("\tfile='%s'; needed by '%s'\n", str, _dl_progname);
@@ -173,12 +173,12 @@ index 9423670..b71af34 100644
+ &rpnt, NULL, str, trace_loaded_objects);
if (!tpnt1) {
#ifdef __LDSO_LDD_SUPPORT__
- if (trace_loaded_objects)
-diff --git a/ldso/libdl/libdl.c b/ldso/libdl/libdl.c
-index 68cd579..edf38d2 100644
---- a/ldso/libdl/libdl.c
-+++ b/ldso/libdl/libdl.c
-@@ -288,7 +288,7 @@ void *dlopen(const char *libname, int flag)
+ if (trace_loaded_objects || _dl_trace_prelink)
+Index: git/ldso/libdl/libdl.c
+===================================================================
+--- git.orig/ldso/libdl/libdl.c 2011-07-01 15:20:51.000000000 -0700
++++ git/ldso/libdl/libdl.c 2011-07-01 15:24:55.143854007 -0700
+@@ -305,7 +305,7 @@
#endif
/* A bit of sanity checking... */
@@ -187,7 +187,7 @@ index 68cd579..edf38d2 100644
_dl_error_number = LD_BAD_HANDLE;
return NULL;
}
-@@ -358,8 +358,9 @@ void *dlopen(const char *libname, int flag)
+@@ -375,8 +375,9 @@
/* Try to load the specified library */
_dl_if_debug_print("Trying to dlopen '%s', RTLD_GLOBAL:%d RTLD_NOW:%d\n",
(char*)libname, (flag & RTLD_GLOBAL ? 1:0), (now_flag & RTLD_NOW ? 1:0));
@@ -198,10 +198,10 @@ index 68cd579..edf38d2 100644
if (tpnt == NULL) {
_dl_unmap_cache();
return NULL;
-diff --git a/libc/sysdeps/linux/common/bits/dlfcn.h b/libc/sysdeps/linux/common/bits/dlfcn.h
-index 4bfbbff..47b42ad 100644
---- a/libc/sysdeps/linux/common/bits/dlfcn.h
-+++ b/libc/sysdeps/linux/common/bits/dlfcn.h
+Index: git/libc/sysdeps/linux/common/bits/dlfcn.h
+===================================================================
+--- git.orig/libc/sysdeps/linux/common/bits/dlfcn.h 2011-07-01 15:20:52.000000000 -0700
++++ git/libc/sysdeps/linux/common/bits/dlfcn.h 2011-07-01 15:24:55.143854007 -0700
@@ -24,9 +24,9 @@
/* The MODE argument to `dlopen' contains one of the following: */
#define RTLD_LAZY 0x00001 /* Lazy function call binding. */
@@ -213,3 +213,4 @@ index 4bfbbff..47b42ad 100644
+#if 0 /* uClibc doesnt support these */
#define RTLD_DEEPBIND 0x00008 /* Use deep binding. */
#endif
+