diff options
author | Richard Purdie <richard.purdie@linuxfoundation.org> | 2016-05-21 11:55:36 +0100 |
---|---|---|
committer | Richard Purdie <richard.purdie@linuxfoundation.org> | 2016-05-21 22:24:56 +0100 |
commit | 0111181bbb942ab63389fcf29028e93598a23f08 (patch) | |
tree | 918c5258ef0c19ac14ea3bc997862365076ee854 | |
parent | 6b3ac016d3a3924f5b8d2fb925257fef815f038a (diff) | |
download | poky-0111181bbb942ab63389fcf29028e93598a23f08.tar.gz |
nativesdk-glibc: Extend relocation support to locales
Currently locales are not found in a relocated buildtools-tarball
such as that used in eSDK. This breaks bitbake when used under python3.
This patch adds enough relocation magic to nativesdk-glibc so that
the binary locales can be found even in a relocated buildtools-tarball
and bitbake works successfully under python3. The eSDK also works
correctly after this change too.
(From OE-Core rev: faa1229ba848e7a4a90638a98d6c809065016a93)
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
-rw-r--r-- | meta/recipes-core/glibc/glibc/0003-nativesdk-glibc-Raise-the-size-of-arrays-containing-.patch | 97 |
1 files changed, 65 insertions, 32 deletions
diff --git a/meta/recipes-core/glibc/glibc/0003-nativesdk-glibc-Raise-the-size-of-arrays-containing-.patch b/meta/recipes-core/glibc/glibc/0003-nativesdk-glibc-Raise-the-size-of-arrays-containing-.patch index 2e7971c8c6..7cba6cc367 100644 --- a/meta/recipes-core/glibc/glibc/0003-nativesdk-glibc-Raise-the-size-of-arrays-containing-.patch +++ b/meta/recipes-core/glibc/glibc/0003-nativesdk-glibc-Raise-the-size-of-arrays-containing-.patch | |||
@@ -24,10 +24,10 @@ Signed-off-by: Khem Raj <raj.khem@gmail.com> | |||
24 | sysdeps/generic/dl-cache.h | 4 ---- | 24 | sysdeps/generic/dl-cache.h | 4 ---- |
25 | 6 files changed, 13 insertions(+), 9 deletions(-) | 25 | 6 files changed, 13 insertions(+), 9 deletions(-) |
26 | 26 | ||
27 | diff --git a/elf/dl-cache.c b/elf/dl-cache.c | 27 | Index: git/elf/dl-cache.c |
28 | index cfa335e..daa12ec 100644 | 28 | =================================================================== |
29 | --- a/elf/dl-cache.c | 29 | --- git.orig/elf/dl-cache.c |
30 | +++ b/elf/dl-cache.c | 30 | +++ git/elf/dl-cache.c |
31 | @@ -132,6 +132,10 @@ do \ | 31 | @@ -132,6 +132,10 @@ do \ |
32 | while (0) | 32 | while (0) |
33 | 33 | ||
@@ -39,11 +39,11 @@ index cfa335e..daa12ec 100644 | |||
39 | int | 39 | int |
40 | internal_function | 40 | internal_function |
41 | _dl_cache_libcmp (const char *p1, const char *p2) | 41 | _dl_cache_libcmp (const char *p1, const char *p2) |
42 | diff --git a/elf/dl-load.c b/elf/dl-load.c | 42 | Index: git/elf/dl-load.c |
43 | index c7b8797..37a1beb 100644 | 43 | =================================================================== |
44 | --- a/elf/dl-load.c | 44 | --- git.orig/elf/dl-load.c |
45 | +++ b/elf/dl-load.c | 45 | +++ git/elf/dl-load.c |
46 | @@ -106,8 +106,8 @@ static size_t max_capstrlen attribute_relro; | 46 | @@ -106,8 +106,8 @@ static size_t max_capstrlen attribute_re |
47 | /* Get the generated information about the trusted directories. */ | 47 | /* Get the generated information about the trusted directories. */ |
48 | #include "trusted-dirs.h" | 48 | #include "trusted-dirs.h" |
49 | 49 | ||
@@ -54,10 +54,10 @@ index c7b8797..37a1beb 100644 | |||
54 | { | 54 | { |
55 | SYSTEM_DIRS_LEN | 55 | SYSTEM_DIRS_LEN |
56 | }; | 56 | }; |
57 | diff --git a/elf/interp.c b/elf/interp.c | 57 | Index: git/elf/interp.c |
58 | index 9448802..e7e8c70 100644 | 58 | =================================================================== |
59 | --- a/elf/interp.c | 59 | --- git.orig/elf/interp.c |
60 | +++ b/elf/interp.c | 60 | +++ git/elf/interp.c |
61 | @@ -18,5 +18,5 @@ | 61 | @@ -18,5 +18,5 @@ |
62 | 62 | ||
63 | #include <runtime-linker.h> | 63 | #include <runtime-linker.h> |
@@ -65,10 +65,10 @@ index 9448802..e7e8c70 100644 | |||
65 | -const char __invoke_dynamic_linker__[] __attribute__ ((section (".interp"))) | 65 | -const char __invoke_dynamic_linker__[] __attribute__ ((section (".interp"))) |
66 | +const char __invoke_dynamic_linker__[4096] __attribute__ ((section (".interp"))) | 66 | +const char __invoke_dynamic_linker__[4096] __attribute__ ((section (".interp"))) |
67 | = RUNTIME_LINKER; | 67 | = RUNTIME_LINKER; |
68 | diff --git a/elf/ldconfig.c b/elf/ldconfig.c | 68 | Index: git/elf/ldconfig.c |
69 | index 467ca82..631a2a9 100644 | 69 | =================================================================== |
70 | --- a/elf/ldconfig.c | 70 | --- git.orig/elf/ldconfig.c |
71 | +++ b/elf/ldconfig.c | 71 | +++ git/elf/ldconfig.c |
72 | @@ -168,6 +168,9 @@ static struct argp argp = | 72 | @@ -168,6 +168,9 @@ static struct argp argp = |
73 | options, parse_opt, NULL, doc, NULL, more_help, NULL | 73 | options, parse_opt, NULL, doc, NULL, more_help, NULL |
74 | }; | 74 | }; |
@@ -79,10 +79,10 @@ index 467ca82..631a2a9 100644 | |||
79 | /* Check if string corresponds to an important hardware capability or | 79 | /* Check if string corresponds to an important hardware capability or |
80 | a platform. */ | 80 | a platform. */ |
81 | static int | 81 | static int |
82 | diff --git a/elf/rtld.c b/elf/rtld.c | 82 | Index: git/elf/rtld.c |
83 | index 647661c..4e16a43 100644 | 83 | =================================================================== |
84 | --- a/elf/rtld.c | 84 | --- git.orig/elf/rtld.c |
85 | +++ b/elf/rtld.c | 85 | +++ git/elf/rtld.c |
86 | @@ -99,6 +99,7 @@ uintptr_t __pointer_chk_guard_local | 86 | @@ -99,6 +99,7 @@ uintptr_t __pointer_chk_guard_local |
87 | strong_alias (__pointer_chk_guard_local, __pointer_chk_guard) | 87 | strong_alias (__pointer_chk_guard_local, __pointer_chk_guard) |
88 | #endif | 88 | #endif |
@@ -91,7 +91,7 @@ index 647661c..4e16a43 100644 | |||
91 | 91 | ||
92 | /* List of auditing DSOs. */ | 92 | /* List of auditing DSOs. */ |
93 | static struct audit_list | 93 | static struct audit_list |
94 | @@ -873,12 +874,12 @@ of this helper program; chances are you did not intend to run this program.\n\ | 94 | @@ -873,12 +874,12 @@ of this helper program; chances are you |
95 | --list list all dependencies and how they are resolved\n\ | 95 | --list list all dependencies and how they are resolved\n\ |
96 | --verify verify that given object really is a dynamically linked\n\ | 96 | --verify verify that given object really is a dynamically linked\n\ |
97 | object we can handle\n\ | 97 | object we can handle\n\ |
@@ -106,10 +106,10 @@ index 647661c..4e16a43 100644 | |||
106 | 106 | ||
107 | ++_dl_skip_args; | 107 | ++_dl_skip_args; |
108 | --_dl_argc; | 108 | --_dl_argc; |
109 | diff --git a/sysdeps/generic/dl-cache.h b/sysdeps/generic/dl-cache.h | 109 | Index: git/sysdeps/generic/dl-cache.h |
110 | index eb2f900..505804e 100644 | 110 | =================================================================== |
111 | --- a/sysdeps/generic/dl-cache.h | 111 | --- git.orig/sysdeps/generic/dl-cache.h |
112 | +++ b/sysdeps/generic/dl-cache.h | 112 | +++ git/sysdeps/generic/dl-cache.h |
113 | @@ -27,10 +27,6 @@ | 113 | @@ -27,10 +27,6 @@ |
114 | ((flags) == 1 || (flags) == _DL_CACHE_DEFAULT_ID) | 114 | ((flags) == 1 || (flags) == _DL_CACHE_DEFAULT_ID) |
115 | #endif | 115 | #endif |
@@ -121,9 +121,10 @@ index eb2f900..505804e 100644 | |||
121 | #ifndef add_system_dir | 121 | #ifndef add_system_dir |
122 | # define add_system_dir(dir) add_dir (dir) | 122 | # define add_system_dir(dir) add_dir (dir) |
123 | #endif | 123 | #endif |
124 | diff --git a/iconv/gconv_conf.c b/iconv/gconv_conf.c | 124 | Index: git/iconv/gconv_conf.c |
125 | --- a/iconv/gconv_conf.c | 125 | =================================================================== |
126 | +++ b/iconv/gconv_conf.c | 126 | --- git.orig/iconv/gconv_conf.c |
127 | +++ git/iconv/gconv_conf.c | ||
127 | @@ -36,7 +36,7 @@ | 128 | @@ -36,7 +36,7 @@ |
128 | 129 | ||
129 | 130 | ||
@@ -133,6 +134,38 @@ diff --git a/iconv/gconv_conf.c b/iconv/gconv_conf.c | |||
133 | 134 | ||
134 | /* The path elements, as determined by the __gconv_get_path function. | 135 | /* The path elements, as determined by the __gconv_get_path function. |
135 | All path elements end in a slash. */ | 136 | All path elements end in a slash. */ |
136 | -- | 137 | Index: git/locale/findlocale.c |
137 | 2.8.2 | 138 | =================================================================== |
138 | 139 | --- git.orig/locale/findlocale.c | |
140 | +++ git/locale/findlocale.c | ||
141 | @@ -56,7 +56,7 @@ struct __locale_data *const _nl_C[] attr | ||
142 | which are somehow addressed. */ | ||
143 | struct loaded_l10nfile *_nl_locale_file_list[__LC_LAST]; | ||
144 | |||
145 | -const char _nl_default_locale_path[] attribute_hidden = COMPLOCALEDIR; | ||
146 | +char _nl_default_locale_path[4096] __attribute__ ((section (".gccrelocprefix"))) attribute_hidden = COMPLOCALEDIR; | ||
147 | |||
148 | /* Checks if the name is actually present, that is, not NULL and not | ||
149 | empty. */ | ||
150 | @@ -168,7 +168,7 @@ _nl_find_locale (const char *locale_path | ||
151 | |||
152 | /* Nothing in the archive. Set the default path to search below. */ | ||
153 | locale_path = _nl_default_locale_path; | ||
154 | - locale_path_len = sizeof _nl_default_locale_path; | ||
155 | + locale_path_len = strlen(_nl_default_locale_path) + 1; | ||
156 | } | ||
157 | else | ||
158 | /* We really have to load some data. First see whether the name is | ||
159 | Index: git/locale/localeinfo.h | ||
160 | =================================================================== | ||
161 | --- git.orig/locale/localeinfo.h | ||
162 | +++ git/locale/localeinfo.h | ||
163 | @@ -322,7 +322,7 @@ _nl_lookup_word (locale_t l, int categor | ||
164 | } | ||
165 | |||
166 | /* Default search path if no LOCPATH environment variable. */ | ||
167 | -extern const char _nl_default_locale_path[] attribute_hidden; | ||
168 | +extern char _nl_default_locale_path[] attribute_hidden; | ||
169 | |||
170 | /* Load the locale data for CATEGORY from the file specified by *NAME. | ||
171 | If *NAME is "", use environment variables as specified by POSIX, and | ||