From a9feeeb1fd8da4204b52003c1c8d504e4095ec48 Mon Sep 17 00:00:00 2001 From: CentOS Sources Date: Nov 06 2020 06:09:26 +0000 Subject: import binutils-2.30-84.el8 --- diff --git a/SOURCES/binutils-ld-IR-override.patch b/SOURCES/binutils-ld-IR-override.patch new file mode 100644 index 0000000..f0844cb --- /dev/null +++ b/SOURCES/binutils-ld-IR-override.patch @@ -0,0 +1,251 @@ +diff -rup binutils.orig/include/bfdlink.h binutils-2.30/include/bfdlink.h +--- binutils.orig/include/bfdlink.h 2020-11-02 10:04:27.457826514 +0000 ++++ binutils-2.30/include/bfdlink.h 2020-11-02 10:05:14.723537971 +0000 +@@ -339,6 +339,9 @@ struct bfd_link_info + /* TRUE if the LTO plugin is active. */ + unsigned int lto_plugin_active: 1; + ++ /* TRUE if all LTO IR symbols have been read. */ ++ unsigned int lto_all_symbols_read : 1; ++ + /* TRUE if global symbols in discarded sections should be stripped. */ + unsigned int strip_discarded: 1; + +diff -rup binutils.orig/ld/ldlang.c binutils-2.30/ld/ldlang.c +--- binutils.orig/ld/ldlang.c 2020-11-02 10:04:16.852890551 +0000 ++++ binutils-2.30/ld/ldlang.c 2020-11-02 10:06:12.285185841 +0000 +@@ -7162,6 +7162,7 @@ lang_process (void) + if (plugin_call_all_symbols_read ()) + einfo (_("%P%F: %s: plugin reported error after all symbols read\n"), + plugin_error_plugin ()); ++ link_info.lto_all_symbols_read = TRUE; + /* Open any newly added files, updating the file chains. */ + open_input_bfds (*added.tail, OPEN_BFD_NORMAL); + /* Restore the global list pointer now they have all been added. */ +diff -rup binutils.orig/ld/plugin.c binutils-2.30/ld/plugin.c +--- binutils.orig/ld/plugin.c 2020-11-02 10:04:16.852890551 +0000 ++++ binutils-2.30/ld/plugin.c 2020-11-02 10:08:11.010459546 +0000 +@@ -1355,12 +1355,16 @@ plugin_notice (struct bfd_link_info *inf + new value from a real BFD. Weak symbols are not normally + overridden by a new weak definition, and strong symbols + will normally cause multiple definition errors. Avoid +- this by making the symbol appear to be undefined. */ +- if (((h->type == bfd_link_hash_defweak +- || h->type == bfd_link_hash_defined) +- && is_ir_dummy_bfd (sym_bfd = h->u.def.section->owner)) +- || (h->type == bfd_link_hash_common +- && is_ir_dummy_bfd (sym_bfd = h->u.c.p->section->owner))) ++ this by making the symbol appear to be undefined. ++ ++ NB: We change the previous definition in the IR object to ++ undefweak only after all LTO symbols have been read. */ ++ if (info->lto_all_symbols_read ++ && (((h->type == bfd_link_hash_defweak ++ || h->type == bfd_link_hash_defined) ++ && is_ir_dummy_bfd (sym_bfd = h->u.def.section->owner)) ++ || (h->type == bfd_link_hash_common ++ && is_ir_dummy_bfd (sym_bfd = h->u.c.p->section->owner)))) + { + h->type = bfd_link_hash_undefweak; + h->u.undef.abfd = sym_bfd; +diff -rup binutils.orig/ld/testsuite/ld-plugin/lto.exp binutils-2.30/ld/testsuite/ld-plugin/lto.exp +--- binutils.orig/ld/testsuite/ld-plugin/lto.exp 2020-11-02 10:04:16.926890104 +0000 ++++ binutils-2.30/ld/testsuite/ld-plugin/lto.exp 2020-11-02 10:12:09.551000288 +0000 +@@ -214,6 +214,36 @@ set lto_link_tests [list \ + [list "Build pr22502b.o" \ + "$plug_opt" "-flto $lto_no_fat" \ + {pr22502b.c}] \ ++ [list "Build pr26262b.o" \ ++ "" "-O2" \ ++ {pr26262b.c} {} "" "c"] \ ++ [list "Build pr26262c.o" \ ++ "" "-O2" \ ++ {pr26262c.c} {} "" "c"] \ ++ [list "Build pr26267a.o" \ ++ "" "-O2 -flto $lto_no_fat" \ ++ {pr26267a.c} {} "" "c"] \ ++ [list "Build pr26267b.o" \ ++ "" "-O2" \ ++ {pr26267b.c} {} "" "c"] \ ++ [list "Build pr26267c.o" \ ++ "" "-O2" \ ++ {pr26267c.c} {} "" "c"] \ ++ [list "Build pr26267a" \ ++ "" "-O2" \ ++ {pr26267a.c} {} "" "c"] \ ++ [list "Build pr26267a" \ ++ "-flto tmpdir/pr26267a.o tmpdir/pr26267b.o tmpdir/pr26267c.o" \ ++ "-flto $lto_no_fat" \ ++ {dummy.c} \ ++ {{error_output "pr26267.err"}} \ ++ "pr26267a"] \ ++ [list "Build pr26267b" \ ++ "-flto tmpdir/pr26267b.o tmpdir/pr26267c.o tmpdir/pr26267a.o" \ ++ "-flto $lto_no_fat" \ ++ {dummy.c} \ ++ {{error_output "pr26267.err"}} \ ++ "pr26267b"] \ + ] + + if { [at_least_gcc_version 4 7] } { +@@ -373,6 +403,16 @@ set lto_run_tests [list \ + [list "Run pr22502" \ + "-O2 -flto tmpdir/pr22502a.o tmpdir/pr22502b.o" "" \ + {dummy.c} "pr20267" "pass.out" "-flto -O2" "c"] \ ++ [list "Run pr26262a" \ ++ "-O2 -flto" "" \ ++ {pr26262a.c} "pr26262a" "pass.out" \ ++ "-flto -O2" "c" "" \ ++ "tmpdir/pr26262b.o tmpdir/pr26262c.o"] \ ++ [list "Run pr26262b" \ ++ "-flto -O2 tmpdir/pr26262b.o tmpdir/pr26262c.o" "" \ ++ {pr26262a.c} "pr26262b" "pass.out" \ ++ "-flto -O2" "c" "" \ ++ ""] \ + ] + + if { [at_least_gcc_version 4 7] } { +Only in binutils-2.30/ld/testsuite/ld-plugin: pr26262a.c +Only in binutils-2.30/ld/testsuite/ld-plugin: pr26262b.c +Only in binutils-2.30/ld/testsuite/ld-plugin: pr26267.err +Only in binutils-2.30/ld/testsuite/ld-plugin: pr26267a.c +Only in binutils-2.30/ld/testsuite/ld-plugin: pr26267b.c +Only in binutils-2.30/ld/testsuite/ld-plugin: pr26267c.c +--- /dev/null 2020-11-02 08:23:19.196542384 +0000 ++++ binutils-2.30/ld/testsuite/ld-plugin/pr26262a.c 2020-11-02 10:13:16.624589913 +0000 +@@ -0,0 +1,21 @@ ++#include ++ ++int counter; ++extern void foo (void); ++extern void xxx (void); ++ ++void ++bar (void) ++{ ++} ++ ++int ++main(void) ++{ ++ bar (); ++ foo (); ++ xxx (); ++ if (counter == 1) ++ printf ("PASS\n"); ++ return 0; ++} +--- /dev/null 2020-11-02 08:23:19.196542384 +0000 ++++ binutils-2.30/ld/testsuite/ld-plugin/pr26262b.c 2020-11-02 10:13:27.358523487 +0000 +@@ -0,0 +1,16 @@ ++#include ++ ++extern int counter; ++ ++void ++foo (void) ++{ ++ counter++; ++} ++ ++__attribute__((weak)) ++void ++bar (void) ++{ ++ abort (); ++} +--- /dev/null 2020-11-02 08:23:19.196542384 +0000 ++++ binutils-2.30/ld/testsuite/ld-plugin/pr26262c.c 2020-11-02 10:47:59.031665605 +0000 +@@ -0,0 +1,6 @@ ++extern void bar (void); ++void ++xxx (void) ++{ ++ bar (); ++} +--- /dev/null 2020-11-02 08:23:19.196542384 +0000 ++++ binutils-2.30/ld/testsuite/ld-plugin/pr26267c.c 2020-11-02 10:13:39.665447327 +0000 +@@ -0,0 +1,6 @@ ++extern void bar (void); ++void ++xxx (void) ++{ ++ bar (); ++} +--- /dev/null 2020-11-02 08:23:19.196542384 +0000 ++++ binutils-2.30/ld/testsuite/ld-plugin/pr26267b.c 2020-11-02 10:13:43.648422679 +0000 +@@ -0,0 +1,15 @@ ++#include ++ ++extern int counter; ++ ++void ++foo (void) ++{ ++ counter++; ++} ++ ++void ++bar (void) ++{ ++ abort (); ++} +--- /dev/null 2020-11-02 08:23:19.196542384 +0000 ++++ binutils-2.30/ld/testsuite/ld-plugin/pr26267a.c 2020-11-02 10:13:47.556398495 +0000 +@@ -0,0 +1,21 @@ ++#include ++ ++int counter; ++extern void foo (void); ++extern void xxx (void); ++ ++void ++bar (void) ++{ ++} ++ ++int ++main(void) ++{ ++ bar (); ++ foo (); ++ xxx (); ++ if (counter == 1) ++ printf ("PASS\n"); ++ return 0; ++} +--- /dev/null 2020-11-02 08:23:19.196542384 +0000 ++++ binutils-2.30/ld/testsuite/ld-plugin/pr26267.err 2020-11-02 10:14:01.785310441 +0000 +@@ -0,0 +1,3 @@ ++#... ++.*: multiple definition of `bar'; .* ++#... +diff -rup binutils.orig/ld/testsuite/ld-plugin/pr26267.err binutils-2.30/ld/testsuite/ld-plugin/pr26267.err +--- binutils.orig/ld/testsuite/ld-plugin/pr26267.err 2020-11-02 12:51:28.751137533 +0000 ++++ binutils-2.30/ld/testsuite/ld-plugin/pr26267.err 2020-11-02 13:01:38.430679516 +0000 +@@ -1,3 +1,3 @@ + #... +-.*: multiple definition of `bar'; .* ++.*: multiple definition of `bar'.* + #... +--- binutils.orig/ld/testsuite/ld-plugin/lto.exp 2020-11-02 12:51:28.751137533 +0000 ++++ binutils-2.30/ld/testsuite/ld-plugin/lto.exp 2020-11-02 13:10:49.531708566 +0000 +@@ -404,15 +404,13 @@ set lto_run_tests [list \ + "-O2 -flto tmpdir/pr22502a.o tmpdir/pr22502b.o" "" \ + {dummy.c} "pr20267" "pass.out" "-flto -O2" "c"] \ + [list "Run pr26262a" \ +- "-O2 -flto" "" \ ++ "-O2 -flto tmpdir/pr26262b.o tmpdir/pr26262c.o" "" \ + {pr26262a.c} "pr26262a" "pass.out" \ +- "-flto -O2" "c" "" \ +- "tmpdir/pr26262b.o tmpdir/pr26262c.o"] \ ++ "-flto -O2" "c" "" ] \ + [list "Run pr26262b" \ + "-flto -O2 tmpdir/pr26262b.o tmpdir/pr26262c.o" "" \ + {pr26262a.c} "pr26262b" "pass.out" \ +- "-flto -O2" "c" "" \ +- ""] \ ++ "-flto -O2" "c" "" ] \ + ] + + if { [at_least_gcc_version 4 7] } { diff --git a/SOURCES/binutils-plugin-as-needed.patch b/SOURCES/binutils-plugin-as-needed.patch new file mode 100644 index 0000000..546d77e --- /dev/null +++ b/SOURCES/binutils-plugin-as-needed.patch @@ -0,0 +1,138 @@ +diff -rup binutils.orig/ld/testsuite/ld-plugin/lto.exp binutils-2.35.1/ld/testsuite/ld-plugin/lto.exp +--- binutils.orig/ld/testsuite/ld-plugin/lto.exp 2020-10-09 11:46:13.571665439 +0100 ++++ binutils-2.35.1/ld/testsuite/ld-plugin/lto.exp 2020-10-09 11:47:59.113302758 +0100 +@@ -319,27 +319,6 @@ set lto_link_elf_tests [list \ + [list "PR ld/13244" \ + "-shared -O2 -fPIC -flto -fuse-linker-plugin -nostdlib" "-O2 -fno-early-inlining -flto" \ + {pr13244.c} {{"readelf" {-s --wide} "pr13244.d"}} "pr13244.so" "c"] \ +- [list "Build libpr15146a.a" \ +- "$plug_opt" "-flto -O2" \ +- {pr15146a.c} {} "lib15146a.a"] \ +- [list "Build pr15146b.so" \ +- "-shared" "-O2 -fpic" \ +- {pr15146b.c} {} "pr15146b.so" "c"] \ +- [list "Build pr15146c.so" \ +- "-shared -Wl,--no-as-needed tmpdir/pr15146b.so" "-O2 -fpic" \ +- {pr15146c.c} {} "pr15146c.so" "c"] \ +- [list "PR ld/15146 (1)" \ +- "-O2 -flto -fuse-linker-plugin -Wl,-rpath-link,. -Wl,--no-copy-dt-needed-entries -Wl,--no-as-needed tmpdir/pr15146a.o tmpdir/pr15146c.so" "" \ +- {dummy.c} {{"readelf" {-d} "pr15146.d"}} "pr15146a.exe"] \ +- [list "Build libpr15146d.a" \ +- "$plug_opt" "-flto -O2" \ +- {pr15146d.c} {} "lib15146d.a"] \ +- [list "Build libpr16746a.a" \ +- "" "" \ +- {pr16746a.c pr16746b.c} {} "lib15146a.a"] \ +- [list "Build libpr16746b.a" \ +- "$plug_opt" "-O2 -flto" \ +- {pr16746c.c pr16746d.c} {} "lib15146b.a"] \ + [list "PR ld/16746 (1)" \ + "-O2 -flto -fuse-linker-plugin tmpdir/pr16746a.o tmpdir/pr16746c.o" "-O2 -flto" \ + {dummy.c} {} "pr16746a.exe"] \ +@@ -602,13 +581,6 @@ run_cc_link_tests $lto_compile_elf_tests + # Restrict these to ELF targets that support shared libs and PIC. + if { [is_elf_format] && [check_lto_shared_available] } { + run_cc_link_tests $lto_link_elf_tests +- set testname "PR ld/15146 (2)" +- set exec_output [run_host_cmd "$CC" "-O2 -flto -fuse-linker-plugin -Wl,-rpath-link,. -Wl,--no-copy-dt-needed-entries -Wl,--no-as-needed tmpdir/pr15146d.o tmpdir/pr15146c.so"] +- if { [ regexp "undefined reference to symbol '\\.?xxx'" $exec_output ] } { +- pass $testname +- } { +- fail $testname +- } + set testname "PR ld/16746 (3)" + set exec_output [run_host_cmd "$CC" "-O2 -flto -fuse-linker-plugin tmpdir/pr16746b.o tmpdir/pr16746d.o"] + if { [ regexp "warning: \\.?foobar" $exec_output ] && ![ regexp "symbol from plugin" $exec_output ] } { + +diff -rup binutils.orig/bfd/elflink.c binutils-2.35.1/bfd/elflink.c +--- binutils.orig/bfd/elflink.c 2020-10-09 11:46:14.151663446 +0100 ++++ binutils-2.35.1/bfd/elflink.c 2020-10-09 11:46:27.222618528 +0100 +@@ -4970,11 +4970,7 @@ elf_link_add_object_symbols (bfd *abfd, + object and a shared object. */ + bfd_boolean dynsym = FALSE; + +- /* Plugin symbols aren't normal. Don't set def_regular or +- ref_regular for them, or make them dynamic. */ +- if ((abfd->flags & BFD_PLUGIN) != 0) +- ; +- else if (! dynamic) ++ if (! dynamic) + { + if (! definition) + { +@@ -5155,10 +5151,6 @@ elf_link_add_object_symbols (bfd *abfd, + && !bfd_link_relocatable (info)) + dynsym = FALSE; + +- /* Nor should we make plugin symbols dynamic. */ +- if ((abfd->flags & BFD_PLUGIN) != 0) +- dynsym = FALSE; +- + if (definition) + { + h->target_internal = isym->st_target_internal; +@@ -5185,7 +5177,7 @@ elf_link_add_object_symbols (bfd *abfd, + } + } + +- if (dynsym && h->dynindx == -1) ++ if (dynsym && (abfd->flags & BFD_PLUGIN) == 0 && h->dynindx == -1) + { + if (! bfd_elf_link_record_dynamic_symbol (info, h)) + goto error_free_vers; + +--- binutils.orig/ld/testsuite/ld-plugin/lto.exp 2020-10-28 12:23:49.034685727 +0000 ++++ binutils-2.30/ld/testsuite/ld-plugin/lto.exp 2020-10-28 12:24:48.288484833 +0000 +@@ -265,12 +265,6 @@ set lto_link_elf_tests [list \ + [list "PR ld/13244" \ + "-shared -O2 -fPIC -flto -fuse-linker-plugin -nostdlib" "-O2 -fno-early-inlining -flto" \ + {pr13244.c} {{"readelf" {-s --wide} "pr13244.d"}} "pr13244.so" "c"] \ +- [list "PR ld/16746 (1)" \ +- "-O2 -flto -fuse-linker-plugin tmpdir/pr16746a.o tmpdir/pr16746c.o" "-O2 -flto" \ +- {dummy.c} {} "pr16746a.exe"] \ +- [list "PR ld/16746 (2)" \ +- "-O2 -flto -fuse-linker-plugin tmpdir/pr16746c.o tmpdir/pr16746a.o" "-O2 -flto" \ +- {dummy.c} {} "pr16746b.exe"] \ + [list "Build pr21382a.o" \ + "" "-O2 -flto" \ + {pr21382a.c} {} "" "c"] \ +@@ -424,25 +418,6 @@ run_cc_link_tests $lto_link_tests + # by some elf tests besides shared libs tests. So, always compile them. + run_cc_link_tests $lto_compile_elf_tests + +-# Restrict these to ELF targets that support shared libs and PIC. +-if { [is_elf_format] && [check_lto_shared_available] } { +- run_cc_link_tests $lto_link_elf_tests +- set testname "PR ld/16746 (3)" +- set exec_output [run_host_cmd "$CC" "-O2 -flto -fuse-linker-plugin tmpdir/pr16746b.o tmpdir/pr16746d.o"] +- if { [ regexp "warning: \\.?foobar" $exec_output ] && ![ regexp "symbol from plugin" $exec_output ] } { +- pass $testname +- } { +- fail $testname +- } +- set testname "PR ld/16746 (4)" +- set exec_output [run_host_cmd "$CC" "-O2 -flto -fuse-linker-plugin tmpdir/pr16746d.o tmpdir/pr16746b.o"] +- if { [ regexp "warning: \\.?foobar" $exec_output ] && ![ regexp "symbol from plugin" $exec_output ] } { +- pass $testname +- } { +- fail $testname +- } +-} +- + set testname "Build liblto-11.a" + remote_file host delete "tmpdir/liblto-11.a" + set catch_output [run_host_cmd "$ar" "rc $plug_opt tmpdir/liblto-11.a tmpdir/lto-11a.o tmpdir/lto-11b.o tmpdir/lto-11c.o"] +--- binutils.orig/ld/testsuite/ld-plugin/lto.exp 2020-10-28 12:47:18.581911539 +0000 ++++ binutils-2.30/ld/testsuite/ld-plugin/lto.exp 2020-10-28 12:50:25.048280769 +0000 +@@ -418,6 +418,11 @@ run_cc_link_tests $lto_link_tests + # by some elf tests besides shared libs tests. So, always compile them. + run_cc_link_tests $lto_compile_elf_tests + ++# Restrict these to ELF targets that support shared libs and PIC. ++if { [is_elf_format] && [check_lto_shared_available] } { ++ run_cc_link_tests $lto_link_elf_tests ++} ++ + set testname "Build liblto-11.a" + remote_file host delete "tmpdir/liblto-11.a" + set catch_output [run_host_cmd "$ar" "rc $plug_opt tmpdir/liblto-11.a tmpdir/lto-11a.o tmpdir/lto-11b.o tmpdir/lto-11c.o"] diff --git a/SOURCES/binutils-s390-ld-test-fixes.patch b/SOURCES/binutils-s390-ld-test-fixes.patch index 9ece7ec..f41db18 100644 --- a/SOURCES/binutils-s390-ld-test-fixes.patch +++ b/SOURCES/binutils-s390-ld-test-fixes.patch @@ -29,23 +29,6 @@ diff -rup binutils.orig/ld/testsuite/ld-plugin/lto.exp binutils-2.30/ld/testsuit {pr12942b.cc} {} "" "c++"] \ ]] } -@@ -547,13 +547,16 @@ if { [at_least_gcc_version 4 7] } { - } - - # Run "ld -r" to generate inputs for complex LTO tests. -+setup_xfail "*-*-*" - run_dump_test "lto-3r" - remote_exec host "mv" "tmpdir/dump tmpdir/lto-3.o" -+setup_xfail "*-*-*" - run_dump_test "lto-5r" - remote_exec host "mv" "tmpdir/dump tmpdir/lto-5.o" - - run_cc_link_tests $lto_link_symbol_tests - -+setup_xfail "*-*-*" - run_ld_link_tests [list \ - [list "PR ld/19317 (2)" \ - "-r tmpdir/pr19317.o" "" "" \ diff -rup binutils.orig/ld/testsuite/ld-plugin/plugin-10.d binutils-2.30/ld/testsuite/ld-plugin/plugin-10.d --- binutils.orig/ld/testsuite/ld-plugin/plugin-10.d 2020-04-06 13:46:34.060525235 +0100 +++ binutils-2.30/ld/testsuite/ld-plugin/plugin-10.d 2020-04-06 14:22:06.280196979 +0100 diff --git a/SOURCES/binutils-strip-merge.patch b/SOURCES/binutils-strip-merge.patch new file mode 100644 index 0000000..dec9bc8 --- /dev/null +++ b/SOURCES/binutils-strip-merge.patch @@ -0,0 +1,19 @@ +--- binutils.orig/binutils/objcopy.c 2020-10-30 14:21:10.448328799 +0000 ++++ binutils-2.30/binutils/objcopy.c 2020-10-30 14:22:08.406136672 +0000 +@@ -3257,14 +3257,12 @@ copy_object (bfd *ibfd, bfd *obfd, const + /* It is likely that output sections are in the same order + as the input sections, but do not assume that this is + the case. */ +- if (strcmp (bfd_section_name (obfd, merged->sec), +- bfd_section_name (obfd, osec)) != 0) ++ if (merged->sec->output_section != osec) + { + for (merged = merged_note_sections; + merged != NULL; + merged = merged->next) +- if (strcmp (bfd_section_name (obfd, merged->sec), +- bfd_section_name (obfd, osec)) == 0) ++ if (merged->sec->output_section == osec) + break; + + if (merged == NULL) diff --git a/SPECS/binutils.spec b/SPECS/binutils.spec index b8b8bab..a6f6f2f 100644 --- a/SPECS/binutils.spec +++ b/SPECS/binutils.spec @@ -1,31 +1,51 @@ -# Binutils SPEC file. Can be invoked with the following parameters: + +Summary: A GNU collection of binary utilities +Name: %{?cross}binutils%{?_with_debug:-debug} +Version: 2.30 +Release: 84%{?dist} +License: GPLv3+ +URL: https://sourceware.org/binutils + +#---------------------------------------------------------------------------- + +# Binutils SPEC file. Can be invoked with the following parameters to change +# the default behaviour: # --define "binutils_target arm-linux-gnu" to create arm-linux-gnu-binutils. -# --with=bootstrap: Build with minimal dependencies. -# --with=debug: Build without optimizations and without splitting the debuginfo. -# --without=docs: Skip building documentation. -# --without=testsuite: Do not run the testsuite. Default is to run it. -# --with=testsuite: Run the testsuite. Default when --with=debug is not to run it. +# +# --with bootstrap Build with minimal dependencies. +# --with debug Build without optimizations and without splitting +# the debuginfo into a separate file. +# --without docs Skip building documentation. +# --without testsuite Do not run the testsuite. Default is to run it. +# --without gold Disable building of the GOLD linker. +# --with clang To force building with the CLANG. +# --without debuginfod Disable support for debuginfod. #---Start of Configure Options----------------------------------------------- -# Do not create deterministic archives by default (cf: BZ 1195883) +# Create deterministic archives (ie ones without timestamps). +# Default is off because of BZ 1195883. %define enable_deterministic_archives 0 # Enable support for GCC LTO compilation. +# Disable if it is necessary to work around bugs in LTO. %define enable_lto 1 -# Disable the default generation of compressed debug sections. +# Enable the compression of debug sections as default behaviour of the +# assembler and linker. This option is disabled for now. The assembler and +# linker have command line options to override the default behaviour. %define default_compress_debug 0 # Default to read-only-relocations (relro) in shared binaries. +# This is enabled as a security feature. %define default_relro 1 -# Disable the default generation of GNU Build notes by the assembler. -# This has turned out to be problematic for the i686 architecture. -# although the exact reason has not been determined. (See BZ 1572485) -# It also breaks building EFI binaries on AArch64, as these cannot have -# relocations against absolute symbols. +# Enable the default generation of GNU Build notes by the assembler. +# This option is disabled as it has turned out to be problematic for the i686 +# architecture, although the exact reason has not been determined. (See +# BZ 1572485). It also breaks building EFI binaries on AArch64, as these +# cannot have relocations against absolute symbols. %define default_generate_notes 0 # Enable thread support in the GOLD linker (if it is being built). This is @@ -66,19 +86,11 @@ #---------------------------------------------------------------------------- -Summary: A GNU collection of binary utilities -Name: %{?cross}binutils%{?_with_debug:-debug} -Version: 2.30 -Release: 79%{?dist} -License: GPLv3+ -URL: https://sourceware.org/binutils - # Note - the Linux Kernel binutils releases are too unstable and contain # too many controversial patches so we stick with the official FSF version # instead. Source: https://ftp.gnu.org/gnu/binutils/binutils-%{version}.tar.xz - Source2: binutils-2.19.50.0.1-output-format.sed %if %{with docs} @@ -126,7 +138,6 @@ Patch03: binutils-2.22.52.0.1-export-demangle.h.patch # order. Patch04: binutils-2.22.52.0.4-no-config-h-check.patch -# Purpose: Import H.J.Lu's Kernel LTO patch. # Lifetime: Permanent, but needs continual updating. # FIXME: Try removing.... Patch05: binutils-2.26-lto.patch @@ -478,6 +489,19 @@ Patch76: binutils-s390-alignment-hints.patch # Lifetime: Fixed in 2.32 Patch77: binutils-x86-gas-scaled-8-bit-displacements.patch +# Purpose: Allow plugin syms to mark as-needed shared libs needed. +# Lifetime: Fixed in 2.36 +Patch78: binutils-plugin-as-needed.patch + +# Purpose: Fix merging attributes in the presence of multiple +# same-named sections. +# Lifetime: Fixed in 2.36 +Patch79: binutils-strip-merge.patch + +# Purpose: Properlu override IR definitions +# Lifetime: Fixed in 2.35 +Patch80: binutils-ld-IR-override.patch + #---------------------------------------------------------------------------- Provides: bundled(libiberty) @@ -679,6 +703,9 @@ using libelf instead of BFD. %patch75 -p1 %patch76 -p1 %patch77 -p1 +%patch78 -p1 +%patch79 -p1 +%patch80 -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 ? @@ -1116,6 +1143,21 @@ exit 0 #---------------------------------------------------------------------------- %changelog +* Mon Nov 02 2020 Nick Clifton - 2.30-84 +- Fix problem in linker testsuite triggered by the as-needed update. (#1886071) + +* Fri Oct 30 2020 Nick Clifton - 2.30-83 +- Fix merging attributes in the presence of multiple same-named sections. (#1893197) + +* Wed Oct 28 2020 Nick Clifton - 2.30-82 +- Fix problem in linker testsuite triggered by the as-needed update. (#1886071) + +* Fri Oct 23 2020 Nick Clifton - 2.30-81 +- Allow plugin syms to mark as-needed shared libs needed. (#1886071) + +* Wed Sep 16 2020 Nick Clifton - 2.30-80 +- NVR Bump to allow rebuild. + * Fri Aug 21 2020 Nick Clifton - 2.30-79 - Fix x86 assembler's handling of non-8-bit displacements. (#1869401)