summaryrefslogtreecommitdiffstats
path: root/meta/recipes-devtools/binutils/binutils/0008-warn-for-uses-of-system-directories-when-cross-linki.patch
diff options
context:
space:
mode:
authorKhem Raj <raj.khem@gmail.com>2019-12-08 00:37:59 -0800
committerRichard Purdie <richard.purdie@linuxfoundation.org>2019-12-09 12:00:43 +0000
commitcf872ba730f96c47b9c36532b0a3a59cae98d0aa (patch)
tree93bf9b6282b7ef25a437edd753cb82664e963bf2 /meta/recipes-devtools/binutils/binutils/0008-warn-for-uses-of-system-directories-when-cross-linki.patch
parent50fec7cce59e74b999ae397cbe18f6e2f8f0e893 (diff)
downloadpoky-cf872ba730f96c47b9c36532b0a3a59cae98d0aa.tar.gz
binutils: Upgrade to 2.33.1
Drop CVE patches which are already available on binutils-2_33-branch Forward port rest of the patches (From OE-Core rev: 7bcfce05045fb7e10456aa1f5301e70c178f20d7) Signed-off-by: Khem Raj <raj.khem@gmail.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Diffstat (limited to 'meta/recipes-devtools/binutils/binutils/0008-warn-for-uses-of-system-directories-when-cross-linki.patch')
-rw-r--r--meta/recipes-devtools/binutils/binutils/0008-warn-for-uses-of-system-directories-when-cross-linki.patch60
1 files changed, 19 insertions, 41 deletions
diff --git a/meta/recipes-devtools/binutils/binutils/0008-warn-for-uses-of-system-directories-when-cross-linki.patch b/meta/recipes-devtools/binutils/binutils/0008-warn-for-uses-of-system-directories-when-cross-linki.patch
index 9727821b1f..655cc375a9 100644
--- a/meta/recipes-devtools/binutils/binutils/0008-warn-for-uses-of-system-directories-when-cross-linki.patch
+++ b/meta/recipes-devtools/binutils/binutils/0008-warn-for-uses-of-system-directories-when-cross-linki.patch
@@ -1,7 +1,7 @@
1From 98f68c0892ba4bbd53b0a0a4cbbdf0b7197e0320 Mon Sep 17 00:00:00 2001 1From 8ee1a4986ea35bd1e8ab867c5639d5fdbd944d9f Mon Sep 17 00:00:00 2001
2From: Khem Raj <raj.khem@gmail.com> 2From: Khem Raj <raj.khem@gmail.com>
3Date: Fri, 15 Jan 2016 06:31:09 +0000 3Date: Fri, 15 Jan 2016 06:31:09 +0000
4Subject: [PATCH 08/15] warn for uses of system directories when cross linking 4Subject: [PATCH] warn for uses of system directories when cross linking
5 5
62008-07-02 Joseph Myers <joseph@codesourcery.com> 62008-07-02 Joseph Myers <joseph@codesourcery.com>
7 7
@@ -62,8 +62,6 @@ Signed-off-by: Khem Raj <raj.khem@gmail.com>
62 ld/lexsup.c | 16 ++++++++++++++++ 62 ld/lexsup.c | 16 ++++++++++++++++
63 9 files changed, 86 insertions(+) 63 9 files changed, 86 insertions(+)
64 64
65diff --git a/ld/config.in b/ld/config.in
66index d93c9b0830..5da2742bea 100644
67--- a/ld/config.in 65--- a/ld/config.in
68+++ b/ld/config.in 66+++ b/ld/config.in
69@@ -31,6 +31,9 @@ 67@@ -31,6 +31,9 @@
@@ -76,11 +74,9 @@ index d93c9b0830..5da2742bea 100644
76 /* Additional extension a shared object might have. */ 74 /* Additional extension a shared object might have. */
77 #undef EXTRA_SHLIB_EXTENSION 75 #undef EXTRA_SHLIB_EXTENSION
78 76
79diff --git a/ld/configure b/ld/configure
80index 43c391c2b3..ff9f6b3c02 100755
81--- a/ld/configure 77--- a/ld/configure
82+++ b/ld/configure 78+++ b/ld/configure
83@@ -826,6 +826,7 @@ with_lib_path 79@@ -827,6 +827,7 @@ with_lib_path
84 enable_targets 80 enable_targets
85 enable_64_bit_bfd 81 enable_64_bit_bfd
86 with_sysroot 82 with_sysroot
@@ -88,7 +84,7 @@ index 43c391c2b3..ff9f6b3c02 100755
88 enable_gold 84 enable_gold
89 enable_got 85 enable_got
90 enable_compressed_debug_sections 86 enable_compressed_debug_sections
91@@ -1490,6 +1491,8 @@ Optional Features: 87@@ -1491,6 +1492,8 @@ Optional Features:
92 --disable-largefile omit support for large files 88 --disable-largefile omit support for large files
93 --enable-targets alternative target configurations 89 --enable-targets alternative target configurations
94 --enable-64-bit-bfd 64-bit support (on hosts with narrower word sizes) 90 --enable-64-bit-bfd 64-bit support (on hosts with narrower word sizes)
@@ -97,7 +93,7 @@ index 43c391c2b3..ff9f6b3c02 100755
97 --enable-gold[=ARG] build gold [ARG={default,yes,no}] 93 --enable-gold[=ARG] build gold [ARG={default,yes,no}]
98 --enable-got=<type> GOT handling scheme (target, single, negative, 94 --enable-got=<type> GOT handling scheme (target, single, negative,
99 multigot) 95 multigot)
100@@ -16618,6 +16621,19 @@ fi 96@@ -16619,6 +16622,19 @@ fi
101 97
102 98
103 99
@@ -117,8 +113,6 @@ index 43c391c2b3..ff9f6b3c02 100755
117 # Check whether --enable-gold was given. 113 # Check whether --enable-gold was given.
118 if test "${enable_gold+set}" = set; then : 114 if test "${enable_gold+set}" = set; then :
119 enableval=$enable_gold; case "${enableval}" in 115 enableval=$enable_gold; case "${enableval}" in
120diff --git a/ld/configure.ac b/ld/configure.ac
121index d335f21091..7f692d9387 100644
122--- a/ld/configure.ac 116--- a/ld/configure.ac
123+++ b/ld/configure.ac 117+++ b/ld/configure.ac
124@@ -94,6 +94,16 @@ AC_SUBST(use_sysroot) 118@@ -94,6 +94,16 @@ AC_SUBST(use_sysroot)
@@ -138,8 +132,6 @@ index d335f21091..7f692d9387 100644
138 dnl Use --enable-gold to decide if this linker should be the default. 132 dnl Use --enable-gold to decide if this linker should be the default.
139 dnl "install_as_default" is set to false if gold is the default linker. 133 dnl "install_as_default" is set to false if gold is the default linker.
140 dnl "installed_linker" is the installed BFD linker name. 134 dnl "installed_linker" is the installed BFD linker name.
141diff --git a/ld/ld.h b/ld/ld.h
142index b97d977f37..f3bbd2d55d 100644
143--- a/ld/ld.h 135--- a/ld/ld.h
144+++ b/ld/ld.h 136+++ b/ld/ld.h
145@@ -180,6 +180,14 @@ typedef struct 137@@ -180,6 +180,14 @@ typedef struct
@@ -157,11 +149,9 @@ index b97d977f37..f3bbd2d55d 100644
157 /* Big or little endian as set on command line. */ 149 /* Big or little endian as set on command line. */
158 enum endian_enum endian; 150 enum endian_enum endian;
159 151
160diff --git a/ld/ld.texi b/ld/ld.texi
161index 5179af3e0e..f78bf74682 100644
162--- a/ld/ld.texi 152--- a/ld/ld.texi
163+++ b/ld/ld.texi 153+++ b/ld/ld.texi
164@@ -2524,6 +2524,18 @@ string identifying the original linked file does not change. 154@@ -2557,6 +2557,18 @@ string identifying the original linked f
165 155
166 Passing @code{none} for @var{style} disables the setting from any 156 Passing @code{none} for @var{style} disables the setting from any
167 @code{--build-id} options earlier on the command line. 157 @code{--build-id} options earlier on the command line.
@@ -180,11 +170,9 @@ index 5179af3e0e..f78bf74682 100644
180 @end table 170 @end table
181 171
182 @c man end 172 @c man end
183diff --git a/ld/ldfile.c b/ld/ldfile.c
184index fcadc08c73..63e295ce8a 100644
185--- a/ld/ldfile.c 173--- a/ld/ldfile.c
186+++ b/ld/ldfile.c 174+++ b/ld/ldfile.c
187@@ -116,6 +116,23 @@ ldfile_add_library_path (const char *name, bfd_boolean cmdline) 175@@ -116,6 +116,23 @@ ldfile_add_library_path (const char *nam
188 new_dirs->name = concat (ld_sysroot, name + strlen ("$SYSROOT"), (const char *) NULL); 176 new_dirs->name = concat (ld_sysroot, name + strlen ("$SYSROOT"), (const char *) NULL);
189 else 177 else
190 new_dirs->name = xstrdup (name); 178 new_dirs->name = xstrdup (name);
@@ -208,24 +196,20 @@ index fcadc08c73..63e295ce8a 100644
208 } 196 }
209 197
210 /* Try to open a BFD for a lang_input_statement. */ 198 /* Try to open a BFD for a lang_input_statement. */
211diff --git a/ld/ldlex.h b/ld/ldlex.h
212index 32853debe4..8135361c49 100644
213--- a/ld/ldlex.h 199--- a/ld/ldlex.h
214+++ b/ld/ldlex.h 200+++ b/ld/ldlex.h
215@@ -148,6 +148,8 @@ enum option_values 201@@ -150,6 +150,8 @@ enum option_values
216 OPTION_REQUIRE_DEFINED_SYMBOL,
217 OPTION_ORPHAN_HANDLING,
218 OPTION_FORCE_GROUP_ALLOCATION, 202 OPTION_FORCE_GROUP_ALLOCATION,
203 OPTION_PRINT_MAP_DISCARDED,
204 OPTION_NO_PRINT_MAP_DISCARDED,
219+ OPTION_NO_POISON_SYSTEM_DIRECTORIES, 205+ OPTION_NO_POISON_SYSTEM_DIRECTORIES,
220+ OPTION_ERROR_POISON_SYSTEM_DIRECTORIES, 206+ OPTION_ERROR_POISON_SYSTEM_DIRECTORIES,
221 }; 207 };
222 208
223 /* The initial parser states. */ 209 /* The initial parser states. */
224diff --git a/ld/ldmain.c b/ld/ldmain.c
225index 77cdbd0dd2..725512f126 100644
226--- a/ld/ldmain.c 210--- a/ld/ldmain.c
227+++ b/ld/ldmain.c 211+++ b/ld/ldmain.c
228@@ -269,6 +269,8 @@ main (int argc, char **argv) 212@@ -270,6 +270,8 @@ main (int argc, char **argv)
229 command_line.warn_mismatch = TRUE; 213 command_line.warn_mismatch = TRUE;
230 command_line.warn_search_mismatch = TRUE; 214 command_line.warn_search_mismatch = TRUE;
231 command_line.check_section_addresses = -1; 215 command_line.check_section_addresses = -1;
@@ -234,13 +218,11 @@ index 77cdbd0dd2..725512f126 100644
234 218
235 /* We initialize DEMANGLING based on the environment variable 219 /* We initialize DEMANGLING based on the environment variable
236 COLLECT_NO_DEMANGLE. The gcc collect2 program will demangle the 220 COLLECT_NO_DEMANGLE. The gcc collect2 program will demangle the
237diff --git a/ld/lexsup.c b/ld/lexsup.c
238index 88e85c73f4..eed1b71456 100644
239--- a/ld/lexsup.c 221--- a/ld/lexsup.c
240+++ b/ld/lexsup.c 222+++ b/ld/lexsup.c
241@@ -543,6 +543,14 @@ static const struct ld_option ld_options[] = 223@@ -549,6 +549,14 @@ static const struct ld_option ld_options
242 { {"orphan-handling", required_argument, NULL, OPTION_ORPHAN_HANDLING}, 224 { {"no-print-map-discarded", no_argument, NULL, OPTION_NO_PRINT_MAP_DISCARDED},
243 '\0', N_("=MODE"), N_("Control how orphan sections are handled."), 225 '\0', NULL, N_("Do not show discarded sections in map file output"),
244 TWO_DASHES }, 226 TWO_DASHES },
245+ { {"no-poison-system-directories", no_argument, NULL, 227+ { {"no-poison-system-directories", no_argument, NULL,
246+ OPTION_NO_POISON_SYSTEM_DIRECTORIES}, 228+ OPTION_NO_POISON_SYSTEM_DIRECTORIES},
@@ -253,10 +235,10 @@ index 88e85c73f4..eed1b71456 100644
253 }; 235 };
254 236
255 #define OPTION_COUNT ARRAY_SIZE (ld_options) 237 #define OPTION_COUNT ARRAY_SIZE (ld_options)
256@@ -1577,6 +1585,14 @@ parse_args (unsigned argc, char **argv) 238@@ -1590,6 +1598,13 @@ parse_args (unsigned argc, char **argv)
257 einfo (_("%F%P: invalid argument to option" 239
258 " \"--orphan-handling\"\n")); 240 case OPTION_PRINT_MAP_DISCARDED:
259 break; 241 config.print_map_discarded = TRUE;
260+ 242+
261+ case OPTION_NO_POISON_SYSTEM_DIRECTORIES: 243+ case OPTION_NO_POISON_SYSTEM_DIRECTORIES:
262+ command_line.poison_system_directories = FALSE; 244+ command_line.poison_system_directories = FALSE;
@@ -264,10 +246,6 @@ index 88e85c73f4..eed1b71456 100644
264+ 246+
265+ case OPTION_ERROR_POISON_SYSTEM_DIRECTORIES: 247+ case OPTION_ERROR_POISON_SYSTEM_DIRECTORIES:
266+ command_line.error_poison_system_directories = TRUE; 248+ command_line.error_poison_system_directories = TRUE;
267+ break; 249 break;
268 } 250 }
269 } 251 }
270
271--
2722.20.1
273