import gcc-toolset-10-binutils-2.35-5.el8

This commit is contained in:
CentOS Sources 2020-08-12 18:27:42 +00:00 committed by Andrew Lukoshko
parent a9cd366097
commit b65d089b3d
6 changed files with 2099 additions and 6 deletions

View File

@ -0,0 +1,15 @@
--- binutils.orig/gold/fileread.cc 2019-08-06 14:22:08.669313110 +0100
+++ binutils-2.32/gold/fileread.cc 2019-08-06 14:22:28.799177543 +0100
@@ -381,6 +381,12 @@ File_read::do_read(off_t start, section_
ssize_t bytes;
if (this->whole_file_view_ != NULL)
{
+ // See PR 23765 for an example of a testcase that triggers this error.
+ if (((ssize_t) start) < 0)
+ gold_fatal(_("%s: read failed, starting offset (%#llx) less than zero"),
+ this->filename().c_str(),
+ static_cast<long long>(start));
+
bytes = this->size_ - start;
if (static_cast<section_size_type>(bytes) >= size)
{

View File

@ -0,0 +1,27 @@
diff -rup binutils.orig/bfd/elfnn-aarch64.c binutils-2.35/bfd/elfnn-aarch64.c
--- binutils.orig/bfd/elfnn-aarch64.c 2020-07-30 17:20:30.607580720 +0100
+++ binutils-2.35/bfd/elfnn-aarch64.c 2020-07-30 17:22:45.629741124 +0100
@@ -9513,8 +9513,10 @@ elfNN_aarch64_init_small_plt0_entry (bfd
memcpy (htab->root.splt->contents, htab->plt0_entry,
htab->plt_header_size);
- elf_section_data (htab->root.splt->output_section)->this_hdr.sh_entsize =
- htab->plt_header_size;
+ /* PR 26312: Explicitly set the sh_entsize to 0 so that
+ consumers do not think that the section contains fixed
+ sized objects. */
+ elf_section_data (htab->root.splt->output_section)->this_hdr.sh_entsize = 0;
plt_got_2nd_ent = (htab->root.sgotplt->output_section->vma
+ htab->root.sgotplt->output_offset
@@ -9616,10 +9618,6 @@ elfNN_aarch64_finish_dynamic_sections (b
{
elfNN_aarch64_init_small_plt0_entry (output_bfd, htab);
- elf_section_data (htab->root.splt->output_section)->
- this_hdr.sh_entsize = htab->plt_entry_size;
-
-
if (htab->root.tlsdesc_plt && !(info->flags & DF_BIND_NOW))
{
BFD_ASSERT (htab->root.tlsdesc_got != (bfd_vma)-1);

File diff suppressed because it is too large Load Diff

View File

@ -0,0 +1,36 @@
--- binutils.orig/bfd/elflink.c 2020-07-31 10:45:48.747912761 +0100
+++ binutils-2.35/bfd/elflink.c 2020-07-31 10:47:26.336262770 +0100
@@ -505,6 +505,16 @@ bfd_elf_link_record_dynamic_symbol (stru
const char *name;
size_t indx;
+ if (h->root.type == bfd_link_hash_defined
+ || h->root.type == bfd_link_hash_defweak)
+ {
+ /* An IR symbol should not be made dynamic. */
+ if (h->root.u.def.section != NULL
+ && h->root.u.def.section->owner != NULL
+ && (h->root.u.def.section->owner->flags & BFD_PLUGIN) != 0)
+ return TRUE;
+ }
+
/* XXX: The ABI draft says the linker must turn hidden and
internal symbols into STB_LOCAL symbols when producing the
DSO. However, if ld.so honors st_other in the dynamic table,
@@ -5199,15 +5209,11 @@ elf_link_add_object_symbols (bfd *abfd,
break;
}
- /* Don't add DT_NEEDED for references from the dummy bfd nor
- for unmatched symbol. */
if (!add_needed
&& matched
&& definition
&& ((dynsym
- && h->ref_regular_nonweak
- && (old_bfd == NULL
- || (old_bfd->flags & BFD_PLUGIN) == 0))
+ && h->ref_regular_nonweak)
|| (h->ref_dynamic_nonweak
&& (elf_dyn_lib_class (abfd) & DYN_AS_NEEDED) != 0
&& !on_needed_list (elf_dt_name (abfd),

View File

@ -0,0 +1,11 @@
--- binutils.orig/gas/as.c 2020-07-30 08:41:25.034236441 +0100
+++ binutils-2.35/gas/as.c 2020-07-30 08:41:52.197058041 +0100
@@ -103,7 +103,7 @@ int verbose = 0;
int flag_dwarf_cie_version = -1;
/* The maximum level of DWARF DEBUG information we should manufacture. */
-unsigned int dwarf_level = 0;
+unsigned int dwarf_level = 3;
#if defined OBJ_ELF || defined OBJ_MAYBE_ELF
int flag_use_elf_stt_common = DEFAULT_GENERATE_ELF_STT_COMMON;

View File

@ -5,7 +5,7 @@
Summary: A GNU collection of binary utilities
Name: %{?scl_prefix}%{?cross}binutils%{?_with_debug:-debug}
Version: 2.35
Release: 4%{?dist}
Release: 5%{?dist}
License: GPLv3+
URL: https://sourceware.org/binutils
@ -197,7 +197,7 @@ Patch11: binutils-do-not-link-with-static-libstdc++.patch
Patch12: binutils-attach-to-group.patch
# Purpose: Allow OS specific sections in section groups.
# Lifetime: Might be fixed in 2.33
# Lifetime: Fixed in 2.36 (maybe)
Patch13: binutils-special-sections-in-groups.patch
# Purpose: Have the GOLD linker generate PT_NOTE segments with 8-byte alignment.
@ -206,7 +206,7 @@ Patch14: binutils-gold-8-byte-note-segments.patch
# Purpose: Stop gold from aborting when input sections with the same name
# have different flags.
# Lifetime: 2.33 (probably)
# Lifetime: Fixed in 2.36 (maybe)
Patch15: binutils-gold-mismatched-section-flags.patch
# Purpose: Remove the builder id comment from bfd-stdint.h. It causes
@ -228,15 +228,15 @@ Patch18: binutils-ignore-duplicate-FDE-entries.patch
# Lifetime: Should be fixed in 2.36
Patch19: binutils-s390-build.patch
# Purpose: Fix problems exposed by compiling with gcc-10.
# Purpose: Fix LTO problems running config mini-builds.
# Lifetime: Should be fixed in 2.36.
Patch20: binutils-config.patch
# Purpose: Fix problems exposed by compiling with gcc-10.
# Purpose: Fix compile time warning messages building with gcc-10.
# Lifetime: Should be fixed in 2.36.
Patch21: binutils-warnings.patch
# Purpose: Fix problems exposed by compiling with gcc-10.
# Purpose: Fix compile time warning messages building with gcc-10. (part 2).
# Lifetime: Should be fixed in 2.36.
Patch22: binutils-gcc-10-fixes.patch
@ -249,6 +249,25 @@ Patch26: binutils-s390-ld-testsuite-fixes.patch
Patch27: binutils-i686-ld-testsuite-fixes.patch
Patch28: binutils-ppc-ld-testsuite-fixes.patch
# Purpose: Add a check to the GOLD linker for a corrupt input file
# with a fuzzed section offset.
# Lifetime: Fixed in 2.36 (maybe)
Patch29: binutils-CVE-2019-1010204.patch
# Purpose: Default to DWARF level 3 in the assembler.
# Lifetime: Fixed in 2.36.
Patch30: binutils-gas-dwarf-level-4.patch
# Purpose: Set the sh_entsize of the AArch64's PLT section to 0.
# Lifetime: Fixed in 2.36.
Patch31: binutils-aarch64-plt-sh_entsize.patch
# Purpose: Fixes for linking LTO objects.
# Lifetime: Fixed in 2.36
Patch32: binutils-add-sym-cache-to-elf-link-hash.patch
Patch33: binutils-elf-add-objects.patch
#----------------------------------------------------------------------------
Provides: bundled(libiberty)
@ -885,6 +904,10 @@ exit 0
#----------------------------------------------------------------------------
%changelog
* Tue Aug 11 2020 Nick Clifton <nickc@redhat.com> - 2.35-5
- Fix building with LTO enabled.
- Set the sh_entsize field of the AArch64's PLT section to 0. (PR 26312)
* Tue Jul 28 2020 Nick Clifton <nickc@redhat.com> - 2.35-4
- Fix testsuite failures.