Skip to content
Snippets Groups Projects
Commit 6eaabf55 authored by CentOS Sources's avatar CentOS Sources
Browse files

import binutils-2.30-113.el8

parent c9d753a2
No related branches found
No related tags found
No related merge requests found
--- binutils.orig/bfd/elf-bfd.h 2021-09-20 16:06:58.320914954 +0100
+++ binutils-2.30/bfd/elf-bfd.h 2021-09-20 16:26:11.307770371 +0100
@@ -180,6 +180,8 @@ struct elf_link_hash_entry
/* Symbol has a non-weak reference from a non-shared object (other than
the object in which it is defined). */
unsigned int ref_regular_nonweak : 1;
+ /* Symbol has a non-weak reference from a LTO IR object file. */
+ unsigned int ref_ir_nonweak : 1;
/* Dynamic symbol has been adjustd. */
unsigned int dynamic_adjusted : 1;
/* Symbol needs a copy reloc. */
--- binutils.orig/bfd/elflink.c 2021-09-29 14:36:01.294185139 +0100
+++ binutils-2.30/bfd/elflink.c 2021-09-29 14:39:08.113874485 +0100
@@ -4663,7 +4663,12 @@ error_free_dyn:
/* Plugin symbols aren't normal. Don't set def/ref flags. */
if ((abfd->flags & BFD_PLUGIN) != 0)
- ;
+ {
+ /* Except for this flag to track nonweak references. */
+ if (!definition
+ && bind != STB_WEAK)
+ h->ref_ir_nonweak = 1;
+ }
else if (!dynamic)
{
if (! definition)
@@ -4906,11 +4911,13 @@ error_free_dyn:
if (!add_needed
&& matched
&& definition
+ && h->root.type != bfd_link_hash_indirect
&& ((dynsym
&& h->ref_regular_nonweak)
|| (old_bfd != NULL
&& (old_bfd->flags & BFD_PLUGIN) != 0
- && bind != STB_WEAK)
+ && h->ref_ir_nonweak
+ && !info->lto_all_symbols_read)
|| (h->ref_dynamic_nonweak
&& (elf_dyn_lib_class (abfd) & DYN_AS_NEEDED) != 0
&& !on_needed_list (elf_dt_name (abfd),
--- binutils.orig/bfd/plugin.c 2022-01-19 16:17:33.290999966 +0000
+++ binutils-2.30/bfd/plugin.c 2022-01-19 16:23:33.704473426 +0000
@@ -349,7 +349,7 @@ try_claim (bfd *abfd)
}
static int
-try_load_plugin (const char *pname, bfd *abfd, int *has_plugin_p)
+try_load_plugin (const char *pname, bfd *abfd, int *has_plugin_p, bfd_boolean build_list_p)
{
void *plugin_handle;
struct ld_plugin_tv tv[4];
@@ -362,7 +362,11 @@ try_load_plugin (const char *pname, bfd
plugin_handle = dlopen (pname, RTLD_NOW);
if (!plugin_handle)
{
- _bfd_error_handler ("%s\n", dlerror ());
+ /* If we are building a list of viable plugins, then
+ we do not bother the user with the details of any
+ plugins that cannot be loaded. */
+ if (! build_list_p)
+ _bfd_error_handler ("%s\n", dlerror ());
return 0;
}
@@ -477,7 +481,7 @@ load_plugin (bfd *abfd)
return found;
if (plugin_name)
- return try_load_plugin (plugin_name, abfd, &has_plugin);
+ return try_load_plugin (plugin_name, abfd, &has_plugin, FALSE);
if (plugin_program_name == NULL)
return found;
@@ -501,7 +505,7 @@ load_plugin (bfd *abfd)
full_name = concat (p, "/", ent->d_name, NULL);
if (stat(full_name, &s) == 0 && S_ISREG (s.st_mode))
- found = try_load_plugin (full_name, abfd, &valid_plugin);
+ found = try_load_plugin (full_name, abfd, &valid_plugin, TRUE);
if (has_plugin <= 0)
has_plugin = valid_plugin;
free (full_name);
This diff is collapsed.
diff -rup binutils-2.30/bfd/elflink.c binutils.new/bfd/elflink.c
--- binutils-2.30/bfd/elflink.c 2021-12-09 09:05:54.545468003 +0000
+++ binutils.new/bfd/elflink.c 2021-12-09 09:03:15.366632301 +0000
@@ -9980,7 +9980,7 @@ elf_link_output_extsym (struct bfd_hash_
if (h->verinfo.verdef == NULL
|| (elf_dyn_lib_class (h->verinfo.verdef->vd_bfd)
& (DYN_AS_NEEDED | DYN_DT_NEEDED | DYN_NO_NEEDED)))
- iversym.vs_vers = 0;
+ iversym.vs_vers = 1;
else
iversym.vs_vers = h->verinfo.verdef->vd_exp_refno + 1;
}
diff -rup binutils-2.30/ld/testsuite/ld-elfvers/vers16.dsym binutils.new/ld/testsuite/ld-elfvers/vers16.dsym
--- binutils-2.30/ld/testsuite/ld-elfvers/vers16.dsym 2018-01-13 13:31:16.000000000 +0000
+++ binutils.new/ld/testsuite/ld-elfvers/vers16.dsym 2021-12-09 09:05:03.730791511 +0000
@@ -1,2 +1,2 @@
[0-9a-f]+ g +DF (\.text|\.opd|\*ABS\*) [0-9a-f]+( +Base +)? (0x[0-9a-f]+ )?_?show_bar
-[0-9a-f]+ +DF \*UND\* [0-9a-f]+ +(0x[0-9a-f]+ )?_?show_foo
+[0-9a-f]+ +DF \*UND\* [0-9a-f]+ +Base +(0x[0-9a-f]+ )?_?show_foo
diff -rup binutils-2.30/ld/testsuite/ld-elfvers/vers6.dsym binutils.new/ld/testsuite/ld-elfvers/vers6.dsym
--- binutils-2.30/ld/testsuite/ld-elfvers/vers6.dsym 2018-01-13 13:31:16.000000000 +0000
+++ binutils.new/ld/testsuite/ld-elfvers/vers6.dsym 2021-12-09 09:04:45.778917378 +0000
@@ -1,4 +1,4 @@
-[0-9a-f]+ +DF \*UND\* [0-9a-f]+ +(0x[0-9a-f]+ )?_?show_foo
+[0-9a-f]+ +DF \*UND\* [0-9a-f]+ +Base +(0x[0-9a-f]+ )?_?show_foo
[0-9a-f]+ +DF \*UND\* [0-9a-f]+ +VERS_2.0 +(0x[0-9a-f]+ )?_?show_foo
[0-9a-f]+ +DF \*UND\* [0-9a-f]+ +VERS_1.2 +(0x[0-9a-f]+ )?_?show_foo
[0-9a-f]+ +DF \*UND\* [0-9a-f]+ +VERS_1.1 +(0x[0-9a-f]+ )?_?show_foo
......@@ -7,7 +7,7 @@ diff -rup binutils.orig/binutils/NEWS binutils-2.30/binutils/NEWS
+* Tools which display names or strings (readelf, strings, nm, objdump)
+ have a new command line option which controls how unicode characters are
+ handled. By default they are treated as normal for the tool. Using
+ --unicode=show will display them according to the current locale.
+ --unicode=locale will display them according to the current locale.
+ Using --unicode=hex will display them as hex byte values, whilst
+ --unicode=escape will display them as escape sequences. In addition
+ using --unicode=highlight will display them as unicode escape sequences
......
......@@ -43,7 +43,7 @@
Summary: A GNU collection of binary utilities
Name: binutils%{?name_cross}%{?_with_debug:-debug}
Version: 2.30
Release: 108%{?dist}.1
Release: 113%{?dist}
License: GPLv3+
URL: https://sourceware.org/binutils
......@@ -591,9 +591,25 @@ Patch91: binutils-clearing-discarded-relocs.patch
# Lifetime: Fixed in 2.37 (maybe)
Patch92: binutils-gold-i386-gnu-property-notes.patch
# Purpose: Fix problems with the binutils-plugin-as-needed.patch
# Lifetime: Fixed in 2.37
Patch93: binutils-plugin-as-needed-correct.patch
# Purpose: Add support for the arch14 extensions to the s390x architecture.
# Lifetime: Fixed in 2.37
Patch94: binutils-s390x-arch14.patch
# Purpose: Add options to control the display of multibyte characters. CVE 2021-42574
# Lifetime: Fixed in 2.38 (maybe)
Patch93: binutils.unicode.patch
Patch95: binutils.unicode.patch
# Purpose: Make undefined unversioned dynamic symbols global rather than local.
# Lifetime: Fixed in 2.37
Patch96: binutils-undefined-unversioned-symbols.patch
# Purpose: When searching for plugins, do not complain if incompatible ones are found.
# Lifetime: Fixed in 2.35
Patch97: binutils-plugin-error.patch
#----------------------------------------------------------------------------
......@@ -825,6 +841,10 @@ using libelf instead of BFD.
%patch91 -p1
%patch92 -p1
%patch93 -p1
%patch94 -p1
%patch95 -p1
%patch96 -p1
%patch97 -p1
# We cannot run autotools as there is an exact requirement of autoconf-2.59.
# FIXME - this is no longer true. Maybe try reinstating autotool use ?
......@@ -1274,8 +1294,20 @@ exit 0
#----------------------------------------------------------------------------
%changelog
* Wed Oct 20 2021 Nick Clifton <nickc@redhat.com> - 2.30-108.1
- Add ability to control the display of unicode characters. (#2009172)
* Wed Jan 19 2022 Nick Clifton <nickc@redhat.com> - 2.30-113
- When searching for plugins, do not complain if incompatible ones are found. (#2039117)
* Thu Dec 09 2021 Nick Clifton <nickc@redhat.com> - 2.30-112
- Make undefined unversioned dynamic symbols global rather than local. (#2005176)
* Mon Oct 25 2021 Nick Clifton <nickc@redhat.com> - 2.30-111
- Add ability to control the display of unicode characters. (#2009173)
* Wed Sep 29 2021 Nick Clifton <nickc@redhat.com> - 2.30-110
- Add support for the arch14 extensions to the s390x architecture. (#1984819)
* Wed Sep 29 2021 Nick Clifton <nickc@redhat.com> - 2.30-109
- Fix problems introduced by the plugin-as-needed patch. (#2005412)
* Wed Jul 07 2021 Nick Clifton <nickc@redhat.com> - 2.30-108
- Fix thinko in previous delta. (#1970961)
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment