diff options
author | Khem Raj <raj.khem@gmail.com> | 2015-03-18 02:05:06 +0000 |
---|---|---|
committer | Richard Purdie <richard.purdie@linuxfoundation.org> | 2015-08-16 22:40:53 +0100 |
commit | cb7368c110553dcb972480abc4a59b975677f7df (patch) | |
tree | 2ffd1b35c59f320e2141bc3016ca1777ffa4d412 /meta/recipes-core/glibc/glibc/0001-nativesdk-glibc-Look-for-host-system-ld.so.cache-as-.patch | |
parent | 0183d7c4067fdf171a4420477e965dca58f6d7d3 (diff) | |
download | poky-cb7368c110553dcb972480abc4a59b975677f7df.tar.gz |
glibc: Upgrade 2.21 -> 2.22
- git'ify the OE patches
- add_resource_h_to_wait_h.patch - dropped, we do not support that old
perf anymore
- mips-rld-map-check.patch - Dropped because binutils is fixed for it
see https://sourceware.org/ml/binutils/2011-12/msg00112.html
- initgroups_keys.patch - Folded into
0026-eglibc-Forward-port-eglibc-options-groups-support.patch
Change-Id: Ib8e731b212f52b8ff12e2180babbc19970fb1ef1
(From OE-Core rev: 6ea08396dbb628140fd3289fc9fb19df97914326)
Signed-off-by: Khem Raj <raj.khem@gmail.com>
Signed-off-by: Ross Burton <ross.burton@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Diffstat (limited to 'meta/recipes-core/glibc/glibc/0001-nativesdk-glibc-Look-for-host-system-ld.so.cache-as-.patch')
-rw-r--r-- | meta/recipes-core/glibc/glibc/0001-nativesdk-glibc-Look-for-host-system-ld.so.cache-as-.patch | 70 |
1 files changed, 70 insertions, 0 deletions
diff --git a/meta/recipes-core/glibc/glibc/0001-nativesdk-glibc-Look-for-host-system-ld.so.cache-as-.patch b/meta/recipes-core/glibc/glibc/0001-nativesdk-glibc-Look-for-host-system-ld.so.cache-as-.patch new file mode 100644 index 0000000000..3d66348133 --- /dev/null +++ b/meta/recipes-core/glibc/glibc/0001-nativesdk-glibc-Look-for-host-system-ld.so.cache-as-.patch | |||
@@ -0,0 +1,70 @@ | |||
1 | From 0876fea1b5b26da84f298714a2e23ba696607dba Mon Sep 17 00:00:00 2001 | ||
2 | From: Khem Raj <raj.khem@gmail.com> | ||
3 | Date: Wed, 18 Mar 2015 01:48:24 +0000 | ||
4 | Subject: [PATCH 01/27] nativesdk-glibc: Look for host system ld.so.cache as | ||
5 | well | ||
6 | |||
7 | Upstream-Status: Inappropriate [embedded specific] | ||
8 | |||
9 | The default lib search path order is: | ||
10 | |||
11 | 1) LD_LIBRARY_PATH | ||
12 | 2) RPATH from the binary | ||
13 | 3) ld.so.cache | ||
14 | 4) default search paths embedded in the linker | ||
15 | |||
16 | For nativesdk binaries which are being used alongside binaries on a host system, we | ||
17 | need the search paths to firstly search the shipped nativesdk libs but then also | ||
18 | cover the host system. For example we want the host system's libGL and this may be | ||
19 | in a non-standard location like /usr/lib/mesa. The only place the location is know | ||
20 | about is in the ld.so.cache of the host system. | ||
21 | |||
22 | Since nativesdk has a simple structure and doesn't need to use a cache itself, we | ||
23 | repurpose the cache for use as a last resort in finding host system binaries. This | ||
24 | means we need to switch the order of 3 and 4 above to make this work effectively. | ||
25 | |||
26 | RP 14/10/2010 | ||
27 | |||
28 | Signed-off-by: Khem Raj <raj.khem@gmail.com> | ||
29 | --- | ||
30 | elf/dl-load.c | 17 ++++++++--------- | ||
31 | 1 file changed, 8 insertions(+), 9 deletions(-) | ||
32 | |||
33 | diff --git a/elf/dl-load.c b/elf/dl-load.c | ||
34 | index 0c052e4..f45085a 100644 | ||
35 | --- a/elf/dl-load.c | ||
36 | +++ b/elf/dl-load.c | ||
37 | @@ -2040,7 +2040,14 @@ _dl_map_object (struct link_map *loader, const char *name, | ||
38 | fd = open_path (name, namelen, mode, | ||
39 | &loader->l_runpath_dirs, &realname, &fb, loader, | ||
40 | LA_SER_RUNPATH, &found_other_class); | ||
41 | - | ||
42 | + /* try the default path. */ | ||
43 | + if (fd == -1 | ||
44 | + && ((l = loader ?: GL(dl_ns)[nsid]._ns_loaded) == NULL | ||
45 | + || __builtin_expect (!(l->l_flags_1 & DF_1_NODEFLIB), 1)) | ||
46 | + && rtld_search_dirs.dirs != (void *) -1) | ||
47 | + fd = open_path (name, namelen, mode & __RTLD_SECURE, &rtld_search_dirs, | ||
48 | + &realname, &fb, l, LA_SER_DEFAULT, &found_other_class); | ||
49 | + /* Finally try ld.so.cache */ | ||
50 | #ifdef USE_LDCONFIG | ||
51 | if (fd == -1 | ||
52 | && (__glibc_likely ((mode & __RTLD_SECURE) == 0) | ||
53 | @@ -2099,14 +2106,6 @@ _dl_map_object (struct link_map *loader, const char *name, | ||
54 | } | ||
55 | #endif | ||
56 | |||
57 | - /* Finally, try the default path. */ | ||
58 | - if (fd == -1 | ||
59 | - && ((l = loader ?: GL(dl_ns)[nsid]._ns_loaded) == NULL | ||
60 | - || __glibc_likely (!(l->l_flags_1 & DF_1_NODEFLIB))) | ||
61 | - && rtld_search_dirs.dirs != (void *) -1) | ||
62 | - fd = open_path (name, namelen, mode, &rtld_search_dirs, | ||
63 | - &realname, &fb, l, LA_SER_DEFAULT, &found_other_class); | ||
64 | - | ||
65 | /* Add another newline when we are tracing the library loading. */ | ||
66 | if (__glibc_unlikely (GLRO(dl_debug_mask) & DL_DEBUG_LIBS)) | ||
67 | _dl_debug_printf ("\n"); | ||
68 | -- | ||
69 | 2.1.4 | ||
70 | |||