summaryrefslogtreecommitdiffstats
path: root/meta/recipes-core/eglibc/eglibc-2.13/ld-search-order.patch
diff options
context:
space:
mode:
authorKhem Raj <raj.khem@gmail.com>2011-06-21 15:53:38 -0700
committerRichard Purdie <richard.purdie@linuxfoundation.org>2011-06-22 16:57:35 +0100
commit16837d4cc39415709f744afa9532d53e0382d6bd (patch)
tree5e94cea887936d0c61b8d6bb9eba298df668ed4f /meta/recipes-core/eglibc/eglibc-2.13/ld-search-order.patch
parent77c2dd944db42e40cc8467e6bc5a175fed90c251 (diff)
downloadpoky-16837d4cc39415709f744afa9532d53e0382d6bd.tar.gz
eglibc: Upgrade recipes from 2.13 -> 2.14
(From OE-Core rev: 2a68cf4d315cdd18766de0c75928ff17846a6cd7) Signed-off-by: Khem Raj <raj.khem@gmail.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Diffstat (limited to 'meta/recipes-core/eglibc/eglibc-2.13/ld-search-order.patch')
-rw-r--r--meta/recipes-core/eglibc/eglibc-2.13/ld-search-order.patch56
1 files changed, 0 insertions, 56 deletions
diff --git a/meta/recipes-core/eglibc/eglibc-2.13/ld-search-order.patch b/meta/recipes-core/eglibc/eglibc-2.13/ld-search-order.patch
deleted file mode 100644
index 40ae6d37f4..0000000000
--- a/meta/recipes-core/eglibc/eglibc-2.13/ld-search-order.patch
+++ /dev/null
@@ -1,56 +0,0 @@
1Upstream-Status: Inappropriate [embedded specific]
2
3The default lib search path order is:
4
5 1) LD_LIBRARY_PATH
6 2) RPATH from the binary
7 3) ld.so.cache
8 4) default search paths embedded in the linker
9
10For nativesdk binaries which are being used alongside binaries on a host system, we
11need the search paths to firstly search the shipped nativesdk libs but then also
12cover the host system. For example we want the host system's libGL and this may be
13in a non-standard location like /usr/lib/mesa. The only place the location is know
14about is in the ld.so.cache of the host system.
15
16Since nativesdk has a simple structure and doesn't need to use a cache itself, we
17repurpose the cache for use as a last resort in finding host system binaries. This
18means we need to switch the order of 3 and 4 above to make this work effectively.
19
20RP 14/10/2010
21
22Index: libc/elf/dl-load.c
23===================================================================
24--- libc.orig/elf/dl-load.c
25+++ libc/elf/dl-load.c
26@@ -2107,6 +2107,15 @@ _dl_map_object (struct link_map *loader,
27 &loader->l_runpath_dirs, &realname, &fb, loader,
28 LA_SER_RUNPATH, &found_other_class);
29
30+ /* try the default path. */
31+ if (fd == -1
32+ && ((l = loader ?: GL(dl_ns)[nsid]._ns_loaded) == NULL
33+ || __builtin_expect (!(l->l_flags_1 & DF_1_NODEFLIB), 1))
34+ && rtld_search_dirs.dirs != (void *) -1)
35+ fd = open_path (name, namelen, mode & __RTLD_SECURE, &rtld_search_dirs,
36+ &realname, &fb, l, LA_SER_DEFAULT, &found_other_class);
37+
38+ /* Finally try ld.so.cache */
39 if (fd == -1
40 && (__builtin_expect (! (mode & __RTLD_SECURE), 1)
41 || ! INTUSE(__libc_enable_secure)))
42@@ -2169,14 +2178,6 @@ _dl_map_object (struct link_map *loader,
43 }
44 }
45
46- /* Finally, try the default path. */
47- if (fd == -1
48- && ((l = loader ?: GL(dl_ns)[nsid]._ns_loaded) == NULL
49- || __builtin_expect (!(l->l_flags_1 & DF_1_NODEFLIB), 1))
50- && rtld_search_dirs.dirs != (void *) -1)
51- fd = open_path (name, namelen, mode & __RTLD_SECURE, &rtld_search_dirs,
52- &realname, &fb, l, LA_SER_DEFAULT, &found_other_class);
53-
54 /* Add another newline when we are tracing the library loading. */
55 if (__builtin_expect (GLRO_dl_debug_mask & DL_DEBUG_LIBS, 0))
56 _dl_debug_printf ("\n");