The package rpms/cross-binutils.git has added or updated architecture specific content in
its
spec file (ExclusiveArch/ExcludeArch or %ifarch/%ifnarch) in commit(s):
https://src.fedoraproject.org/cgit/rpms/cross-binutils.git/commit/?id=157....
Change:
-%ifarch ppc64le
Thanks.
Full change:
============
commit 157c520bea40e7cb11a9ec2be2d84ef1b2add5b9
Author: David Howells <dhowells(a)redhat.com>
Date: Mon Nov 6 15:05:26 2017 +0000
- Sync with binutils-2.29.1-4.
- Add support for riscv64 arch (#1491955).
Resolves: #1491955
diff --git a/binutils-2.20.51.0.10-sec-merge-emit.patch
b/binutils-2.20.51.0.10-sec-merge-emit.patch
deleted file mode 100644
index 238beb3..0000000
--- a/binutils-2.20.51.0.10-sec-merge-emit.patch
+++ /dev/null
@@ -1,11 +0,0 @@
---- binutils-2.26.orig/bfd/merge.c 2016-01-25 10:11:33.505289018 +0000
-+++ binutils-2.26/bfd/merge.c 2016-01-25 10:19:56.961381656 +0000
-@@ -334,7 +334,7 @@ sec_merge_emit (bfd *abfd, struct sec_me
-
- /* Trailing alignment needed? */
- off = sec->size - off;
-- if (off != 0)
-+ if (off != 0 && alignment_power)
- {
- if (contents)
- memcpy (contents + offset, pad, off);
diff --git a/binutils-2.24-ldforcele.patch b/binutils-2.24-ldforcele.patch
deleted file mode 100644
index 194cf1e..0000000
--- a/binutils-2.24-ldforcele.patch
+++ /dev/null
@@ -1,54 +0,0 @@
-Common subdirectories: ../binutils-2.24.orig/ld/emulparams and ld/emulparams
-Common subdirectories: ../binutils-2.24.orig/ld/emultempl and ld/emultempl
-diff -up ../binutils-2.24.orig/ld/ldlang.c ld/ldlang.c
---- a/ld/ldlang.c 2014-05-09 10:35:04.589504928 +0100
-+++ b/ld/ldlang.c 2014-05-09 10:35:55.515661478 +0100
-@@ -7096,6 +7096,18 @@
- && little != NULL)
- format = little;
-
-+ if (getenv ("LD_FORCE_LE") != NULL)
-+ {
-+ if (strcmp (format, "elf64-powerpc") == 0)
-+ format = "elf64-powerpcle";
-+ else if (strcmp (format, "elf32-powerpc") == 0)
-+ format = "elf32-powerpcle";
-+ else if (strcmp (format, "elf64-big") == 0)
-+ format = "elf64-little";
-+ else if (strcmp (format, "elf32-big") == 0)
-+ format = "elf32-little";
-+ }
-+
- output_target = format;
- }
- }
-Only in ld: ldlang.c.orig
-diff -up ../binutils-2.24.orig/ld/ldmain.c ld/ldmain.c
---- a/ld/ldmain.c 2014-05-09 10:35:04.593504941 +0100
-+++ b/ld/ldmain.c 2014-05-09 10:35:55.515661478 +0100
-@@ -603,6 +603,18 @@
- }
- }
-
-+ if ((strncmp (emulation, "elf64ppc", 8) == 0
-+ || strncmp (emulation, "elf32ppc", 8) == 0)
-+ && getenv ("LD_FORCE_LE") != NULL)
-+ {
-+ size_t len = strlen (emulation);
-+ char *le = xmalloc (len + 2);
-+ memcpy (le, emulation, 5);
-+ le[5] = 'l';
-+ memcpy (le + 6, emulation + 5, len - 4);
-+ emulation = le;
-+ }
-+
- return emulation;
- }
-
-Only in ld: ldmain.c.orig
-Common subdirectories: ../binutils-2.24.orig/ld/ldscripts and ld/ldscripts
-Common subdirectories: ../binutils-2.24.orig/ld/.libs and ld/.libs
-Common subdirectories: ../binutils-2.24.orig/ld/po and ld/po
-Common subdirectories: ../binutils-2.24.orig/ld/scripttempl and ld/scripttempl
-Common subdirectories: ../binutils-2.24.orig/ld/testsuite and ld/testsuite
-Common subdirectories: ../binutils-2.24.orig/ld/tmpdir and ld/tmpdir
diff --git a/binutils-2.25-set-long-long.patch b/binutils-2.25-set-long-long.patch
deleted file mode 100644
index 1ea7418..0000000
--- a/binutils-2.25-set-long-long.patch
+++ /dev/null
@@ -1,38 +0,0 @@
-diff -up binutils-2.25.orig/bfd/configure.ac binutils-2.25/bfd/configure.ac
---- binutils-2.25.orig/bfd/configure.ac 2014-12-24 10:34:45.590491143 +0000
-+++ binutils-2.25/bfd/configure.ac 2014-12-24 10:36:12.997981992 +0000
-@@ -183,11 +183,13 @@ if test "x${ac_cv_sizeof_long}" = "x8";
- BFD_HOST_64BIT_LONG=1
- test -n "${HOST_64BIT_TYPE}" || HOST_64BIT_TYPE="long"
- test -n "${HOST_U_64BIT_TYPE}" || HOST_U_64BIT_TYPE="unsigned
long"
--elif test "x${ac_cv_sizeof_long_long}" = "x8"; then
-+fi
-+if test "x${ac_cv_sizeof_long_long}" = "x8"; then
- BFD_HOST_64BIT_LONG_LONG=1
- test -n "${HOST_64BIT_TYPE}" || HOST_64BIT_TYPE="long long"
- test -n "${HOST_U_64BIT_TYPE}" || HOST_U_64BIT_TYPE="unsigned long
long"
-- if test "x${ac_cv_sizeof_void_p}" = "x8"; then
-+ if test "x${ac_cv_sizeof_void_p}" = "x8" \
-+ -a "x${ac_cv_sizeof_long}" != "x8"; then
- BFD_HOSTPTR_T="unsigned long long"
- fi
- fi
-diff -up ../binutils-2.20.51.0.7.original/bfd/configure ./bfd/configure
---- a/bfd/configure 2010-04-08 15:23:58.000000000 +0100
-+++ b/bfd/configure 2010-04-08 15:24:06.000000000 +0100
-@@ -12819,11 +12819,13 @@
- BFD_HOST_64BIT_LONG=1
- test -n "${HOST_64BIT_TYPE}" || HOST_64BIT_TYPE="long"
- test -n "${HOST_U_64BIT_TYPE}" || HOST_U_64BIT_TYPE="unsigned
long"
--elif test "x${ac_cv_sizeof_long_long}" = "x8"; then
-+fi
-+if test "x${ac_cv_sizeof_long_long}" = "x8"; then
- BFD_HOST_64BIT_LONG_LONG=1
- test -n "${HOST_64BIT_TYPE}" || HOST_64BIT_TYPE="long long"
- test -n "${HOST_U_64BIT_TYPE}" || HOST_U_64BIT_TYPE="unsigned long
long"
-- if test "x${ac_cv_sizeof_void_p}" = "x8"; then
-+ if test "x${ac_cv_sizeof_void_p}" = "x8" \
-+ -a "x${ac_cv_sizeof_long}" != "x8"; then
- BFD_HOSTPTR_T="unsigned long long"
- fi
- fi
diff --git a/binutils-2.25.1-cleansweep.patch b/binutils-2.25.1-cleansweep.patch
deleted file mode 100644
index 2603d13..0000000
--- a/binutils-2.25.1-cleansweep.patch
+++ /dev/null
@@ -1,63 +0,0 @@
---- ../binutils-2.25.1.orig/ld/testsuite/ld-plugin/lto.exp 2016-01-08 15:24:58.241083264
+0000
-+++ ld/testsuite/ld-plugin/lto.exp 2016-01-08 16:30:51.845827089 +0000
-@@ -386,6 +386,11 @@ if { [at_least_gcc_version 4 7] } {
- }
- }
-
-+# Fedora specific binutils patches break some of the tests that follow...
-+restore_notify
-+return
-+
-+
- # Run "ld -r" to generate inputs for complex LTO tests.
- run_dump_test "lto-3r"
- remote_exec host "mv" "tmpdir/dump tmpdir/lto-3.o"
---- ../binutils-2.26.orig/ld/testsuite/ld-size/size.exp 2016-01-27 15:51:27.223093570
+0000
-+++ ld/testsuite/ld-size/size.exp 2016-01-27 16:00:04.262015016 +0000
-@@ -113,37 +113,6 @@ run_cc_link_tests [list \
- "libsize-6b.so" \
- ] \
- [list \
-- "Build libsize-7.so" \
-- "-shared" \
-- "-fPIC" \
-- {size-7b.c} \
-- {} \
-- "libsize-7.so" \
-- ] \
-- [list \
-- "Build size-7" \
-- "$NOPIE_LDFLAGS -Wl,--no-as-needed tmpdir/libsize-7.so" \
-- "$NOPIE_CFLAGS" \
-- {size-7a.c} \
-- {{readelf -rW size-7.rd}} \
-- "size-7.exe" \
-- ] \
-- [list \
-- "Build libsize-8.so" \
-- "-shared" "-fPIC" \
-- {size-8b.c} \
-- {} \
-- "libsize-8.so" \
-- ] \
-- [list \
-- "Build size-8" \
-- "$NOPIE_LDFLAGS -Wl,--no-as-needed tmpdir/libsize-8.so" \
-- "$NOPIE_CFLAGS" \
-- {size-8a.c} \
-- {{readelf -rW size-8.rd}} \
-- "size-8.exe" \
-- ] \
-- [list \
- "Build libsize-9.so" \
- "-shared" \
- "-fPIC" \
-@@ -161,6 +130,8 @@ run_cc_link_tests [list \
- ] \
- ]
-
-+return
-+
- # Check if size relocation works at run-time.
- catch "exec tmpdir/size-7.exe > tmpdir/dump.out" exec_output
- if ![string match "" $exec_output] then {
diff --git a/binutils-2.26-fix-compile-warnings.patch
b/binutils-2.26-fix-compile-warnings.patch
deleted file mode 100644
index b3e792c..0000000
--- a/binutils-2.26-fix-compile-warnings.patch
+++ /dev/null
@@ -1,38 +0,0 @@
---- binutils-2.26.orig/gold/dirsearch.cc 2016-02-04 10:31:45.228796199 +0000
-+++ binutils-2.26/gold/dirsearch.cc 2016-02-04 11:33:15.875824355 +0000
-@@ -122,6 +122,7 @@ class Dir_caches
- Cache_hash caches_;
- };
-
-+#if 0
- Dir_caches::~Dir_caches()
- {
- for (Cache_hash::iterator p = this->caches_.begin();
-@@ -129,6 +130,7 @@ Dir_caches::~Dir_caches()
- ++p)
- delete p->second;
- }
-+#endif
-
- void
- Dir_caches::add(const char* dirname)
---- binutils-2.26.orig/gold/arm.cc 2016-02-04 10:31:45.227796193 +0000
-+++ binutils-2.26/gold/arm.cc 2016-02-04 12:02:43.897996168 +0000
-@@ -4493,7 +4493,7 @@ Stub::do_fixed_endian_write(unsigned cha
- // Reloc_stub::Key methods.
-
- // Dump a Key as a string for debugging.
--
-+#if 0
- std::string
- Reloc_stub::Key::name() const
- {
-@@ -4524,7 +4524,7 @@ Reloc_stub::Key::name() const
- return std::string(buffer);
- }
- }
--
-+#endif
- // Reloc_stub methods.
-
- // Determine the type of stub needed, if any, for a relocation of R_TYPE at
diff --git a/binutils-2.26-lto.patch b/binutils-2.26-lto.patch
index 4756e85..abe74e8 100644
--- a/binutils-2.26-lto.patch
+++ b/binutils-2.26-lto.patch
@@ -572,8 +572,8 @@ diff -rup binutils-2.26.orig/ld/emultempl/avrelf.em
binutils-2.26/ld/emultempl/a
--- binutils-2.26.orig/ld/emultempl/avrelf.em 2016-02-19 09:35:36.698003274 +0000
+++ binutils-2.26/ld/emultempl/avrelf.em 2016-02-19 09:35:54.915106577 +0000
@@ -209,7 +209,7 @@ avr_finish (void)
- else
- elf_elfheader (abfd)->e_flags &= ~EF_AVR_LINKRELAX_PREPARED;
+ elf_elfheader (abfd)->e_flags &= ~EF_AVR_LINKRELAX_PREPARED;
+ }
- finish_default ();
+ gld${EMULATION_NAME}_finish ();
@@ -592,7 +592,7 @@ diff -rup binutils-2.26.orig/ld/emultempl/elf32.em
binutils-2.26/ld/emultempl/el
if [ "x${USE_LIBPATH}" = xyes ] ; then
@@ -1795,6 +1796,8 @@ output_rel_find (asection *sec, int isdy
- return last;
+ in->owner, in);
}
+static int orphan_init_done = 0;
@@ -2265,157 +2265,6 @@ diff -rup binutils-2.26.orig/ld/scripttempl/pe.sc
binutils-2.26/ld/scripttempl/p
}
.idata ${RELOCATING+BLOCK(__section_alignment__)} :
-diff -rup binutils-2.26.orig/ld/testsuite/ld-plugin/lto.exp
binutils-2.26/ld/testsuite/ld-plugin/lto.exp
---- binutils-2.26.orig/ld/testsuite/ld-plugin/lto.exp 2016-02-19 09:35:36.807003892
+0000
-+++ binutils-2.26/ld/testsuite/ld-plugin/lto.exp 2016-02-19 09:36:15.450223025 +0000
-@@ -79,6 +79,15 @@ set lto_link_tests [list \
- [list "Build liblto-3.a" \
- "" "-flto $lto_fat" \
- {lto-3b.c} {} "liblto-3.a"] \
-+ [list "Compile 4a" \
-+ "" "-flto $lto_fat" \
-+ {lto-4a.c} {} ""] \
-+ [list "Compile 4b" \
-+ "" "-O2" \
-+ {lto-4b.c} {} ""] \
-+ [list "Compile 4c" \
-+ "" "-O2" \
-+ {lto-4c.c} {} ""] \
- [list "Compile 5a" \
- "" "-flto $lto_fat" \
- {lto-5a.c} {} ""] \
-@@ -94,6 +103,12 @@ set lto_link_tests [list \
- [list "Compile 9" \
- "" "-O2 -finline -flto" \
- {lto-9.cc} {} "" "c++"] \
-+ [list "Compile 10a" \
-+ "" "-O2" \
-+ {lto-10a.c} {} ""] \
-+ [list "Compile 10b" \
-+ "" "-O2 -flto $lto_fat" \
-+ {lto-10b.c} {} ""] \
- [list "Compile 11a" \
- "" "-O -flto" \
- {lto-11a.c} {} ""] \
-@@ -291,9 +306,21 @@ set lto_run_tests [list \
- [list "LTO 3c" \
- "-O2 -flto -fuse-linker-plugin tmpdir/lto-3a.o tmpdir/lto-3c.o
-Wl,--whole-archive tmpdir/liblto-3.a -Wl,--no-whole-archive tmpdir/liblto-3.a"
"" \
- {dummy.c} "lto-3d.exe" "lto-3.out" "" "c"] \
-+ [list "LTO 4a" \
-+ "-O2 -flto -fuse-linker-plugin tmpdir/lto-4r-a.o" "" \
-+ {dummy.c} "lto-4a.exe" "lto-4.out" "" "c"] \
-+ [list "LTO 4c" \
-+ "-O2 -flto -fuse-linker-plugin tmpdir/lto-4r-c.o" "" \
-+ {dummy.c} "lto-4c.exe" "lto-4.out" "" "c"] \
-+ [list "LTO 4d" \
-+ "-O2 -flto -fuse-linker-plugin tmpdir/lto-4r-d.o" "" \
-+ {dummy.c} "lto-4d.exe" "lto-4.out" "" "c"] \
- [list "LTO 5" \
- "-O2 -flto -fuse-linker-plugin tmpdir/lto-5.o" "" \
- {dummy.c} "lto-5.exe" "lto-5.out" "" "c"] \
-+ [list "LTO 10" \
-+ "-O2 -flto -fuse-linker-plugin tmpdir/lto-10.o" "" \
-+ {dummy.c} "lto-10.exe" "lto-10.out" "" "c"]
\
- [list "LTO 11" \
- "-O -flto -fuse-linker-plugin tmpdir/liblto-11.a" "" \
- {dummy.c} "lto-11.exe" "lto-11.out" "" "c"]
\
-@@ -378,6 +405,15 @@ if { [is_elf_format] && [check_lto_share
- }
- }
-
-+set testname "Build liblto-4.a"
-+remote_file host delete "tmpdir/liblto-4.a"
-+set catch_output [run_host_cmd "$ar" "rc tmpdir/liblto-4.a
tmpdir/lto-4a.o tmpdir/lto-4b.o tmpdir/lto-4c.o"]
-+if {![string match "" $catch_output]} {
-+ unresolved $testname
-+ restore_notify
-+ return
-+}
-+
- 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"]
-@@ -424,8 +460,30 @@ return
- # Run "ld -r" to generate inputs for complex LTO tests.
- run_dump_test "lto-3r"
- remote_exec host "mv" "tmpdir/dump tmpdir/lto-3.o"
-+run_dump_test "lto-4r-a"
-+remote_exec host "mv" "tmpdir/dump tmpdir/lto-4r-a.o"
-+run_dump_test "lto-4r-b"
-+remote_exec host "mv" "tmpdir/dump tmpdir/lto-4r-b.o"
-+run_dump_test "lto-4r-c"
-+remote_exec host "mv" "tmpdir/dump tmpdir/lto-4r-c.o"
-+run_dump_test "lto-4r-d"
-+remote_exec host "mv" "tmpdir/dump tmpdir/lto-4r-d.o"
- run_dump_test "lto-5r"
- remote_exec host "mv" "tmpdir/dump tmpdir/lto-5.o"
-+run_dump_test "lto-10r"
-+remote_exec host "mv" "tmpdir/dump tmpdir/lto-10.o"
-+set testname "nm mixed object"
-+set lto_plugin [run_host_cmd "$CC" "-print-prog-name=liblto_plugin.so
tmpdir/lto-10.o"]
-+if { [ regexp "liblto_plugin.so" $lto_plugin ] } {
-+ set exec_output [run_host_cmd "$NM" "--plugin $lto_plugin
tmpdir/lto-10.o"]
-+ if { [ regexp "T main" $exec_output ] } {
-+ pass $testname
-+ } {
-+ fail $testname
-+ }
-+} {
-+ fail $testname
-+ }
-
- run_cc_link_tests $lto_link_symbol_tests
-
---- /dev/null 2016-08-19 08:03:37.292222041 +0100
-+++ binutils-2.27/ld/testsuite/ld-plugin/lto-4a.c 2016-08-19 12:14:15.685818046 +0100
-@@ -0,0 +1,7 @@
-+extern void foo(void);
-+
-+int main(void)
-+{
-+ foo();
-+ return 0;
-+}
---- /dev/null 2016-08-19 08:03:37.292222041 +0100
-+++ binutils-2.27/ld/testsuite/ld-plugin/lto-4b.c 2016-08-19 12:14:19.603842115 +0100
-@@ -0,0 +1,9 @@
-+#include <stdio.h>
-+
-+extern void bar (void);
-+
-+void foo(void)
-+{
-+ bar ();
-+ printf ("hello foo\n");
-+}
---- /dev/null 2016-08-19 08:03:37.292222041 +0100
-+++ binutils-2.27/ld/testsuite/ld-plugin/lto-4c.c 2016-08-19 12:14:21.987856760 +0100
-@@ -0,0 +1,6 @@
-+#include <stdio.h>
-+
-+void bar (void)
-+{
-+ printf ("hello bar\n");
-+}
---- /dev/null 2016-08-19 08:03:37.292222041 +0100
-+++ binutils-2.27/ld/testsuite/ld-plugin/lto-10a.c 2016-08-19 12:14:27.670891671 +0100
-@@ -0,0 +1,6 @@
-+extern int foo(void);
-+
-+int main(void)
-+{
-+ return foo();
-+}
---- /dev/null 2016-08-19 08:03:37.292222041 +0100
-+++ binutils-2.27/ld/testsuite/ld-plugin/lto-10b.c 2016-08-19 12:14:33.380926748 +0100
-@@ -0,0 +1,7 @@
-+#include <stdio.h>
-+
-+int foo(void)
-+{
-+ printf ("hello\n");
-+ return 0;
-+}
--- binutils.orig/bfd/bfd-in2.h 2017-03-02 11:14:48.572979573 +0000
+++ binutils-2.28/bfd/bfd-in2.h 2017-03-02 11:21:39.828458555 +0000
@@ -1118,6 +1118,9 @@ bfd_boolean bfd_fill_in_gnu_debuglink_se
diff --git a/binutils-2.28-ignore-gold-duplicates.patch
b/binutils-2.28-ignore-gold-duplicates.patch
deleted file mode 100644
index 346f956..0000000
--- a/binutils-2.28-ignore-gold-duplicates.patch
+++ /dev/null
@@ -1,14 +0,0 @@
-diff -rup binutils.orig/ld/ldmain.c binutils-2.28/ld/ldmain.c
---- binutils.orig/ld/ldmain.c 2017-06-09 09:08:26.954016429 +0100
-+++ binutils-2.28/ld/ldmain.c 2017-06-09 09:09:11.307490976 +0100
-@@ -923,6 +923,10 @@ multiple_definition (struct bfd_link_inf
- obfd = h->u.def.section->owner;
- break;
- case bfd_link_hash_indirect:
-+ /* PR 21074: The GOLD linker can produce multiple indirect
-+ refences to the same symbol. These can be ignored. */
-+ if (bfd_is_ind_section (nsec))
-+ return;
- osec = bfd_ind_section_ptr;
- oval = 0;
- obfd = NULL;
diff --git a/binutils-2.29.1-gold-start-stop.patch
b/binutils-2.29.1-gold-start-stop.patch
new file mode 100644
index 0000000..3bb37c1
--- /dev/null
+++ b/binutils-2.29.1-gold-start-stop.patch
@@ -0,0 +1,153 @@
+diff -rup binutils.orig/gold/layout.cc binutils-2.29.1/gold/layout.cc
+--- binutils.orig/gold/layout.cc 2017-10-18 12:00:31.990714767 +0100
++++ binutils-2.29.1/gold/layout.cc 2017-10-18 12:00:41.351604074 +0100
+@@ -2211,10 +2211,11 @@ Layout::define_section_symbols(Symbol_ta
+ 0, // symsize
+ elfcpp::STT_NOTYPE,
+ elfcpp::STB_GLOBAL,
+- elfcpp::STV_DEFAULT,
++ elfcpp::STV_PROTECTED,
+ 0, // nonvis
+ false, // offset_is_from_end
+- true); // only_if_ref
++ true, // only_if_ref
++ true); // must_be_in_reg
+
+ symtab->define_in_output_data(stop_name.c_str(),
+ NULL, // version
+@@ -2224,10 +2225,11 @@ Layout::define_section_symbols(Symbol_ta
+ 0, // symsize
+ elfcpp::STT_NOTYPE,
+ elfcpp::STB_GLOBAL,
+- elfcpp::STV_DEFAULT,
++ elfcpp::STV_PROTECTED,
+ 0, // nonvis
+ true, // offset_is_from_end
+- true); // only_if_ref
++ true, // only_if_ref
++ true); // must_be_in_reg
+ }
+ }
+ }
+Only in binutils-2.29.1/gold: layout.cc.orig
+diff -rup binutils.orig/gold/symtab.cc binutils-2.29.1/gold/symtab.cc
+--- binutils.orig/gold/symtab.cc 2017-10-18 12:00:31.990714767 +0100
++++ binutils-2.29.1/gold/symtab.cc 2017-10-18 12:00:41.352604062 +0100
+@@ -1760,7 +1760,9 @@ Sized_symbol<size>*
+ Symbol_table::define_special_symbol(const char** pname, const char** pversion,
+ bool only_if_ref,
+ Sized_symbol<size>** poldsym,
+- bool* resolve_oldsym, bool is_forced_local)
++ bool* resolve_oldsym,
++ bool is_forced_local,
++ bool must_be_in_reg)
+ {
+ *resolve_oldsym = false;
+ *poldsym = NULL;
+@@ -1797,7 +1799,11 @@ Symbol_table::define_special_symbol(cons
+ oldsym = this->lookup(*pname, *pversion);
+ if (oldsym == NULL && is_default_version)
+ oldsym = this->lookup(*pname, NULL);
+- if (oldsym == NULL || !oldsym->is_undefined())
++ // If the symbol must be defined in a regular object, ignore
++ // definition from a dynamic object.
++ if (oldsym == NULL
++ || (!oldsym->is_undefined()
++ && (!must_be_in_reg || !oldsym->is_from_dynobj())))
+ return NULL;
+
+ *pname = oldsym->name();
+@@ -1916,7 +1922,8 @@ Symbol_table::define_in_output_data(cons
+ elfcpp::STV visibility,
+ unsigned char nonvis,
+ bool offset_is_from_end,
+- bool only_if_ref)
++ bool only_if_ref,
++ bool must_be_in_reg)
+ {
+ if (parameters->target().get_size() == 32)
+ {
+@@ -1925,7 +1932,8 @@ Symbol_table::define_in_output_data(cons
+ value, symsize, type, binding,
+ visibility, nonvis,
+ offset_is_from_end,
+- only_if_ref);
++ only_if_ref,
++ must_be_in_reg);
+ #else
+ gold_unreachable();
+ #endif
+@@ -1937,7 +1945,8 @@ Symbol_table::define_in_output_data(cons
+ value, symsize, type, binding,
+ visibility, nonvis,
+ offset_is_from_end,
+- only_if_ref);
++ only_if_ref,
++ must_be_in_reg);
+ #else
+ gold_unreachable();
+ #endif
+@@ -1962,7 +1971,8 @@ Symbol_table::do_define_in_output_data(
+ elfcpp::STV visibility,
+ unsigned char nonvis,
+ bool offset_is_from_end,
+- bool only_if_ref)
++ bool only_if_ref,
++ bool must_be_in_reg)
+ {
+ Sized_symbol<size>* sym;
+ Sized_symbol<size>* oldsym;
+@@ -1975,7 +1985,8 @@ Symbol_table::do_define_in_output_data(
+ sym = this->define_special_symbol<size, true>(&name, &version,
+ only_if_ref, &oldsym,
+ &resolve_oldsym,
+- is_forced_local);
++ is_forced_local,
++ must_be_in_reg);
+ #else
+ gold_unreachable();
+ #endif
+@@ -1986,7 +1997,8 @@ Symbol_table::do_define_in_output_data(
+ sym = this->define_special_symbol<size, false>(&name, &version,
+ only_if_ref, &oldsym,
+ &resolve_oldsym,
+- is_forced_local);
++ is_forced_local,
++ must_be_in_reg);
+ #else
+ gold_unreachable();
+ #endif
+diff -rup binutils.orig/gold/symtab.h binutils-2.29.1/gold/symtab.h
+--- binutils.orig/gold/symtab.h 2017-10-18 12:00:32.002714624 +0100
++++ binutils-2.29.1/gold/symtab.h 2017-10-18 12:00:41.352604062 +0100
+@@ -1488,7 +1488,8 @@ class Symbol_table
+ Output_data*, uint64_t value, uint64_t symsize,
+ elfcpp::STT type, elfcpp::STB binding,
+ elfcpp::STV visibility, unsigned char nonvis,
+- bool offset_is_from_end, bool only_if_ref);
++ bool offset_is_from_end, bool only_if_ref,
++ bool must_be_in_reg = false);
+
+ // Define a special symbol based on an Output_segment. It is a
+ // multiple definition error if this symbol is already defined.
+@@ -1803,7 +1804,8 @@ class Symbol_table
+ Sized_symbol<size>*
+ define_special_symbol(const char** pname, const char** pversion,
+ bool only_if_ref, Sized_symbol<size>** poldsym,
+- bool* resolve_oldsym, bool is_forced_local);
++ bool* resolve_oldsym, bool is_forced_local,
++ bool must_be_in_reg = false);
+
+ // Define a symbol in an Output_data, sized version.
+ template<int size>
+@@ -1814,7 +1816,8 @@ class Symbol_table
+ typename elfcpp::Elf_types<size>::Elf_WXword ssize,
+ elfcpp::STT type, elfcpp::STB binding,
+ elfcpp::STV visibility, unsigned char nonvis,
+- bool offset_is_from_end, bool only_if_ref);
++ bool offset_is_from_end, bool only_if_ref,
++ bool must_be_in_reg = false);
+
+ // Define a symbol in an Output_segment, sized version.
+ template<int size>
+Only in binutils-2.29.1/gold: symtab.h.orig
diff --git a/binutils-2.29.1-readelf-use-dynamic.patch
b/binutils-2.29.1-readelf-use-dynamic.patch
new file mode 100644
index 0000000..625e584
--- /dev/null
+++ b/binutils-2.29.1-readelf-use-dynamic.patch
@@ -0,0 +1,55 @@
+diff -rup binutils.orig/binutils/doc/binutils.texi
binutils-2.29.1/binutils/doc/binutils.texi
+--- binutils.orig/binutils/doc/binutils.texi 2017-11-01 11:44:12.360707737 +0000
++++ binutils-2.29.1/binutils/doc/binutils.texi 2017-11-01 11:45:38.702652255 +0000
+@@ -4661,8 +4661,13 @@ given.
+ @itemx --all
+ Equivalent to specifying @option{--file-header},
+ @option{--program-headers}, @option{--sections}, @option{--symbols},
+-@option{--relocs}, @option{--dynamic}, @option{--notes} and
+-@option{--version-info}.
++@option{--relocs}, @option{--dynamic}, @option{--notes},
++@option{--version-info}, @option{--arch-specific}, @option{--unwind},
++@option{--section-groups} and @option{--histogram}.
++
++Note - this option does not enable @option{--use-dynamic} itself, so
++if that option is not present on the command line then dynamic symbols
++and dynamic relocs will not be displayed.
+
+ @item -h
+ @itemx --file-header
+@@ -4758,6 +4763,9 @@ When displaying symbols, this option mak
+ symbol hash tables in the file's dynamic section, rather than the
+ symbol table sections.
+
++When displaying relocations, this option makes @command{readelf}
++display the dynamic relocations rather than the static relocations.
++
+ @item -x <number or name>
+ @itemx --hex-dump=<number or name>
+ Displays the contents of the indicated section as a hexadecimal bytes.
+diff -rup binutils.orig/binutils/readelf.c binutils-2.29.1/binutils/readelf.c
+--- binutils.orig/binutils/readelf.c 2017-11-01 11:44:12.357707774 +0000
++++ binutils-2.29.1/binutils/readelf.c 2017-11-01 11:45:11.901979878 +0000
+@@ -7117,7 +7117,21 @@ process_relocs (FILE * file)
+ }
+
+ if (! found)
+- printf (_("\nThere are no relocations in this file.\n"));
++ {
++ /* Users sometimes forget the -D option, so try to be helpful. */
++ for (i = 0; i < ARRAY_SIZE (dynamic_relocations); i++)
++ {
++ if (dynamic_info [dynamic_relocations [i].size])
++ {
++ printf (_("\nThere are no static relocations in this file."));
++ printf (_("\nTo see the dynamic relocations add --use-dynamic to the command
line.\n"));
++
++ break;
++ }
++ }
++ if (i == ARRAY_SIZE (dynamic_relocations))
++ printf (_("\nThere are no relocations in this file.\n"));
++ }
+ }
+
+ return TRUE;
diff --git a/cross-binutils.spec b/cross-binutils.spec
index 402079e..8f1b1f1 100644
--- a/cross-binutils.spec
+++ b/cross-binutils.spec
@@ -25,6 +25,7 @@
%global build_openrisc %{build_all}
%global build_powerpc64 %{build_all}
%global build_powerpc64le %{build_all}
+%global build_riscv64 %{build_all}
%global build_s390x %{build_all}
%global build_score %{build_all}
%global build_sh %{build_all}
@@ -56,8 +57,8 @@
Summary: A GNU collection of cross-compilation binary utilities
Name: %{cross}-binutils
-Version: 2.29
-Release: 3%{?dist}
+Version: 2.29.1
+Release: 1%{?dist}
License: GPLv3+
Group: Development/Tools
URL:
http://sources.redhat.com/binutils
@@ -69,31 +70,67 @@ Source:
http://ftp.gnu.org/gnu/binutils/binutils-%{version}.tar.xz
Source2: binutils-2.19.50.0.1-output-format.sed
-# Bring up to date with what's in the git release branch
-#Patch00: binutils-2.24-cde98f8566e14f52b896abc92c357cdd14717505.patch
-
+# Purpose: Use /lib64 and /usr/lib64 instead of /lib and /usr/lib in the
+# default library search path of 64-bit targets.
+# Lifetime: Permanent, but it should not be. This is a bug in the libtool
+# sources used in both binutils and gcc, (specifically the
+# libtool.m4 file). These are based on a version released in 2009
+# (2.2.6?) rather than the latest version. (Definitely fixed in
+# libtool version 2.4.6).
Patch01: binutils-2.20.51.0.2-libtool-lib64.patch
+
+# Purpose: Appends a RHEL or Fedora release string to the generic binutils
+# version string.
+# Lifetime: Permanent. This is a RHEL/Fedora specific patch.
Patch02: binutils-2.25-version.patch
-Patch03: binutils-2.25-set-long-long.patch
-Patch04: binutils-2.20.51.0.10-sec-merge-emit.patch
-# Enable -zrelro by default: BZ #621983
-Patch05: binutils-2.22.52.0.1-relro-on-by-default.patch
-# Local patch - export demangle.h with the binutils-devel rpm.
-Patch06: binutils-2.22.52.0.1-export-demangle.h.patch
-# Disable checks that config.h has been included before system headers. BZ #845084
-Patch07: binutils-2.22.52.0.4-no-config-h-check.patch
-# Fix detections little endian PPC shared libraries
-Patch08: binutils-2.24-ldforcele.patch
-Patch09: binutils-2.25.1-cleansweep.patch
-Patch10: binutils-2.26-fix-compile-warnings.patch
-# Import H.J.Lu's Kernel LTO patch.
-Patch11: binutils-2.26-lto.patch
-# Skip PR14918 linker test for ARM native targets.
-Patch12: binutils-2.29-skip-rp14918-test-for-arm.patch
-# Include the filename concerned in readelf error messages.
-Patch13: binutils-2.29-filename-in-error-messages.patch
-# Ignore duplicate indirect symbols generated by GOLD.
-Patch14: binutils-2.28-ignore-gold-duplicates.patch
+
+# Purpose: Exports the demangle.h header file (associated with the libiberty
+# sources) with the binutils-devel rpm.
+# Lifetime: Permanent. This is a RHEL/Fedora specific patch.
+Patch03: binutils-2.22.52.0.1-export-demangle.h.patch
+
+# Purpose: Disables the check in the BFD library's header file that config.h
+# has been included before the bfd.h header. See BZ #845084 for
+# more details.
+# Lifetime: Permanent - but it should not be. The bfd.h header defines
+# various types that are dependent upon configuration options, so
+# the order of inclusion is important.
+# FIXME: It would be better if the packages using the BFD header were
+# fixed so that they do include the header files in the correct
+# 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
+
+# Purpose: Skip PR14918 linker test for ARM native targets.
+# Lifetime: Fixed in 2.30.
+Patch06: binutils-2.29-skip-rp14918-test-for-arm.patch
+
+# Purpose: Include the filename concerned in readelf error messages. This
+# makes readelf's output more helpful when it is run on multiple
+# input files.
+# Lifetime: Permanent. This patch changes the format of readelf's output,
+# making it better (IMHO) but also potentially breaking tools that
+# depend upon readelf's current format. Hence it remains a local
+# patch.
+Patch07: binutils-2.29-filename-in-error-messages.patch
+
+# Purpose: Fix the generation of relocations to handle locating the start
+# and stop symbols of orphan sections when using the GOLD linker.
+# See: BZ 1500898 and PR 22291.
+# Lifetime: Fixed in 2.30.
+Patch08: binutils-2.29.1-gold-start-stop.patch
+
+# Purpose: Update readelf so that if it is run with the --relocs option and
+# there are no static relocs to be displayed, but there are dynamic
+# relocs that could have been displayed, it will now issue a
+# message suggesting the addition of the --use-dynamic option.
+# See: BZ 1507694
+# Lifetime: Fixed in 2.30.
+Patch09: binutils-2.29.1-readelf-use-dynamic.patch
# NOTE!!! Don't add cross-binutils patches here as "binutils-xxx". Name
them
# cross-binutils-xxx instead!
@@ -187,6 +224,7 @@ Cross-build binary image generation, manipulation and query tools. \
%do_symlink ppc-linux-gnu %{build_powerpc} powerpc-linux-gnu
%do_symlink ppc64-linux-gnu %{build_powerpc64} powerpc64-linux-gnu
%do_symlink ppc64le-linux-gnu %{build_powerpc64le} powerpc64le-linux-gnu
+%do_package riscv64-linux-gnu %{build_riscv64}
%do_package s390-linux-gnu %{build_s390}
%do_package s390x-linux-gnu %{build_s390x}
%do_package score-linux-gnu %{build_score}
@@ -214,22 +252,16 @@ Cross-build binary image generation, manipulation and query tools.
\
%setup -q -n %{srcdir} -c
cd %{srcdir}
#%patch00 -p1 -b .latest-git~
-%patch01 -p1 -b .libtool-lib64~
-%patch02 -p1 -b .version~
-%patch03 -p1 -b .set-long-long~
-%patch04 -p1 -b .sec-merge-emit~
-%patch05 -p1 -b .relro~
-%patch06 -p1 -b .export-demangle-h~
-%patch07 -p1 -b .no-config-h-check~
-%ifarch ppc64le
-%patch08 -p1 -b .ldforcele~
-%endif
-%patch09 -p0
-%patch10 -p1
-%patch11 -p1
-%patch12 -p1
-%patch13 -p1
-%patch14 -p1
+%patch01 -p1
+%patch02 -p1
+%patch03 -p1
+%patch04 -p1
+%patch05 -p1
+%patch06 -p1
+%patch07 -p1
+%patch08 -p1
+%patch09 -p1
+
%if %{build_sh64}
%patch100 -p1 -b .sh64-fixup~
@@ -299,6 +331,7 @@ cd ..
prep_target powerpc-linux-gnu %{build_powerpc}
prep_target powerpc64-linux-gnu %{build_powerpc64}
prep_target powerpc64le-linux-gnu %{build_powerpc64le}
+ prep_target riscv64-linux-gnu %{build_riscv64}
prep_target s390-linux-gnu %{build_s390}
prep_target s390x-linux-gnu %{build_s390x}
prep_target score-linux-gnu %{build_score}
@@ -685,6 +718,7 @@ rm -rf %{buildroot}
%do_files ppc-linux-gnu %{build_powerpc}
%do_files ppc64-linux-gnu %{build_powerpc64}
%do_files ppc64le-linux-gnu %{build_powerpc64le}
+%do_files riscv64-linux-gnu %{build_riscv64}1
%do_files s390-linux-gnu %{build_s390}
%do_files s390x-linux-gnu %{build_s390x}
%do_files score-linux-gnu %{build_score}
@@ -699,6 +733,10 @@ rm -rf %{buildroot}
%do_files xtensa-linux-gnu %{build_xtensa}
%changelog
+* Mon Nov 6 2017 David Howells <dhowells(a)redhat.com> - 2.29.1-1
+- Sync with binutils-2.29.1-4.
+- Add support for riscv64 arch (#1491955).
+
* Wed Aug 02 2017 Fedora Release Engineering <releng(a)fedoraproject.org> - 2.29-3
- Rebuilt for
https://fedoraproject.org/wiki/Fedora_27_Binutils_Mass_Rebuild
diff --git a/sources b/sources
index 2bbe70c..1e8dedb 100644
--- a/sources
+++ b/sources
@@ -1 +1 @@
-SHA512 (binutils-2.29.tar.xz) =
bb227c7af65133a61bbde8be4104a543f4185fce8c8e7be22c36d92d121d28b5413d42f18c7e987d035d6312c542d0e2aaca8930386a4ce26d7c9d7248145398
+SHA512 (binutils-2.29.1.tar.xz) =
d748d22306477d60d921078804d21943248c23fca0707aac9b016a352c01c75ca69e82624ae37fb0bbd03af3b17088a94f60dfe1a86a7ff82e18ece3c24f0fd0