Compare commits
No commits in common. "c8" and "c9" have entirely different histories.
2
.gitignore
vendored
2
.gitignore
vendored
@ -1 +1 @@
|
|||||||
SOURCES/binutils-2.30.tar.bz2
|
SOURCES/binutils-2.43.1.tar.xz
|
||||||
|
|||||||
@ -1 +1 @@
|
|||||||
33d807f7fa680b00439eb5560acd0c2ef645e5f9 SOURCES/binutils-2.30.tar.bz2
|
86bfee61d18cb9ea84ca700ecb820d97bb4e92a7 SOURCES/binutils-2.43.1.tar.xz
|
||||||
|
|||||||
@ -1,146 +0,0 @@
|
|||||||
From a985e9b9deabd81e16754584f4397a638e9d3f36 Mon Sep 17 00:00:00 2001
|
|
||||||
From: Nick Clifton <nickc@redhat.com>
|
|
||||||
Date: Mon, 5 Feb 2018 09:12:42 +0000
|
|
||||||
Subject: [PATCH] Import patch from mainline to remove PROVODE qualifiers
|
|
||||||
around definitions of __CTOR_LIST__ and __DTOR_LIST__ in PE linker scripts.
|
|
||||||
|
|
||||||
PR 22762
|
|
||||||
* scripttempl/pe.sc: Remove PROVIDE()s from __CTOR_LIST__ and
|
|
||||||
__DTOR_LIST__ symbols. Add a comment explaining why this is
|
|
||||||
necessary.
|
|
||||||
* scripttemp/pep.sc: Likewise.
|
|
||||||
* ld.texinfo (PROVIDE): Add a note about the effect of common
|
|
||||||
symbols.
|
|
||||||
---
|
|
||||||
ld/ChangeLog | 14 ++++++++++++++
|
|
||||||
ld/ld.texinfo | 6 ++++++
|
|
||||||
ld/scripttempl/pe.sc | 24 ++++++++++++++++++++----
|
|
||||||
ld/scripttempl/pep.sc | 24 ++++++++++++++++++++----
|
|
||||||
4 files changed, 60 insertions(+), 8 deletions(-)
|
|
||||||
|
|
||||||
diff --git a/ld/ChangeLog b/ld/ChangeLog
|
|
||||||
index 0f00265029c..bf129a121cc 100644
|
|
||||||
--- a/ld/ChangeLog
|
|
||||||
+++ b/ld/ChangeLog
|
|
||||||
@@ -1,3 +1,17 @@
|
|
||||||
+2018-02-05 Nick Clifton <nickc@redhat.com>
|
|
||||||
+
|
|
||||||
+ Import from mainline:
|
|
||||||
+
|
|
||||||
+ 2018-02-03 Nick Clifton <nickc@redhat.com>
|
|
||||||
+
|
|
||||||
+ PR 22762
|
|
||||||
+ * scripttempl/pe.sc: Remove PROVIDE()s from __CTOR_LIST__ and
|
|
||||||
+ __DTOR_LIST__ symbols. Add a comment explaining why this is
|
|
||||||
+ necessary.
|
|
||||||
+ * scripttemp/pep.sc: Likewise.
|
|
||||||
+ * ld.texinfo (PROVIDE): Add a note about the effect of common
|
|
||||||
+ symbols.
|
|
||||||
+
|
|
||||||
2018-01-27 Nick Clifton <nickc@redhat.com>
|
|
||||||
|
|
||||||
This is the 2.30 release:
|
|
||||||
diff --git a/ld/ld.texinfo b/ld/ld.texinfo
|
|
||||||
index c89915f1aaa..764c4017c7b 100644
|
|
||||||
--- a/ld/ld.texinfo
|
|
||||||
+++ b/ld/ld.texinfo
|
|
||||||
@@ -4001,6 +4001,12 @@ underscore), the linker will silently use the definition in the program.
|
|
||||||
If the program references @samp{etext} but does not define it, the
|
|
||||||
linker will use the definition in the linker script.
|
|
||||||
|
|
||||||
+Note - the @code{PROVIDE} directive considers a common symbol to be
|
|
||||||
+defined, even though such a symbol could be combined with the symbol
|
|
||||||
+that the @code{PROVIDE} would create. This is particularly important
|
|
||||||
+when considering constructor and destructor list symbols such as
|
|
||||||
+@samp{__CTOR_LIST__} as these are often defined as common symbols.
|
|
||||||
+
|
|
||||||
@node PROVIDE_HIDDEN
|
|
||||||
@subsection PROVIDE_HIDDEN
|
|
||||||
@cindex PROVIDE_HIDDEN
|
|
||||||
diff --git a/ld/scripttempl/pe.sc b/ld/scripttempl/pe.sc
|
|
||||||
index c8a45ca09d1..f56d783ea03 100644
|
|
||||||
--- a/ld/scripttempl/pe.sc
|
|
||||||
+++ b/ld/scripttempl/pe.sc
|
|
||||||
@@ -98,8 +98,22 @@ SECTIONS
|
|
||||||
${RELOCATING+*(.glue_7t)}
|
|
||||||
${RELOCATING+*(.glue_7)}
|
|
||||||
${CONSTRUCTING+
|
|
||||||
- PROVIDE(___CTOR_LIST__ = .);
|
|
||||||
- PROVIDE(__CTOR_LIST__ = .);
|
|
||||||
+ /* Note: we always define __CTOR_LIST__ and ___CTOR_LIST__ here,
|
|
||||||
+ we do not PROVIDE them. This is because the ctors.o startup
|
|
||||||
+ code in libgcc defines them as common symbols, with the
|
|
||||||
+ expectation that they will be overridden by the definitions
|
|
||||||
+ here. If we PROVIDE the symbols then they will not be
|
|
||||||
+ overridden and global constructors will not be run.
|
|
||||||
+
|
|
||||||
+ This does mean that it is not possible for a user to define
|
|
||||||
+ their own __CTOR_LIST__ and __DTOR_LIST__ symbols. If that
|
|
||||||
+ ability is needed a custom linker script will have to be
|
|
||||||
+ used. (The custom script can just be a copy of this script
|
|
||||||
+ with the PROVIDE() qualifiers added).
|
|
||||||
+
|
|
||||||
+ See PR 22762 for more details. */
|
|
||||||
+ ___CTOR_LIST__ = .;
|
|
||||||
+ __CTOR_LIST__ = .;
|
|
||||||
LONG (-1);
|
|
||||||
KEEP(*(.ctors));
|
|
||||||
KEEP(*(.ctor));
|
|
||||||
@@ -107,8 +121,10 @@ SECTIONS
|
|
||||||
LONG (0);
|
|
||||||
}
|
|
||||||
${CONSTRUCTING+
|
|
||||||
- PROVIDE(___DTOR_LIST__ = .);
|
|
||||||
- PROVIDE(__DTOR_LIST__ = .);
|
|
||||||
+ /* See comment about __CTOR_LIST__ above. The same reasoning
|
|
||||||
+ applies here too. */
|
|
||||||
+ ___DTOR_LIST__ = .;
|
|
||||||
+ __DTOR_LIST__ = .;
|
|
||||||
LONG (-1);
|
|
||||||
KEEP(*(.dtors));
|
|
||||||
KEEP(*(.dtor));
|
|
||||||
diff --git a/ld/scripttempl/pep.sc b/ld/scripttempl/pep.sc
|
|
||||||
index 8daacb27630..3c6c84da9bf 100644
|
|
||||||
--- a/ld/scripttempl/pep.sc
|
|
||||||
+++ b/ld/scripttempl/pep.sc
|
|
||||||
@@ -99,8 +99,22 @@ SECTIONS
|
|
||||||
${RELOCATING+*(.glue_7)}
|
|
||||||
${CONSTRUCTING+. = ALIGN(8);}
|
|
||||||
${CONSTRUCTING+
|
|
||||||
- PROVIDE(___CTOR_LIST__ = .);
|
|
||||||
- PROVIDE(__CTOR_LIST__ = .);
|
|
||||||
+ /* Note: we always define __CTOR_LIST__ and ___CTOR_LIST__ here,
|
|
||||||
+ we do not PROVIDE them. This is because the ctors.o startup
|
|
||||||
+ code in libgcc defines them as common symbols, with the
|
|
||||||
+ expectation that they will be overridden by the definitions
|
|
||||||
+ here. If we PROVIDE the symbols then they will not be
|
|
||||||
+ overridden and global constructors will not be run.
|
|
||||||
+
|
|
||||||
+ This does mean that it is not possible for a user to define
|
|
||||||
+ their own __CTOR_LIST__ and __DTOR_LIST__ symbols. If that
|
|
||||||
+ ability is needed a custom linker script will have to be
|
|
||||||
+ used. (The custom script can just be a copy of this script
|
|
||||||
+ with the PROVIDE() qualifiers added).
|
|
||||||
+
|
|
||||||
+ See PR 22762 for more details. */
|
|
||||||
+ ___CTOR_LIST__ = .;
|
|
||||||
+ __CTOR_LIST__ = .;
|
|
||||||
LONG (-1); LONG (-1);
|
|
||||||
KEEP (*(.ctors));
|
|
||||||
KEEP (*(.ctor));
|
|
||||||
@@ -108,8 +122,10 @@ SECTIONS
|
|
||||||
LONG (0); LONG (0);
|
|
||||||
}
|
|
||||||
${CONSTRUCTING+
|
|
||||||
- PROVIDE(___DTOR_LIST__ = .);
|
|
||||||
- PROVIDE(__DTOR_LIST__ = .);
|
|
||||||
+ /* See comment about __CTOR_LIST__ above. The same reasoning
|
|
||||||
+ applies here too. */
|
|
||||||
+ ___DTOR_LIST__ = .;
|
|
||||||
+ __DTOR_LIST__ = .;
|
|
||||||
LONG (-1); LONG (-1);
|
|
||||||
KEEP (*(.dtors));
|
|
||||||
KEEP (*(.dtor));
|
|
||||||
--
|
|
||||||
2.18.2
|
|
||||||
|
|
||||||
11
SOURCES/binutils-2.27-aarch64-ifunc.patch
Normal file
11
SOURCES/binutils-2.27-aarch64-ifunc.patch
Normal file
@ -0,0 +1,11 @@
|
|||||||
|
diff -rup binutils.orig/bfd/elfnn-aarch64.c binutils-2.27/bfd/elfnn-aarch64.c
|
||||||
|
--- binutils.orig/bfd/elfnn-aarch64.c 2017-02-21 10:45:19.311956006 +0000
|
||||||
|
+++ binutils-2.27/bfd/elfnn-aarch64.c 2017-02-21 11:55:07.517922655 +0000
|
||||||
|
@@ -4947,6 +4947,7 @@ elfNN_aarch64_final_link_relocate (reloc
|
||||||
|
it here if it is defined in a non-shared object. */
|
||||||
|
if (h != NULL
|
||||||
|
&& h->type == STT_GNU_IFUNC
|
||||||
|
+ && (input_section->flags & SEC_ALLOC)
|
||||||
|
&& h->def_regular)
|
||||||
|
{
|
||||||
|
asection *plt;
|
||||||
11
SOURCES/binutils-autoconf-version.patch
Normal file
11
SOURCES/binutils-autoconf-version.patch
Normal file
@ -0,0 +1,11 @@
|
|||||||
|
--- binutils.orig/config/override.m4 2021-08-31 14:20:17.275574804 +0100
|
||||||
|
+++ binutils-2.37/config/override.m4 2021-08-31 14:36:37.793954247 +0100
|
||||||
|
@@ -41,7 +41,7 @@ dnl Or for updating the whole tree at on
|
||||||
|
AC_DEFUN([_GCC_AUTOCONF_VERSION_CHECK],
|
||||||
|
[m4_if(m4_defn([_GCC_AUTOCONF_VERSION]),
|
||||||
|
m4_defn([m4_PACKAGE_VERSION]), [],
|
||||||
|
- [m4_fatal([Please use exactly Autoconf ]_GCC_AUTOCONF_VERSION[ instead of ]m4_defn([m4_PACKAGE_VERSION])[.])])
|
||||||
|
+ [])
|
||||||
|
])
|
||||||
|
m4_define([AC_INIT], m4_defn([AC_INIT])[
|
||||||
|
_GCC_AUTOCONF_VERSION_CHECK
|
||||||
85
SOURCES/binutils-do-not-link-with-static-libstdc++.patch
Normal file
85
SOURCES/binutils-do-not-link-with-static-libstdc++.patch
Normal file
@ -0,0 +1,85 @@
|
|||||||
|
diff -rup binutils.orig/configure binutils-2.40/configure
|
||||||
|
--- binutils.orig/configure 2023-02-13 14:43:00.728877170 +0000
|
||||||
|
+++ binutils-2.40/configure 2023-02-13 14:43:13.671864892 +0000
|
||||||
|
@@ -5442,49 +5442,6 @@ if test -z "$LD"; then
|
||||||
|
fi
|
||||||
|
fi
|
||||||
|
|
||||||
|
-# Check whether -static-libstdc++ -static-libgcc is supported.
|
||||||
|
-have_static_libs=no
|
||||||
|
-if test "$GCC" = yes; then
|
||||||
|
- saved_LDFLAGS="$LDFLAGS"
|
||||||
|
-
|
||||||
|
- LDFLAGS="$LDFLAGS -static-libstdc++ -static-libgcc"
|
||||||
|
- { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether g++ accepts -static-libstdc++ -static-libgcc" >&5
|
||||||
|
-$as_echo_n "checking whether g++ accepts -static-libstdc++ -static-libgcc... " >&6; }
|
||||||
|
- ac_ext=cpp
|
||||||
|
-ac_cpp='$CXXCPP $CPPFLAGS'
|
||||||
|
-ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
|
||||||
|
-ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
|
||||||
|
-ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
|
||||||
|
-
|
||||||
|
-
|
||||||
|
-cat confdefs.h - <<_ACEOF >conftest.$ac_ext
|
||||||
|
-/* end confdefs.h. */
|
||||||
|
-
|
||||||
|
-#if (__GNUC__ < 4) || (__GNUC__ == 4 && __GNUC_MINOR__ < 5)
|
||||||
|
-#error -static-libstdc++ not implemented
|
||||||
|
-#endif
|
||||||
|
-int main() {}
|
||||||
|
-_ACEOF
|
||||||
|
-if ac_fn_cxx_try_link "$LINENO"; then :
|
||||||
|
- { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
|
||||||
|
-$as_echo "yes" >&6; }; have_static_libs=yes
|
||||||
|
-else
|
||||||
|
- { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
|
||||||
|
-$as_echo "no" >&6; }
|
||||||
|
-fi
|
||||||
|
-rm -f core conftest.err conftest.$ac_objext \
|
||||||
|
- conftest$ac_exeext conftest.$ac_ext
|
||||||
|
- ac_ext=c
|
||||||
|
-ac_cpp='$CPP $CPPFLAGS'
|
||||||
|
-ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
|
||||||
|
-ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
|
||||||
|
-ac_compiler_gnu=$ac_cv_c_compiler_gnu
|
||||||
|
-
|
||||||
|
-
|
||||||
|
- LDFLAGS="$saved_LDFLAGS"
|
||||||
|
-fi
|
||||||
|
-
|
||||||
|
-
|
||||||
|
|
||||||
|
|
||||||
|
if test -n "$ac_tool_prefix"; then
|
||||||
|
diff -rup binutils.orig/configure.ac binutils-2.40/configure.ac
|
||||||
|
--- binutils.orig/configure.ac 2023-02-13 14:43:00.728877170 +0000
|
||||||
|
+++ binutils-2.40/configure.ac 2023-02-13 14:43:13.671864892 +0000
|
||||||
|
@@ -1435,26 +1435,6 @@ if test -z "$LD"; then
|
||||||
|
fi
|
||||||
|
fi
|
||||||
|
|
||||||
|
-# Check whether -static-libstdc++ -static-libgcc is supported.
|
||||||
|
-have_static_libs=no
|
||||||
|
-if test "$GCC" = yes; then
|
||||||
|
- saved_LDFLAGS="$LDFLAGS"
|
||||||
|
-
|
||||||
|
- LDFLAGS="$LDFLAGS -static-libstdc++ -static-libgcc"
|
||||||
|
- AC_MSG_CHECKING([whether g++ accepts -static-libstdc++ -static-libgcc])
|
||||||
|
- AC_LANG_PUSH(C++)
|
||||||
|
- AC_LINK_IFELSE([AC_LANG_SOURCE([
|
||||||
|
-#if (__GNUC__ < 4) || (__GNUC__ == 4 && __GNUC_MINOR__ < 5)
|
||||||
|
-#error -static-libstdc++ not implemented
|
||||||
|
-#endif
|
||||||
|
-int main() {}])],
|
||||||
|
- [AC_MSG_RESULT([yes]); have_static_libs=yes],
|
||||||
|
- [AC_MSG_RESULT([no])])
|
||||||
|
- AC_LANG_POP(C++)
|
||||||
|
-
|
||||||
|
- LDFLAGS="$saved_LDFLAGS"
|
||||||
|
-fi
|
||||||
|
-
|
||||||
|
ACX_PROG_GNAT
|
||||||
|
ACX_PROG_GDC
|
||||||
|
ACX_PROG_CMP_IGNORE_INITIAL
|
||||||
|
Only in binutils-2.40: configure.ac.orig
|
||||||
|
Only in binutils-2.40: configure.orig
|
||||||
33
SOURCES/binutils-export-demangle.h.patch
Normal file
33
SOURCES/binutils-export-demangle.h.patch
Normal file
@ -0,0 +1,33 @@
|
|||||||
|
diff -rup binutils.orig/bfd/Makefile.am binutils-2.32/bfd/Makefile.am
|
||||||
|
--- binutils.orig/bfd/Makefile.am 2019-02-08 12:22:51.395684251 +0000
|
||||||
|
+++ binutils-2.32/bfd/Makefile.am 2019-02-08 12:22:53.970664973 +0000
|
||||||
|
@@ -33,7 +33,7 @@ bfdlibdir = @bfdlibdir@
|
||||||
|
bfdincludedir = @bfdincludedir@
|
||||||
|
bfdlib_LTLIBRARIES = libbfd.la
|
||||||
|
bfdinclude_HEADERS = $(BFD_H) $(INCDIR)/ansidecl.h $(INCDIR)/symcat.h \
|
||||||
|
- $(INCDIR)/diagnostics.h $(INCDIR)/bfdlink.h
|
||||||
|
+ $(INCDIR)/diagnostics.h $(INCDIR)/bfdlink.h $(INCDIR)/demangle.h
|
||||||
|
else !INSTALL_LIBBFD
|
||||||
|
# Empty these so that the respective installation directories will not be created.
|
||||||
|
bfdlibdir =
|
||||||
|
diff -rup binutils.orig/bfd/Makefile.in binutils-2.32/bfd/Makefile.in
|
||||||
|
--- binutils.orig/bfd/Makefile.in 2019-02-08 12:21:35.291254044 +0000
|
||||||
|
+++ binutils-2.32/bfd/Makefile.in 2019-02-08 12:22:10.163992947 +0000
|
||||||
|
@@ -249,7 +249,7 @@ am__can_run_installinfo = \
|
||||||
|
esac
|
||||||
|
am__bfdinclude_HEADERS_DIST = $(INCDIR)/plugin-api.h bfd.h \
|
||||||
|
$(INCDIR)/ansidecl.h $(INCDIR)/symcat.h \
|
||||||
|
- $(INCDIR)/diagnostics.h $(INCDIR)/bfdlink.h
|
||||||
|
+ $(INCDIR)/diagnostics.h $(INCDIR)/bfdlink.h $(INCDIR)/demangle.h
|
||||||
|
HEADERS = $(bfdinclude_HEADERS)
|
||||||
|
RECURSIVE_CLEAN_TARGETS = mostlyclean-recursive clean-recursive \
|
||||||
|
distclean-recursive maintainer-clean-recursive
|
||||||
|
@@ -468,7 +468,7 @@ libbfd_la_LDFLAGS = $(am__append_1) -rel
|
||||||
|
@INSTALL_LIBBFD_FALSE@bfdinclude_HEADERS = $(am__append_2)
|
||||||
|
@INSTALL_LIBBFD_TRUE@bfdinclude_HEADERS = $(BFD_H) \
|
||||||
|
@INSTALL_LIBBFD_TRUE@ $(INCDIR)/ansidecl.h $(INCDIR)/symcat.h \
|
||||||
|
-@INSTALL_LIBBFD_TRUE@ $(INCDIR)/diagnostics.h \
|
||||||
|
+@INSTALL_LIBBFD_TRUE@ $(INCDIR)/diagnostics.h $(INCDIR)/demangle.h \
|
||||||
|
@INSTALL_LIBBFD_TRUE@ $(INCDIR)/bfdlink.h $(am__append_2)
|
||||||
|
@INSTALL_LIBBFD_FALSE@rpath_bfdlibdir = @bfdlibdir@
|
||||||
|
@INSTALL_LIBBFD_FALSE@noinst_LTLIBRARIES = libbfd.la
|
||||||
11
SOURCES/binutils-fix-ar-test.patch
Normal file
11
SOURCES/binutils-fix-ar-test.patch
Normal file
@ -0,0 +1,11 @@
|
|||||||
|
--- binutils.orig/binutils/testsuite/binutils-all/ar.exp 2024-02-07 13:02:23.490031197 +0000
|
||||||
|
+++ binutils-2.42/binutils/testsuite/binutils-all/ar.exp 2024-02-07 13:03:10.285034069 +0000
|
||||||
|
@@ -1017,7 +1017,7 @@ symbol_table
|
||||||
|
argument_parsing
|
||||||
|
deterministic_archive
|
||||||
|
replacing_deterministic_member
|
||||||
|
-replacing_non_deterministic_member
|
||||||
|
+# replacing_non_deterministic_member
|
||||||
|
replacing_sde_deterministic_member
|
||||||
|
delete_an_element
|
||||||
|
move_an_element
|
||||||
11
SOURCES/binutils-gold-empty-dwp.patch
Normal file
11
SOURCES/binutils-gold-empty-dwp.patch
Normal file
@ -0,0 +1,11 @@
|
|||||||
|
--- binutils.orig/gold/dwp.cc 2023-05-02 13:26:44.075148082 +0100
|
||||||
|
+++ binutils-2.40/gold/dwp.cc 2023-05-02 13:27:16.189130127 +0100
|
||||||
|
@@ -2418,6 +2418,8 @@ main(int argc, char** argv)
|
||||||
|
{
|
||||||
|
Dwo_file exe_file(exe_filename);
|
||||||
|
exe_file.read_executable(&files);
|
||||||
|
+ if (files.empty())
|
||||||
|
+ gold_fatal(_("Could not find any dwo links in specified EXE"));
|
||||||
|
}
|
||||||
|
|
||||||
|
// Add any additional files listed on command line.
|
||||||
193
SOURCES/binutils-gold-i386-gnu-property-notes.patch
Normal file
193
SOURCES/binutils-gold-i386-gnu-property-notes.patch
Normal file
@ -0,0 +1,193 @@
|
|||||||
|
diff --git a/gold/i386.cc b/gold/i386.cc
|
||||||
|
index bf209fe9a86..31161ff091c 100644
|
||||||
|
--- a/gold/i386.cc
|
||||||
|
+++ b/gold/i386.cc
|
||||||
|
@@ -360,7 +360,11 @@ class Target_i386 : public Sized_target<32, false>
|
||||||
|
got_(NULL), plt_(NULL), got_plt_(NULL), got_irelative_(NULL),
|
||||||
|
got_tlsdesc_(NULL), global_offset_table_(NULL), rel_dyn_(NULL),
|
||||||
|
rel_irelative_(NULL), copy_relocs_(elfcpp::R_386_COPY),
|
||||||
|
- got_mod_index_offset_(-1U), tls_base_symbol_defined_(false)
|
||||||
|
+ got_mod_index_offset_(-1U), tls_base_symbol_defined_(false),
|
||||||
|
+ isa_1_used_(0), isa_1_needed_(0),
|
||||||
|
+ feature_1_(0), feature_2_used_(0), feature_2_needed_(0),
|
||||||
|
+ object_isa_1_used_(0), object_feature_1_(0),
|
||||||
|
+ object_feature_2_used_(0), seen_first_object_(false)
|
||||||
|
{ }
|
||||||
|
|
||||||
|
// Process the relocations to determine unreferenced sections for
|
||||||
|
@@ -859,6 +863,21 @@ class Target_i386 : public Sized_target<32, false>
|
||||||
|
this->rel_dyn_section(layout));
|
||||||
|
}
|
||||||
|
|
||||||
|
+ // Record a target-specific program property in the .note.gnu.property
|
||||||
|
+ // section.
|
||||||
|
+ void
|
||||||
|
+ record_gnu_property(unsigned int, unsigned int, size_t,
|
||||||
|
+ const unsigned char*, const Object*);
|
||||||
|
+
|
||||||
|
+ // Merge the target-specific program properties from the current object.
|
||||||
|
+ void
|
||||||
|
+ merge_gnu_properties(const Object*);
|
||||||
|
+
|
||||||
|
+ // Finalize the target-specific program properties and add them back to
|
||||||
|
+ // the layout.
|
||||||
|
+ void
|
||||||
|
+ do_finalize_gnu_properties(Layout*) const;
|
||||||
|
+
|
||||||
|
// Information about this specific target which we pass to the
|
||||||
|
// general Target structure.
|
||||||
|
static const Target::Target_info i386_info;
|
||||||
|
@@ -898,6 +917,26 @@ class Target_i386 : public Sized_target<32, false>
|
||||||
|
unsigned int got_mod_index_offset_;
|
||||||
|
// True if the _TLS_MODULE_BASE_ symbol has been defined.
|
||||||
|
bool tls_base_symbol_defined_;
|
||||||
|
+
|
||||||
|
+ // Target-specific program properties, from .note.gnu.property section.
|
||||||
|
+ // Each bit represents a specific feature.
|
||||||
|
+ uint32_t isa_1_used_;
|
||||||
|
+ uint32_t isa_1_needed_;
|
||||||
|
+ uint32_t feature_1_;
|
||||||
|
+ uint32_t feature_2_used_;
|
||||||
|
+ uint32_t feature_2_needed_;
|
||||||
|
+ // Target-specific properties from the current object.
|
||||||
|
+ // These bits get ORed into ISA_1_USED_ after all properties for the object
|
||||||
|
+ // have been processed. But if either is all zeroes (as when the property
|
||||||
|
+ // is absent from an object), the result should be all zeroes.
|
||||||
|
+ // (See PR ld/23486.)
|
||||||
|
+ uint32_t object_isa_1_used_;
|
||||||
|
+ // These bits get ANDed into FEATURE_1_ after all properties for the object
|
||||||
|
+ // have been processed.
|
||||||
|
+ uint32_t object_feature_1_;
|
||||||
|
+ uint32_t object_feature_2_used_;
|
||||||
|
+ // Whether we have seen our first object, for use in initializing FEATURE_1_.
|
||||||
|
+ bool seen_first_object_;
|
||||||
|
};
|
||||||
|
|
||||||
|
const Target::Target_info Target_i386::i386_info =
|
||||||
|
@@ -1042,6 +1081,126 @@ Target_i386::rel_irelative_section(Layout* layout)
|
||||||
|
return this->rel_irelative_;
|
||||||
|
}
|
||||||
|
|
||||||
|
+// Record a target-specific program property from the .note.gnu.property
|
||||||
|
+// section.
|
||||||
|
+void
|
||||||
|
+Target_i386::record_gnu_property(
|
||||||
|
+ unsigned int, unsigned int pr_type,
|
||||||
|
+ size_t pr_datasz, const unsigned char* pr_data,
|
||||||
|
+ const Object* object)
|
||||||
|
+{
|
||||||
|
+ uint32_t val = 0;
|
||||||
|
+
|
||||||
|
+ switch (pr_type)
|
||||||
|
+ {
|
||||||
|
+ case elfcpp::GNU_PROPERTY_X86_COMPAT_ISA_1_USED:
|
||||||
|
+ case elfcpp::GNU_PROPERTY_X86_COMPAT_ISA_1_NEEDED:
|
||||||
|
+ case elfcpp::GNU_PROPERTY_X86_COMPAT_2_ISA_1_USED:
|
||||||
|
+ case elfcpp::GNU_PROPERTY_X86_COMPAT_2_ISA_1_NEEDED:
|
||||||
|
+ case elfcpp::GNU_PROPERTY_X86_ISA_1_USED:
|
||||||
|
+ case elfcpp::GNU_PROPERTY_X86_ISA_1_NEEDED:
|
||||||
|
+ case elfcpp::GNU_PROPERTY_X86_FEATURE_1_AND:
|
||||||
|
+ case elfcpp::GNU_PROPERTY_X86_FEATURE_2_USED:
|
||||||
|
+ case elfcpp::GNU_PROPERTY_X86_FEATURE_2_NEEDED:
|
||||||
|
+ if (pr_datasz != 4)
|
||||||
|
+ {
|
||||||
|
+ gold_warning(_("%s: corrupt .note.gnu.property section "
|
||||||
|
+ "(pr_datasz for property %d is not 4)"),
|
||||||
|
+ object->name().c_str(), pr_type);
|
||||||
|
+ return;
|
||||||
|
+ }
|
||||||
|
+ val = elfcpp::Swap<32, false>::readval(pr_data);
|
||||||
|
+ break;
|
||||||
|
+ default:
|
||||||
|
+ gold_warning(_("%s: unknown program property type 0x%x "
|
||||||
|
+ "in .note.gnu.property section"),
|
||||||
|
+ object->name().c_str(), pr_type);
|
||||||
|
+ break;
|
||||||
|
+ }
|
||||||
|
+
|
||||||
|
+ switch (pr_type)
|
||||||
|
+ {
|
||||||
|
+ case elfcpp::GNU_PROPERTY_X86_ISA_1_USED:
|
||||||
|
+ this->object_isa_1_used_ |= val;
|
||||||
|
+ break;
|
||||||
|
+ case elfcpp::GNU_PROPERTY_X86_ISA_1_NEEDED:
|
||||||
|
+ this->isa_1_needed_ |= val;
|
||||||
|
+ break;
|
||||||
|
+ case elfcpp::GNU_PROPERTY_X86_FEATURE_1_AND:
|
||||||
|
+ // If we see multiple feature props in one object, OR them together.
|
||||||
|
+ this->object_feature_1_ |= val;
|
||||||
|
+ break;
|
||||||
|
+ case elfcpp::GNU_PROPERTY_X86_FEATURE_2_USED:
|
||||||
|
+ this->object_feature_2_used_ |= val;
|
||||||
|
+ break;
|
||||||
|
+ case elfcpp::GNU_PROPERTY_X86_FEATURE_2_NEEDED:
|
||||||
|
+ this->feature_2_needed_ |= val;
|
||||||
|
+ break;
|
||||||
|
+ }
|
||||||
|
+}
|
||||||
|
+
|
||||||
|
+// Merge the target-specific program properties from the current object.
|
||||||
|
+void
|
||||||
|
+Target_i386::merge_gnu_properties(const Object*)
|
||||||
|
+{
|
||||||
|
+ if (this->seen_first_object_)
|
||||||
|
+ {
|
||||||
|
+ // If any object is missing the ISA_1_USED property, we must omit
|
||||||
|
+ // it from the output file.
|
||||||
|
+ if (this->object_isa_1_used_ == 0)
|
||||||
|
+ this->isa_1_used_ = 0;
|
||||||
|
+ else if (this->isa_1_used_ != 0)
|
||||||
|
+ this->isa_1_used_ |= this->object_isa_1_used_;
|
||||||
|
+ this->feature_1_ &= this->object_feature_1_;
|
||||||
|
+ // If any object is missing the FEATURE_2_USED property, we must
|
||||||
|
+ // omit it from the output file.
|
||||||
|
+ if (this->object_feature_2_used_ == 0)
|
||||||
|
+ this->feature_2_used_ = 0;
|
||||||
|
+ else if (this->feature_2_used_ != 0)
|
||||||
|
+ this->feature_2_used_ |= this->object_feature_2_used_;
|
||||||
|
+ }
|
||||||
|
+ else
|
||||||
|
+ {
|
||||||
|
+ this->isa_1_used_ = this->object_isa_1_used_;
|
||||||
|
+ this->feature_1_ = this->object_feature_1_;
|
||||||
|
+ this->feature_2_used_ = this->object_feature_2_used_;
|
||||||
|
+ this->seen_first_object_ = true;
|
||||||
|
+ }
|
||||||
|
+ this->object_isa_1_used_ = 0;
|
||||||
|
+ this->object_feature_1_ = 0;
|
||||||
|
+ this->object_feature_2_used_ = 0;
|
||||||
|
+}
|
||||||
|
+
|
||||||
|
+static inline void
|
||||||
|
+add_property(Layout* layout, unsigned int pr_type, uint32_t val)
|
||||||
|
+{
|
||||||
|
+ unsigned char buf[4];
|
||||||
|
+ elfcpp::Swap<32, false>::writeval(buf, val);
|
||||||
|
+ layout->add_gnu_property(elfcpp::NT_GNU_PROPERTY_TYPE_0, pr_type, 4, buf);
|
||||||
|
+}
|
||||||
|
+
|
||||||
|
+// Finalize the target-specific program properties and add them back to
|
||||||
|
+// the layout.
|
||||||
|
+void
|
||||||
|
+Target_i386::do_finalize_gnu_properties(Layout* layout) const
|
||||||
|
+{
|
||||||
|
+ if (this->isa_1_used_ != 0)
|
||||||
|
+ add_property(layout, elfcpp::GNU_PROPERTY_X86_ISA_1_USED,
|
||||||
|
+ this->isa_1_used_);
|
||||||
|
+ if (this->isa_1_needed_ != 0)
|
||||||
|
+ add_property(layout, elfcpp::GNU_PROPERTY_X86_ISA_1_NEEDED,
|
||||||
|
+ this->isa_1_needed_);
|
||||||
|
+ if (this->feature_1_ != 0)
|
||||||
|
+ add_property(layout, elfcpp::GNU_PROPERTY_X86_FEATURE_1_AND,
|
||||||
|
+ this->feature_1_);
|
||||||
|
+ if (this->feature_2_used_ != 0)
|
||||||
|
+ add_property(layout, elfcpp::GNU_PROPERTY_X86_FEATURE_2_USED,
|
||||||
|
+ this->feature_2_used_);
|
||||||
|
+ if (this->feature_2_needed_ != 0)
|
||||||
|
+ add_property(layout, elfcpp::GNU_PROPERTY_X86_FEATURE_2_NEEDED,
|
||||||
|
+ this->feature_2_needed_);
|
||||||
|
+}
|
||||||
|
+
|
||||||
|
// Write the first three reserved words of the .got.plt section.
|
||||||
|
// The remainder of the section is written while writing the PLT
|
||||||
|
// in Output_data_plt_i386::do_write.
|
||||||
16
SOURCES/binutils-gold-ignore-execstack-error.patch
Normal file
16
SOURCES/binutils-gold-ignore-execstack-error.patch
Normal file
@ -0,0 +1,16 @@
|
|||||||
|
diff -rup binutils.orig/gold/options.h binutils-2.41/gold/options.h
|
||||||
|
--- binutils.orig/gold/options.h 2024-01-04 09:52:09.282002253 +0000
|
||||||
|
+++ binutils-2.41/gold/options.h 2024-01-04 09:52:51.890972630 +0000
|
||||||
|
@@ -855,6 +855,12 @@ class General_options
|
||||||
|
N_("(ARM only) Do not warn about objects with incompatible "
|
||||||
|
"enum sizes"));
|
||||||
|
|
||||||
|
+ DEFINE_bool_ignore(error_execstack, options::TWO_DASHES, '\0',
|
||||||
|
+ N_("Ignored"), N_("Ignored"));
|
||||||
|
+
|
||||||
|
+ DEFINE_bool_ignore(error_rwx_segments, options::TWO_DASHES, '\0',
|
||||||
|
+ N_("Ignored"), N_("Ignored"));
|
||||||
|
+
|
||||||
|
DEFINE_special(exclude_libs, options::TWO_DASHES, '\0',
|
||||||
|
N_("Exclude libraries from automatic export"),
|
||||||
|
N_(("lib,lib ...")));
|
||||||
19
SOURCES/binutils-gold-mismatched-section-flags.patch
Normal file
19
SOURCES/binutils-gold-mismatched-section-flags.patch
Normal file
@ -0,0 +1,19 @@
|
|||||||
|
diff -rup binutils.orig/gold/layout.cc binutils-2.32/gold/layout.cc
|
||||||
|
--- binutils.orig/gold/layout.cc 2019-06-24 14:37:36.013086899 +0100
|
||||||
|
+++ binutils-2.32/gold/layout.cc 2019-06-24 14:41:40.054517479 +0100
|
||||||
|
@@ -868,6 +868,7 @@ Layout::get_output_section(const char* n
|
||||||
|
&& (same_name->flags() & elfcpp::SHF_TLS) == 0)
|
||||||
|
os = same_name;
|
||||||
|
}
|
||||||
|
+#if 0 /* BZ 1722715, PR 17556. */
|
||||||
|
else if ((flags & elfcpp::SHF_TLS) == 0)
|
||||||
|
{
|
||||||
|
elfcpp::Elf_Xword zero_flags = 0;
|
||||||
|
@@ -878,6 +879,7 @@ Layout::get_output_section(const char* n
|
||||||
|
if (p != this->section_name_map_.end())
|
||||||
|
os = p->second;
|
||||||
|
}
|
||||||
|
+#endif
|
||||||
|
}
|
||||||
|
|
||||||
|
if (os == NULL)
|
||||||
27
SOURCES/binutils-gold-pack-relative-relocs.patch
Normal file
27
SOURCES/binutils-gold-pack-relative-relocs.patch
Normal file
@ -0,0 +1,27 @@
|
|||||||
|
diff --git a/gold/options.cc b/gold/options.cc
|
||||||
|
index c9834b66159..91d7802fffe 100644
|
||||||
|
--- a/gold/options.cc
|
||||||
|
+++ b/gold/options.cc
|
||||||
|
@@ -989,7 +989,7 @@ parse_short_option(int argc, const char** argv, int pos_in_argv_i,
|
||||||
|
}
|
||||||
|
|
||||||
|
// If we're a -z option, we need to parse our argument as a
|
||||||
|
- // long-option, e.g. "-z stacksize=8192".
|
||||||
|
+ // long-option, e.g. "-z stack-size=8192".
|
||||||
|
if (retval == &dash_z)
|
||||||
|
{
|
||||||
|
int dummy_i = 0;
|
||||||
|
diff --git a/gold/options.h b/gold/options.h
|
||||||
|
index 46f658f23ea..d16e38066da 100644
|
||||||
|
--- a/gold/options.h
|
||||||
|
+++ b/gold/options.h
|
||||||
|
@@ -1110,6 +1110,9 @@ class General_options
|
||||||
|
N_("Generate package metadata note"),
|
||||||
|
N_("[=JSON]"));
|
||||||
|
|
||||||
|
+ DEFINE_bool_ignore(pack_relative_relocs, options::DASH_Z, '\0',
|
||||||
|
+ N_("Ignored"), N_("Ignored"));
|
||||||
|
+
|
||||||
|
DEFINE_bool(pie, options::ONE_DASH, '\0', false,
|
||||||
|
N_("Create a position independent executable"),
|
||||||
|
N_("Do not create a position independent executable"));
|
||||||
66
SOURCES/binutils-gold-warn-unsupported.patch
Normal file
66
SOURCES/binutils-gold-warn-unsupported.patch
Normal file
@ -0,0 +1,66 @@
|
|||||||
|
Only in binutils-2.34/gold: autom4te.cache
|
||||||
|
diff -rup binutils.orig/gold/configure binutils-2.34/gold/configure
|
||||||
|
--- binutils.orig/gold/configure 2020-04-20 12:35:13.048297305 +0100
|
||||||
|
+++ binutils-2.34/gold/configure 2020-04-20 14:02:06.743725696 +0100
|
||||||
|
@@ -5180,7 +5180,8 @@ for targ in $target $canon_targets; do
|
||||||
|
. ${srcdir}/configure.tgt
|
||||||
|
|
||||||
|
if test "$targ_obj" = "UNKNOWN"; then
|
||||||
|
- as_fn_error $? "\"unsupported target $targ\"" "$LINENO" 5
|
||||||
|
+ { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: \"unsupported target $targ\"" >&5
|
||||||
|
+$as_echo "$as_me: WARNING: \"unsupported target $targ\"" >&2;}
|
||||||
|
else
|
||||||
|
targetobjs="$targetobjs ${targ_obj}.\$(OBJEXT)"
|
||||||
|
if test "$targ_extra_obj" != ""; then
|
||||||
|
diff -rup binutils.orig/gold/configure.ac binutils-2.34/gold/configure.ac
|
||||||
|
--- binutils.orig/gold/configure.ac 2020-04-20 12:35:13.050297291 +0100
|
||||||
|
+++ binutils-2.34/gold/configure.ac 2020-04-20 14:01:46.435868770 +0100
|
||||||
|
@@ -181,7 +181,7 @@ for targ in $target $canon_targets; do
|
||||||
|
. ${srcdir}/configure.tgt
|
||||||
|
|
||||||
|
if test "$targ_obj" = "UNKNOWN"; then
|
||||||
|
- AC_MSG_ERROR("unsupported target $targ")
|
||||||
|
+ AC_MSG_WARN("unsupported target $targ")
|
||||||
|
else
|
||||||
|
targetobjs="$targetobjs ${targ_obj}.\$(OBJEXT)"
|
||||||
|
if test "$targ_extra_obj" != ""; then
|
||||||
|
--- binutils.orig/ld/configure.tgt 2020-04-20 12:35:12.465301359 +0100
|
||||||
|
+++ binutils-2.34/ld/configure.tgt 2020-04-20 14:17:52.123066333 +0100
|
||||||
|
@@ -220,7 +220,7 @@ bfin-*-linux-uclibc*) targ_emul=elf32bfi
|
||||||
|
targ_extra_emuls="elf32bfin"
|
||||||
|
targ_extra_libpath=$targ_extra_emuls
|
||||||
|
;;
|
||||||
|
-bpf-*-*) targ_emul=elf64bpf
|
||||||
|
+bpf-* | bpf-*-*) targ_emul=elf64bpf
|
||||||
|
;;
|
||||||
|
cr16-*-elf*) targ_emul=elf32cr16
|
||||||
|
;;
|
||||||
|
@@ -1026,7 +1026,7 @@ z8k-*-coff) targ_emul=z8002
|
||||||
|
targ_extra_ofiles=
|
||||||
|
;;
|
||||||
|
*)
|
||||||
|
- echo 2>&1 "*** ld does not support target ${targ}"
|
||||||
|
+ echo 2>&1 "*** ld does not support target '${targ}' NO REALLY"
|
||||||
|
echo 2>&1 "*** see ld/configure.tgt for supported targets"
|
||||||
|
exit 1
|
||||||
|
|
||||||
|
--- binutils.orig/bfd/config.bfd 2020-04-20 12:35:13.038297375 +0100
|
||||||
|
+++ binutils-2.34/bfd/config.bfd 2020-04-20 14:25:26.452869193 +0100
|
||||||
|
@@ -473,7 +473,7 @@ case "${targ}" in
|
||||||
|
;;
|
||||||
|
|
||||||
|
#ifdef BFD64
|
||||||
|
- bpf-*-none)
|
||||||
|
+ bpf-*-none | bpf-*)
|
||||||
|
targ_defvec=bpf_elf64_le_vec
|
||||||
|
targ_selvecs=bpf_elf64_be_vec
|
||||||
|
targ_underscore=yes
|
||||||
|
@@ -1427,7 +1427,7 @@ case "${targ}" in
|
||||||
|
;;
|
||||||
|
|
||||||
|
*)
|
||||||
|
- echo 1>&2 "*** BFD does not support target ${targ}."
|
||||||
|
+ echo 1>&2 "*** BFD does not support target '${targ}'. Honest."
|
||||||
|
echo 1>&2 "*** Look in bfd/config.bfd for supported targets."
|
||||||
|
exit 1
|
||||||
|
;;
|
||||||
28
SOURCES/binutils-libtool-no-rpath.patch
Normal file
28
SOURCES/binutils-libtool-no-rpath.patch
Normal file
@ -0,0 +1,28 @@
|
|||||||
|
diff -rup binutils.orig/ltmain.sh binutils-2.37/ltmain.sh
|
||||||
|
--- binutils.orig/ltmain.sh 2022-01-27 16:23:09.304207432 +0000
|
||||||
|
+++ binutils-2.37/ltmain.sh 2022-01-27 16:23:18.380143759 +0000
|
||||||
|
@@ -7103,6 +7103,7 @@ EOF
|
||||||
|
rpath="$finalize_rpath"
|
||||||
|
test "$mode" != relink && rpath="$compile_rpath$rpath"
|
||||||
|
for libdir in $rpath; do
|
||||||
|
+ case "$libdir" in /usr/lib|/usr/lib64|/usr/lib/../lib|/usr/lib/../lib64) continue;; esac
|
||||||
|
if test -n "$hardcode_libdir_flag_spec"; then
|
||||||
|
if test -n "$hardcode_libdir_separator"; then
|
||||||
|
if test -z "$hardcode_libdirs"; then
|
||||||
|
@@ -7798,6 +7799,7 @@ EOF
|
||||||
|
rpath=
|
||||||
|
hardcode_libdirs=
|
||||||
|
for libdir in $compile_rpath $finalize_rpath; do
|
||||||
|
+ case "$libdir" in /usr/lib|/usr/lib64|/usr/lib/../lib|/usr/lib/../lib64) continue;; esac
|
||||||
|
if test -n "$hardcode_libdir_flag_spec"; then
|
||||||
|
if test -n "$hardcode_libdir_separator"; then
|
||||||
|
if test -z "$hardcode_libdirs"; then
|
||||||
|
@@ -7849,6 +7851,7 @@ EOF
|
||||||
|
rpath=
|
||||||
|
hardcode_libdirs=
|
||||||
|
for libdir in $finalize_rpath; do
|
||||||
|
+ case "$libdir" in /usr/lib|/usr/lib64|/usr/lib/../lib|/usr/lib/../lib64) continue;; esac
|
||||||
|
if test -n "$hardcode_libdir_flag_spec"; then
|
||||||
|
if test -n "$hardcode_libdir_separator"; then
|
||||||
|
if test -z "$hardcode_libdirs"; then
|
||||||
|
Only in binutils-2.37: ltmain.sh.orig
|
||||||
28
SOURCES/binutils-no-config-h-check.patch
Normal file
28
SOURCES/binutils-no-config-h-check.patch
Normal file
@ -0,0 +1,28 @@
|
|||||||
|
--- a/bfd/bfd-in.h 2012-08-02 10:56:34.561769686 +0100
|
||||||
|
+++ b/bfd/bfd-in.h 2012-08-02 11:13:27.134797755 +0100
|
||||||
|
@@ -25,11 +25,6 @@
|
||||||
|
#ifndef __BFD_H_SEEN__
|
||||||
|
#define __BFD_H_SEEN__
|
||||||
|
|
||||||
|
-/* PR 14072: Ensure that config.h is included first. */
|
||||||
|
-#if !defined PACKAGE && !defined PACKAGE_VERSION
|
||||||
|
-#error config.h must be included before this header
|
||||||
|
-#endif
|
||||||
|
-
|
||||||
|
#ifdef __cplusplus
|
||||||
|
extern "C" {
|
||||||
|
#endif
|
||||||
|
--- a/bfd/bfd-in2.h 2012-08-02 10:56:34.349769680 +0100
|
||||||
|
+++ b/bfd/bfd-in2.h 2012-08-02 11:13:40.015798113 +0100
|
||||||
|
@@ -32,11 +32,6 @@
|
||||||
|
#ifndef __BFD_H_SEEN__
|
||||||
|
#define __BFD_H_SEEN__
|
||||||
|
|
||||||
|
-/* PR 14072: Ensure that config.h is included first. */
|
||||||
|
-#if !defined PACKAGE && !defined PACKAGE_VERSION
|
||||||
|
-#error config.h must be included before this header
|
||||||
|
-#endif
|
||||||
|
-
|
||||||
|
#ifdef __cplusplus
|
||||||
|
extern "C" {
|
||||||
|
#endif
|
||||||
167
SOURCES/binutils-revert-PLT-elision.patch
Normal file
167
SOURCES/binutils-revert-PLT-elision.patch
Normal file
@ -0,0 +1,167 @@
|
|||||||
|
diff -rup binutils.orig/ld/testsuite/ld-i386/pltgot-1.d binutils-2.29.1/ld/testsuite/ld-i386/pltgot-1.d
|
||||||
|
--- binutils.orig/ld/testsuite/ld-i386/pltgot-1.d 2017-11-15 13:32:39.335065263 +0000
|
||||||
|
+++ binutils-2.29.1/ld/testsuite/ld-i386/pltgot-1.d 2017-11-15 15:03:55.649727195 +0000
|
||||||
|
@@ -2,6 +2,7 @@
|
||||||
|
#readelf: -S --wide
|
||||||
|
#as: --32
|
||||||
|
|
||||||
|
+#pass
|
||||||
|
#...
|
||||||
|
+\[ *[0-9]+\] \.plt +PROGBITS +[0-9a-f]+ +[0-9a-f]+ +0+10 +.*
|
||||||
|
#...
|
||||||
|
diff -rup binutils.orig/ld/testsuite/ld-i386/pltgot-2.d binutils-2.29.1/ld/testsuite/ld-i386/pltgot-2.d
|
||||||
|
--- binutils.orig/ld/testsuite/ld-i386/pltgot-2.d 2017-11-15 13:32:39.329065335 +0000
|
||||||
|
+++ binutils-2.29.1/ld/testsuite/ld-i386/pltgot-2.d 2017-11-15 15:04:20.803430034 +0000
|
||||||
|
@@ -3,7 +3,6 @@
|
||||||
|
#readelf: -d --wide
|
||||||
|
#as: --32
|
||||||
|
|
||||||
|
-#failif
|
||||||
|
#...
|
||||||
|
+0x[0-9a-f]+ +\(PLTREL.*
|
||||||
|
#...
|
||||||
|
diff -rup binutils.orig/ld/testsuite/ld-i386/pr19636-2d.d binutils-2.29.1/ld/testsuite/ld-i386/pr19636-2d.d
|
||||||
|
--- binutils.orig/ld/testsuite/ld-i386/pr19636-2d.d 2017-11-15 13:32:39.336065251 +0000
|
||||||
|
+++ binutils-2.29.1/ld/testsuite/ld-i386/pr19636-2d.d 2017-11-15 15:03:00.413379749 +0000
|
||||||
|
@@ -9,7 +9,7 @@ Relocation section '\.rel\.dyn' at offse
|
||||||
|
[0-9a-f]+ +[0-9a-f]+ +R_386_32 +0+ +func
|
||||||
|
[0-9a-f]+ +[0-9a-f]+ +R_386_PC32 +0+ +func
|
||||||
|
[0-9a-f]+ +[0-9a-f]+ +R_386_GLOB_DAT +0+ +func
|
||||||
|
-
|
||||||
|
+#...
|
||||||
|
Symbol table '\.dynsym' contains [0-9]+ entries:
|
||||||
|
+Num: +Value +Size Type +Bind +Vis +Ndx Name
|
||||||
|
#...
|
||||||
|
diff -rup binutils.orig/ld/testsuite/ld-i386/pr19636-2e.d binutils-2.29.1/ld/testsuite/ld-i386/pr19636-2e.d
|
||||||
|
--- binutils.orig/ld/testsuite/ld-i386/pr19636-2e.d 2017-11-15 13:32:39.330065323 +0000
|
||||||
|
+++ binutils-2.29.1/ld/testsuite/ld-i386/pr19636-2e.d 2017-11-15 15:03:28.928042882 +0000
|
||||||
|
@@ -9,7 +9,7 @@ Relocation section '\.rel\.dyn' at offse
|
||||||
|
[0-9a-f]+ +[0-9a-f]+ +R_386_32 +0+ +func
|
||||||
|
[0-9a-f]+ +[0-9a-f]+ +R_386_PC32 +0+ +func
|
||||||
|
[0-9a-f]+ +[0-9a-f]+ +R_386_GLOB_DAT +0+ +func
|
||||||
|
-
|
||||||
|
+#...
|
||||||
|
Symbol table '\.dynsym' contains [0-9]+ entries:
|
||||||
|
+Num: +Value +Size Type +Bind +Vis +Ndx Name
|
||||||
|
#...
|
||||||
|
diff -rup binutils.orig/ld/testsuite/ld-x86-64/pltgot-1.d binutils-2.29.1/ld/testsuite/ld-x86-64/pltgot-1.d
|
||||||
|
--- binutils.orig/ld/testsuite/ld-x86-64/pltgot-1.d 2017-11-15 13:32:39.415064300 +0000
|
||||||
|
+++ binutils-2.29.1/ld/testsuite/ld-x86-64/pltgot-1.d 2017-11-15 15:08:39.333375801 +0000
|
||||||
|
@@ -2,8 +2,4 @@
|
||||||
|
#readelf: -S --wide
|
||||||
|
#as: --64
|
||||||
|
|
||||||
|
-#...
|
||||||
|
- +\[ *[0-9]+\] \.plt +PROGBITS +[0-9a-f]+ +[0-9a-f]+ +0+10 +.*
|
||||||
|
-#...
|
||||||
|
- +\[ *[0-9]+\] \.got\.plt +PROGBITS +[0-9a-f]+ +[0-9a-f]+ +0+18 +.*
|
||||||
|
#pass
|
||||||
|
diff -rup binutils.orig/ld/testsuite/ld-x86-64/pltgot-2.d binutils-2.29.1/ld/testsuite/ld-x86-64/pltgot-2.d
|
||||||
|
--- binutils.orig/ld/testsuite/ld-x86-64/pltgot-2.d 2017-11-15 13:32:39.404064432 +0000
|
||||||
|
+++ binutils-2.29.1/ld/testsuite/ld-x86-64/pltgot-2.d 2017-11-15 15:08:59.031143095 +0000
|
||||||
|
@@ -3,7 +3,6 @@
|
||||||
|
#readelf: -d --wide
|
||||||
|
#as: --64
|
||||||
|
|
||||||
|
-#failif
|
||||||
|
#...
|
||||||
|
+0x[0-9a-f]+ +\(PLTREL.*
|
||||||
|
#...
|
||||||
|
diff -rup binutils.orig/ld/testsuite/ld-x86-64/plt-main.rd binutils-2.29.1/ld/testsuite/ld-x86-64/plt-main.rd
|
||||||
|
--- binutils.orig/ld/testsuite/ld-x86-64/plt-main.rd 2017-11-15 13:32:39.407064397 +0000
|
||||||
|
+++ binutils-2.29.1/ld/testsuite/ld-x86-64/plt-main.rd 2017-11-15 15:06:17.244054423 +0000
|
||||||
|
@@ -1,4 +1,3 @@
|
||||||
|
-#failif
|
||||||
|
#...
|
||||||
|
[0-9a-f ]+R_X86_64_JUMP_SLOT +0+ +bar \+ 0
|
||||||
|
#...
|
||||||
|
diff -rup binutils.orig/ld/testsuite/ld-x86-64/pr20830a.d binutils-2.29.1/ld/testsuite/ld-x86-64/pr20830a.d
|
||||||
|
--- binutils.orig/ld/testsuite/ld-x86-64/pr20830a.d 2017-11-15 13:32:39.412064336 +0000
|
||||||
|
+++ binutils-2.29.1/ld/testsuite/ld-x86-64/pr20830a.d 2017-11-15 15:15:09.918750288 +0000
|
||||||
|
@@ -20,6 +20,7 @@ Contents of the .eh_frame section:
|
||||||
|
DW_CFA_offset: r16 \(rip\) at cfa-8
|
||||||
|
DW_CFA_nop
|
||||||
|
DW_CFA_nop
|
||||||
|
+#pass
|
||||||
|
|
||||||
|
0+18 0000000000000014 0000001c FDE cie=00000000 pc=00000000000001c8..00000000000001d4
|
||||||
|
DW_CFA_nop
|
||||||
|
diff -rup binutils.orig/ld/testsuite/ld-x86-64/pr20830a-now.d binutils-2.29.1/ld/testsuite/ld-x86-64/pr20830a-now.d
|
||||||
|
--- binutils.orig/ld/testsuite/ld-x86-64/pr20830a-now.d 2017-11-15 13:32:39.413064324 +0000
|
||||||
|
+++ binutils-2.29.1/ld/testsuite/ld-x86-64/pr20830a-now.d 2017-11-15 15:16:08.227055104 +0000
|
||||||
|
@@ -20,6 +20,7 @@ Contents of the .eh_frame section:
|
||||||
|
DW_CFA_offset: r16 \(rip\) at cfa-8
|
||||||
|
DW_CFA_nop
|
||||||
|
DW_CFA_nop
|
||||||
|
+#pass
|
||||||
|
|
||||||
|
0+18 0000000000000014 0000001c FDE cie=00000000 pc=00000000000001c8..00000000000001d4
|
||||||
|
DW_CFA_nop
|
||||||
|
diff -rup binutils.orig/ld/testsuite/ld-x86-64/pr20830b.d binutils-2.29.1/ld/testsuite/ld-x86-64/pr20830b.d
|
||||||
|
--- binutils.orig/ld/testsuite/ld-x86-64/pr20830b.d 2017-11-15 13:32:39.413064324 +0000
|
||||||
|
+++ binutils-2.29.1/ld/testsuite/ld-x86-64/pr20830b.d 2017-11-15 15:16:20.115913358 +0000
|
||||||
|
@@ -20,7 +20,8 @@ Contents of the .eh_frame section:
|
||||||
|
DW_CFA_offset: r16 \(rip\) at cfa-8
|
||||||
|
DW_CFA_nop
|
||||||
|
DW_CFA_nop
|
||||||
|
-
|
||||||
|
+#pass
|
||||||
|
+
|
||||||
|
0+18 0000000000000010 0000001c FDE cie=00000000 pc=0000000000000138..0000000000000144
|
||||||
|
DW_CFA_nop
|
||||||
|
DW_CFA_nop
|
||||||
|
diff -rup binutils.orig/ld/testsuite/ld-x86-64/pr20830b-now.d binutils-2.29.1/ld/testsuite/ld-x86-64/pr20830b-now.d
|
||||||
|
--- binutils.orig/ld/testsuite/ld-x86-64/pr20830b-now.d 2017-11-15 13:32:39.411064348 +0000
|
||||||
|
+++ binutils-2.29.1/ld/testsuite/ld-x86-64/pr20830b-now.d 2017-11-15 15:16:29.012807282 +0000
|
||||||
|
@@ -20,7 +20,8 @@ Contents of the .eh_frame section:
|
||||||
|
DW_CFA_offset: r16 \(rip\) at cfa-8
|
||||||
|
DW_CFA_nop
|
||||||
|
DW_CFA_nop
|
||||||
|
-
|
||||||
|
+#pass
|
||||||
|
+
|
||||||
|
0+18 0000000000000010 0000001c FDE cie=00000000 pc=0000000000000138..0000000000000144
|
||||||
|
DW_CFA_nop
|
||||||
|
DW_CFA_nop
|
||||||
|
diff -rup binutils.orig/ld/testsuite/ld-x86-64/tlspic2.rd binutils-2.29.1/ld/testsuite/ld-x86-64/tlspic2.rd
|
||||||
|
--- binutils.orig/ld/testsuite/ld-x86-64/tlspic2.rd 2017-11-15 13:32:39.417064276 +0000
|
||||||
|
+++ binutils-2.29.1/ld/testsuite/ld-x86-64/tlspic2.rd 2017-11-15 15:05:02.950932110 +0000
|
||||||
|
@@ -14,6 +14,7 @@ Section Headers:
|
||||||
|
+\[[ 0-9]+\] .dynsym +.*
|
||||||
|
+\[[ 0-9]+\] .dynstr +.*
|
||||||
|
+\[[ 0-9]+\] .rela.dyn +.*
|
||||||
|
+#pass
|
||||||
|
+\[[ 0-9]+\] .plt +.*
|
||||||
|
+\[[ 0-9]+\] .plt.got +.*
|
||||||
|
+\[[ 0-9]+\] .text +PROGBITS +0+1000 0+1000 0+31a 00 +AX +0 +0 4096
|
||||||
|
--- binutils.orig/bfd/elfxx-x86.c 2018-01-22 15:59:25.875788033 +0000
|
||||||
|
+++ binutils-2.30.0/bfd/elfxx-x86.c 2018-01-22 16:00:20.789146597 +0000
|
||||||
|
@@ -107,7 +107,7 @@ elf_x86_allocate_dynrelocs (struct elf_l
|
||||||
|
plt_entry_size = htab->plt.plt_entry_size;
|
||||||
|
|
||||||
|
resolved_to_zero = UNDEFINED_WEAK_RESOLVED_TO_ZERO (info, eh);
|
||||||
|
-
|
||||||
|
+#if 0
|
||||||
|
/* We can't use the GOT PLT if pointer equality is needed since
|
||||||
|
finish_dynamic_symbol won't clear symbol value and the dynamic
|
||||||
|
linker won't update the GOT slot. We will get into an infinite
|
||||||
|
@@ -125,7 +125,7 @@ elf_x86_allocate_dynrelocs (struct elf_l
|
||||||
|
/* Use the GOT PLT. */
|
||||||
|
eh->plt_got.refcount = 1;
|
||||||
|
}
|
||||||
|
-
|
||||||
|
+#endif
|
||||||
|
/* Since STT_GNU_IFUNC symbol must go through PLT, we handle it
|
||||||
|
here if it is defined and referenced in a non-shared object. */
|
||||||
|
if (h->type == STT_GNU_IFUNC
|
||||||
|
--- binutils.orig/ld/testsuite/ld-i386/pr20830.d 2018-07-09 09:49:51.277239857 +0100
|
||||||
|
+++ binutils-2.30.90/ld/testsuite/ld-i386/pr20830.d 2018-07-09 10:32:41.113356733 +0100
|
||||||
|
@@ -19,7 +19,7 @@ Contents of the .eh_frame section:
|
||||||
|
DW_CFA_offset: r8 \(eip\) at cfa-4
|
||||||
|
DW_CFA_nop
|
||||||
|
DW_CFA_nop
|
||||||
|
-
|
||||||
|
+#pass
|
||||||
|
0+18 00000010 0000001c FDE cie=00000000 pc=00000128..00000133
|
||||||
|
DW_CFA_nop
|
||||||
|
DW_CFA_nop
|
||||||
149
SOURCES/binutils-riscv-testsuite-fixes.patch
Normal file
149
SOURCES/binutils-riscv-testsuite-fixes.patch
Normal file
@ -0,0 +1,149 @@
|
|||||||
|
diff -rup binutils.orig/ld/testsuite/ld-riscv-elf/attr-phdr.d binutils-2.40/ld/testsuite/ld-riscv-elf/attr-phdr.d
|
||||||
|
--- binutils.orig/ld/testsuite/ld-riscv-elf/attr-phdr.d 2023-02-16 10:11:38.656875289 +0000
|
||||||
|
+++ binutils-2.40/ld/testsuite/ld-riscv-elf/attr-phdr.d 2023-02-16 10:49:26.786573665 +0000
|
||||||
|
@@ -12,8 +12,8 @@ Program Headers:
|
||||||
|
Type Offset VirtAddr PhysAddr FileSiz MemSiz Flg Align
|
||||||
|
RISCV_ATTRIBUT .*
|
||||||
|
LOAD .*
|
||||||
|
-
|
||||||
|
+#...
|
||||||
|
Section to Segment mapping:
|
||||||
|
Segment Sections...
|
||||||
|
00 .riscv.attributes
|
||||||
|
- 01 .text
|
||||||
|
+#pass
|
||||||
|
diff -rup binutils.orig/ld/testsuite/ld-riscv-elf/pcgp-relax-01.d binutils-2.40/ld/testsuite/ld-riscv-elf/pcgp-relax-01.d
|
||||||
|
--- binutils.orig/ld/testsuite/ld-riscv-elf/pcgp-relax-01.d 2023-02-16 10:11:38.659875285 +0000
|
||||||
|
+++ binutils-2.40/ld/testsuite/ld-riscv-elf/pcgp-relax-01.d 2023-02-16 10:42:54.803431287 +0000
|
||||||
|
@@ -8,7 +8,7 @@
|
||||||
|
Disassembly of section \.text:
|
||||||
|
|
||||||
|
0+[0-9a-f]+ <_start>:
|
||||||
|
-.*:[ ]+[0-9a-f]+[ ]+addi[ ]+a0,a0,[0-9]+
|
||||||
|
+.*:[ ]+[0-9a-f]+[ ]+addi[ ]+a0,a0,\-[0-9]+
|
||||||
|
.*:[ ]+[0-9a-f]+[ ]+jal[ ]+ra,[0-9a-f]+ <_start>
|
||||||
|
.*:[ ]+[0-9a-f]+[ ]+addi[ ]+a1,gp,\-[0-9]+ # [0-9a-f]+ <data_g>
|
||||||
|
.*:[ ]+[0-9a-f]+[ ]+addi[ ]+a2,gp,\-[0-9]+ # [0-9a-f]+ <data_g>
|
||||||
|
diff -rup binutils.orig/ld/testsuite/ld-riscv-elf/pcgp-relax-02.d binutils-2.40/ld/testsuite/ld-riscv-elf/pcgp-relax-02.d
|
||||||
|
--- binutils.orig/ld/testsuite/ld-riscv-elf/pcgp-relax-02.d 2023-02-16 10:11:38.659875285 +0000
|
||||||
|
+++ binutils-2.40/ld/testsuite/ld-riscv-elf/pcgp-relax-02.d 2023-02-16 10:43:49.540306593 +0000
|
||||||
|
@@ -11,5 +11,5 @@ Disassembly of section .text:
|
||||||
|
[0-9a-f]+ <_start>:
|
||||||
|
.*:[ ]+[0-9a-f]+[ ]+auipc[ ]+a1.*
|
||||||
|
.*:[ ]+[0-9a-f]+[ ]+addi[ ]+a0,gp.*<data_a>
|
||||||
|
-.*:[ ]+[0-9a-f]+[ ]+addi[ ]+a1,a1.*<data_b>
|
||||||
|
+.*:[ ]+[0-9a-f]+[ ]+mv[ ]+a1,a1
|
||||||
|
#pass
|
||||||
|
diff -rup binutils.orig/ld/testsuite/ld-riscv-elf/pcrel-lo-addend-2a.d binutils-2.40/ld/testsuite/ld-riscv-elf/pcrel-lo-addend-2a.d
|
||||||
|
--- binutils.orig/ld/testsuite/ld-riscv-elf/pcrel-lo-addend-2a.d 2023-02-16 10:11:38.659875285 +0000
|
||||||
|
+++ binutils-2.40/ld/testsuite/ld-riscv-elf/pcrel-lo-addend-2a.d 2023-02-16 10:46:55.570899994 +0000
|
||||||
|
@@ -2,4 +2,5 @@
|
||||||
|
#source: pcrel-lo-addend-2a.s
|
||||||
|
#as: -march=rv32ic
|
||||||
|
#ld: -m[riscv_choose_ilp32_emul] --no-relax
|
||||||
|
+#skip: *-*-*
|
||||||
|
#error: .*dangerous relocation: %pcrel_lo overflow with an addend, the value of %pcrel_hi is 0x1000 without any addend, but may be 0x2000 after adding the %pcrel_lo addend
|
||||||
|
diff -rup binutils.orig/ld/testsuite/ld-elf/dwarf.exp binutils-2.40/ld/testsuite/ld-elf/dwarf.exp
|
||||||
|
--- binutils.orig/ld/testsuite/ld-elf/dwarf.exp 2023-02-16 10:11:38.515875516 +0000
|
||||||
|
+++ binutils-2.40/ld/testsuite/ld-elf/dwarf.exp 2023-02-16 11:08:52.209377332 +0000
|
||||||
|
@@ -29,6 +29,10 @@ if ![is_elf_format] {
|
||||||
|
return
|
||||||
|
}
|
||||||
|
|
||||||
|
+if { [istarget riscv*-*-*] } then {
|
||||||
|
+ return
|
||||||
|
+}
|
||||||
|
+
|
||||||
|
# Skip targets where -shared is not supported
|
||||||
|
|
||||||
|
if ![check_shared_lib_support] {
|
||||||
|
diff -rup binutils.orig/ld/testsuite/ld-elf/tls.exp binutils-2.40/ld/testsuite/ld-elf/tls.exp
|
||||||
|
--- binutils.orig/ld/testsuite/ld-elf/tls.exp 2023-02-16 10:11:38.540875476 +0000
|
||||||
|
+++ binutils-2.40/ld/testsuite/ld-elf/tls.exp 2023-02-16 11:08:56.944369374 +0000
|
||||||
|
@@ -28,6 +28,10 @@ if { !([istarget *-*-linux*]
|
||||||
|
return
|
||||||
|
}
|
||||||
|
|
||||||
|
+if { [istarget riscv*-*-*] } then {
|
||||||
|
+ return
|
||||||
|
+}
|
||||||
|
+
|
||||||
|
# Check to see if the C compiler works.
|
||||||
|
if { ![check_compiler_available] } {
|
||||||
|
return
|
||||||
|
--- binutils.orig/binutils/testsuite/binutils-all/objcopy.exp 2023-08-24 07:48:30.429195480 +0100
|
||||||
|
+++ binutils-2.41/binutils/testsuite/binutils-all/objcopy.exp 2023-08-24 07:57:05.535302711 +0100
|
||||||
|
@@ -1409,6 +1409,8 @@ proc objcopy_test_without_global_symbol
|
||||||
|
# The AArch64 and ARM targets preserve mapping symbols
|
||||||
|
# in object files, so they will fail this test.
|
||||||
|
setup_xfail aarch64*-*-* arm*-*-*
|
||||||
|
+# The RISC-V target compiles with annotation enabled and these symbols remain after stripping.
|
||||||
|
+setup_xfail riscv*-*-*
|
||||||
|
|
||||||
|
objcopy_test_without_global_symbol
|
||||||
|
|
||||||
|
--- binutils.orig/ld/testsuite/ld-plugin/plugin.exp 2023-08-24 07:48:31.808196076 +0100
|
||||||
|
+++ binutils-2.41/ld/testsuite/ld-plugin/plugin.exp 2023-08-24 07:59:30.285716568 +0100
|
||||||
|
@@ -132,6 +132,10 @@ if [is_pecoff_format] {
|
||||||
|
append libs " --image-base=0x10000000"
|
||||||
|
}
|
||||||
|
|
||||||
|
+if { [istarget riscv*-*-*] } then {
|
||||||
|
+ return
|
||||||
|
+}
|
||||||
|
+
|
||||||
|
set plugin_tests [list \
|
||||||
|
[list "load plugin" "-plugin $plugin_path \
|
||||||
|
$testobjfiles $libs" "" "" "" {{ld plugin-1.d}} "main.x" ] \
|
||||||
|
--- binutils.orig/binutils/testsuite/binutils-all/compress.exp 2023-12-11 10:09:16.923374463 +0000
|
||||||
|
+++ binutils-2.41/binutils/testsuite/binutils-all/compress.exp 2023-12-12 09:00:15.150036675 +0000
|
||||||
|
@@ -818,6 +818,10 @@ proc test_gnu_debuglink {} {
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
+if { [istarget riscv*-*-*] } then {
|
||||||
|
+ return
|
||||||
|
+}
|
||||||
|
+
|
||||||
|
if {[is_elf_format]} then {
|
||||||
|
test_gnu_debuglink
|
||||||
|
}
|
||||||
|
--- binutils-2.41/ld/testsuite/ld-riscv-elf/pcgp-relax-01-norelaxgp.d 2023-07-03 00:00:00.000000000 +0100
|
||||||
|
+++ binutils.new/ld/testsuite/ld-riscv-elf/pcgp-relax-01-norelaxgp.d 2023-12-12 11:52:54.564057931 +0000
|
||||||
|
@@ -8,10 +8,10 @@
|
||||||
|
Disassembly of section \.text:
|
||||||
|
|
||||||
|
0+[0-9a-f]+ <_start>:
|
||||||
|
-.*:[ ]+[0-9a-f]+[ ]+addi[ ]+a0,a0,[0-9]+
|
||||||
|
+.*:[ ]+[0-9a-f]+[ ]+addi[ ]+a0,a0,\-[0-9]+
|
||||||
|
.*:[ ]+[0-9a-f]+[ ]+jal[ ]+ra,[0-9a-f]+ <_start>
|
||||||
|
.*:[ ]+[0-9a-f]+[ ]+auipc[ ]+a1,0x[0-9a-f]+
|
||||||
|
-.*:[ ]+[0-9a-f]+[ ]+addi[ ]+a1,a1,[0-9]+ # [0-9a-f]+ <data_g>
|
||||||
|
+.*:[ ]+[0-9a-f]+[ ]+addi[ ]+a1,a1,\-[0-9]+ # [0-9a-f]+ <data_g>
|
||||||
|
.*:[ ]+[0-9a-f]+[ ]+lui[ ]+a2,0x[0-9a-f]+
|
||||||
|
.*:[ ]+[0-9a-f]+[ ]+addi[ ]+a2,a2,[0-9]+ # [0-9a-f]+ <data_g>
|
||||||
|
.*:[ ]+[0-9a-f]+[ ]+addi[ ]+a3,tp,0 # 0 <data_t>
|
||||||
|
--- binutils.orig/binutils/testsuite/binutils-all/objcopy.exp 2023-12-12 14:21:10.225342926 +0000
|
||||||
|
+++ binutils-2.41/binutils/testsuite/binutils-all/objcopy.exp 2023-12-12 14:22:12.453421499 +0000
|
||||||
|
@@ -1410,7 +1410,7 @@ proc objcopy_test_without_global_symbol
|
||||||
|
# in object files, so they will fail this test.
|
||||||
|
setup_xfail aarch64*-*-* arm*-*-*
|
||||||
|
# The RISC-V target compiles with annotation enabled and these symbols remain after stripping.
|
||||||
|
-setup_xfail riscv*-*-*
|
||||||
|
+# setup_xfail riscv*-*-*
|
||||||
|
|
||||||
|
objcopy_test_without_global_symbol
|
||||||
|
|
||||||
|
--- binutils.orig/ld/testsuite/ld-ifunc/ifunc.exp 2024-02-08 10:12:23.739591113 +0000
|
||||||
|
+++ binutils-2.42/ld/testsuite/ld-ifunc/ifunc.exp 2024-02-08 10:14:58.243670115 +0000
|
||||||
|
@@ -666,6 +666,10 @@ run_cc_link_tests [list \
|
||||||
|
] \
|
||||||
|
]
|
||||||
|
|
||||||
|
+if {[istarget "riscv*-*-*"]} {
|
||||||
|
+ return
|
||||||
|
+}
|
||||||
|
+
|
||||||
|
run_ld_link_exec_tests [list \
|
||||||
|
[list \
|
||||||
|
"Run pr18808" \
|
||||||
13
SOURCES/binutils-suppress-ld-align-tests.patch
Normal file
13
SOURCES/binutils-suppress-ld-align-tests.patch
Normal file
@ -0,0 +1,13 @@
|
|||||||
|
--- binutils.orig/ld/testsuite/ld-elf/linux-x86.exp 2024-01-24 11:52:35.288014542 +0000
|
||||||
|
+++ binutils-2.41/ld/testsuite/ld-elf/linux-x86.exp 2024-01-24 17:31:39.356167357 +0000
|
||||||
|
@@ -225,6 +225,10 @@ if { [check_ifunc_attribute_available] }
|
||||||
|
# Old gcc silently ignores __attribute__ ((aligned())) with too big alignment.
|
||||||
|
proc compiler_honours_aligned { } {
|
||||||
|
global CC_FOR_TARGET READELF srcdir subdir
|
||||||
|
+
|
||||||
|
+ # Temporary fix for CentOS-10 kernel issue. (RHEL-22466)
|
||||||
|
+ return 0
|
||||||
|
+
|
||||||
|
ld_compile $CC_FOR_TARGET $srcdir/$subdir/p_align-1.c tmpdir/p_align-1.o
|
||||||
|
set output [run_host_cmd "$READELF" "-SW tmpdir/p_align-1.o"]
|
||||||
|
if { [regexp { [.]data *PROGBITS .* 8388608[\n]} $output] } {
|
||||||
1038
SOURCES/binutils-testsuite-fixes.patch
Normal file
1038
SOURCES/binutils-testsuite-fixes.patch
Normal file
File diff suppressed because it is too large
Load Diff
46
SOURCES/binutils-version.patch
Normal file
46
SOURCES/binutils-version.patch
Normal file
@ -0,0 +1,46 @@
|
|||||||
|
diff -rup binutils.orig/bfd/Makefile.am binutils-2.38/bfd/Makefile.am
|
||||||
|
--- binutils.orig/bfd/Makefile.am 2022-02-09 14:10:42.659300681 +0000
|
||||||
|
+++ binutils-2.38/bfd/Makefile.am 2022-02-09 14:12:40.562532916 +0000
|
||||||
|
@@ -977,8 +977,8 @@ DISTCLEANFILES = $(BUILD_CFILES) $(BUILD
|
||||||
|
bfdver.h: $(srcdir)/version.h $(srcdir)/development.sh $(srcdir)/Makefile.in
|
||||||
|
$(AM_V_GEN)\
|
||||||
|
bfd_version=`echo "$(VERSION)" | $(SED) -e 's/\([^\.]*\)\.*\([^\.]*\)\.*\([^\.]*\)\.*\([^\.]*\)\.*\([^\.]*\).*/\1.00\2.00\3.00\4.00\5/' -e 's/\([^\.]*\)\..*\(..\)\..*\(..\)\..*\(..\)\..*\(..\)$$/\1\2\3\4\5/'` ;\
|
||||||
|
- bfd_version_string="\"$(VERSION)\"" ;\
|
||||||
|
- bfd_soversion="$(VERSION)" ;\
|
||||||
|
+ bfd_version_string="\"$(VERSION)-%{release}\"" ;\
|
||||||
|
+ bfd_soversion="$(VERSION)-%{release}" ;\
|
||||||
|
bfd_version_package="\"$(PKGVERSION)\"" ;\
|
||||||
|
report_bugs_to="\"$(REPORT_BUGS_TO)\"" ;\
|
||||||
|
. $(srcdir)/development.sh ;\
|
||||||
|
@@ -989,7 +989,7 @@ bfdver.h: $(srcdir)/version.h $(srcdir)/
|
||||||
|
fi ;\
|
||||||
|
$(SED) -e "s,@bfd_version@,$$bfd_version," \
|
||||||
|
-e "s,@bfd_version_string@,$$bfd_version_string," \
|
||||||
|
- -e "s,@bfd_version_package@,$$bfd_version_package," \
|
||||||
|
+ -e "s,@bfd_version_package@,\"version \"," \
|
||||||
|
-e "s,@report_bugs_to@,$$report_bugs_to," \
|
||||||
|
< $(srcdir)/version.h > $@; \
|
||||||
|
echo "$${bfd_soversion}" > libtool-soversion
|
||||||
|
diff -rup binutils.orig/bfd/Makefile.in binutils-2.38/bfd/Makefile.in
|
||||||
|
--- binutils.orig/bfd/Makefile.in 2022-02-09 14:10:42.653300720 +0000
|
||||||
|
+++ binutils-2.38/bfd/Makefile.in 2022-02-09 14:19:03.362040188 +0000
|
||||||
|
@@ -2094,8 +2094,8 @@ stmp-lcoff-h: $(LIBCOFF_H_FILES) $(MKDOC
|
||||||
|
bfdver.h: $(srcdir)/version.h $(srcdir)/development.sh $(srcdir)/Makefile.in
|
||||||
|
$(AM_V_GEN)\
|
||||||
|
bfd_version=`echo "$(VERSION)" | $(SED) -e 's/\([^\.]*\)\.*\([^\.]*\)\.*\([^\.]*\)\.*\([^\.]*\)\.*\([^\.]*\).*/\1.00\2.00\3.00\4.00\5/' -e 's/\([^\.]*\)\..*\(..\)\..*\(..\)\..*\(..\)\..*\(..\)$$/\1\2\3\4\5/'` ;\
|
||||||
|
- bfd_version_string="\"$(VERSION)\"" ;\
|
||||||
|
- bfd_soversion="$(VERSION)" ;\
|
||||||
|
+ bfd_version_string="\"$(VERSION)-%{release}\"" ;\
|
||||||
|
+ bfd_soversion="$(VERSION)-%{release}" ;\
|
||||||
|
bfd_version_package="\"$(PKGVERSION)\"" ;\
|
||||||
|
report_bugs_to="\"$(REPORT_BUGS_TO)\"" ;\
|
||||||
|
. $(srcdir)/development.sh ;\
|
||||||
|
@@ -2106,7 +2106,7 @@ bfdver.h: $(srcdir)/version.h $(srcdir)/
|
||||||
|
fi ;\
|
||||||
|
$(SED) -e "s,@bfd_version@,$$bfd_version," \
|
||||||
|
-e "s,@bfd_version_string@,$$bfd_version_string," \
|
||||||
|
- -e "s,@bfd_version_package@,$$bfd_version_package," \
|
||||||
|
+ -e "s,@bfd_version_package@,\"version \"," \
|
||||||
|
-e "s,@report_bugs_to@,$$report_bugs_to," \
|
||||||
|
< $(srcdir)/version.h > $@; \
|
||||||
|
echo "$${bfd_soversion}" > libtool-soversion
|
||||||
@ -1,25 +1,134 @@
|
|||||||
%global run_testsuite 1
|
%global run_testsuite 1
|
||||||
|
%global mingw_build_ucrt64 1
|
||||||
|
%define enable_new_dtags 0
|
||||||
|
|
||||||
Name: mingw-binutils
|
Name: mingw-binutils
|
||||||
Version: 2.30
|
Version: 2.43.1
|
||||||
Release: 3%{?dist}
|
Release: 2%{?dist}
|
||||||
Summary: Cross-compiled version of binutils for Win32 and Win64 environments
|
Summary: Cross-compiled version of binutils for Win32 and Win64 environments
|
||||||
|
|
||||||
License: GPLv2+ and LGPLv2+ and GPLv3+ and LGPLv3+
|
License: GPL-3.0-or-later AND (GPL-3.0-or-later WITH Bison-exception-2.2) AND (LGPL-2.0-or-later WITH GCC-exception-2.0) AND BSD-3-Clause AND GFDL-1.3-or-later AND GPL-2.0-or-later AND LGPL-2.1-or-later AND LGPL-2.0-or-later
|
||||||
Group: Development/Libraries
|
|
||||||
|
|
||||||
URL: http://www.gnu.org/software/binutils/
|
URL: http://www.gnu.org/software/binutils/
|
||||||
Source0: http://ftp.gnu.org/gnu/binutils/binutils-%{version}.tar.bz2
|
Source0: http://ftp.gnu.org/gnu/binutils/binutils-%{version}.tar.xz
|
||||||
#Source0: http://www.kernel.org/pub/linux/devel/binutils/binutils-% {version}.tar.bz2
|
|
||||||
|
|
||||||
Patch0001: 0001-Remove-PROVIDE-qualifiers.patch
|
### Patches from native package
|
||||||
|
# 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).
|
||||||
|
# Not needed, mingw does not have lib64
|
||||||
|
# Patch01: binutils-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-version.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-export-demangle.h.patch
|
||||||
|
|
||||||
|
# Purpose: Disables the check in the BFD library's bfd.h 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.h header were
|
||||||
|
# fixed so that they do include the header files in the correct
|
||||||
|
# order.
|
||||||
|
Patch04: binutils-no-config-h-check.patch
|
||||||
|
|
||||||
|
# Purpose: Disable an x86/x86_64 optimization that moves functions from the
|
||||||
|
# PLT into the GOTPLT for faster access. This optimization is
|
||||||
|
# problematic for tools that want to intercept PLT entries, such
|
||||||
|
# as ltrace and LD_AUDIT. See BZs 1452111 and 1333481.
|
||||||
|
# Lifetime: Permanent. But it should not be.
|
||||||
|
# FIXME: Replace with a configure time option.
|
||||||
|
Patch05: binutils-revert-PLT-elision.patch
|
||||||
|
|
||||||
|
# Purpose: Do not create PLT entries for AARCH64 IFUNC symbols referenced in
|
||||||
|
# debug sections.
|
||||||
|
# Lifetime: Permanent.
|
||||||
|
# FIXME: Find related bug. Decide on permanency.
|
||||||
|
Patch06: binutils-2.27-aarch64-ifunc.patch
|
||||||
|
|
||||||
|
# Purpose: Stop the binutils from statically linking with libstdc++.
|
||||||
|
# Lifetime: Permanent.
|
||||||
|
Patch07: binutils-do-not-link-with-static-libstdc++.patch
|
||||||
|
|
||||||
|
# Purpose: Allow OS specific sections in section groups.
|
||||||
|
# Lifetime: Fixed in 2.43 (maybe)
|
||||||
|
# Patch08: binutils-special-sections-in-groups.patch
|
||||||
|
|
||||||
|
# Purpose: Stop gold from aborting when input sections with the same name
|
||||||
|
# have different flags.
|
||||||
|
# Lifetime: Fixed in 2.43 (maybe)
|
||||||
|
Patch09: binutils-gold-mismatched-section-flags.patch
|
||||||
|
|
||||||
|
# Purpose: Change the gold configuration script to only warn about
|
||||||
|
# unsupported targets. This allows the binutils to be built with
|
||||||
|
# BPF support enabled.
|
||||||
|
# Lifetime: Permanent.
|
||||||
|
Patch10: binutils-gold-warn-unsupported.patch
|
||||||
|
|
||||||
|
# Purpose: Enable the creation of .note.gnu.property sections by the GOLD
|
||||||
|
# linker for x86 binaries.
|
||||||
|
# Lifetime: Permanent.
|
||||||
|
Patch11: binutils-gold-i386-gnu-property-notes.patch
|
||||||
|
|
||||||
|
# Purpose: Allow the binutils to be configured with any (recent) version of
|
||||||
|
# autoconf.
|
||||||
|
# Lifetime: Fixed in 2.44 (maybe ?)
|
||||||
|
Patch12: binutils-autoconf-version.patch
|
||||||
|
|
||||||
|
# Purpose: Stop libtool from inserting useless runpaths into binaries.
|
||||||
|
# Lifetime: Who knows.
|
||||||
|
Patch13: binutils-libtool-no-rpath.patch
|
||||||
|
|
||||||
|
# Purpose: Stop an abort when using dwp to process a file with no dwo links.
|
||||||
|
# Lifetime: Fixed in 2.44 (maybe)
|
||||||
|
Patch15: binutils-gold-empty-dwp.patch
|
||||||
|
|
||||||
|
# Purpose: Fix binutils testsuite failures.
|
||||||
|
# Lifetime: Permanent, but varies with each rebase.
|
||||||
|
Patch16: binutils-testsuite-fixes.patch
|
||||||
|
|
||||||
|
# Purpose: Fix binutils testsuite failures for the RISCV-64 target.
|
||||||
|
# Lifetime: Permanent, but varies with each rebase.
|
||||||
|
Patch17: binutils-riscv-testsuite-fixes.patch
|
||||||
|
|
||||||
|
# Purpose: Make the GOLD linker ignore the "-z pack-relative-relocs" command line option.
|
||||||
|
# Lifetime: Fixed in 2.44 (maybe)
|
||||||
|
Patch18: binutils-gold-pack-relative-relocs.patch
|
||||||
|
|
||||||
|
# Purpose: Let the gold lihnker ignore --error-execstack and --error-rwx-segments.
|
||||||
|
# Lifetime: Fixed in 2.44 (maybe)
|
||||||
|
Patch19: binutils-gold-ignore-execstack-error.patch
|
||||||
|
|
||||||
|
# Purpose: Fix the ar test of non-deterministic archives.
|
||||||
|
# Lifetime: Fixed in 2.44
|
||||||
|
Patch20: binutils-fix-ar-test.patch
|
||||||
|
|
||||||
|
# Purpose: Suppress the x86 linker's p_align-1 tests due to kernel bug on CentOS-10
|
||||||
|
# Lifetime: TEMPORARY
|
||||||
|
Patch99: binutils-suppress-ld-align-tests.patch
|
||||||
|
|
||||||
|
|
||||||
|
BuildRequires: make
|
||||||
|
BuildRequires: gcc
|
||||||
BuildRequires: flex
|
BuildRequires: flex
|
||||||
BuildRequires: bison
|
BuildRequires: bison
|
||||||
BuildRequires: texinfo
|
BuildRequires: texinfo
|
||||||
BuildRequires: zlib-devel
|
BuildRequires: zlib-devel
|
||||||
BuildRequires: mingw32-filesystem >= 102
|
BuildRequires: mingw32-filesystem
|
||||||
BuildRequires: mingw64-filesystem >= 102
|
BuildRequires: mingw64-filesystem
|
||||||
|
BuildRequires: ucrt64-filesystem
|
||||||
%if %{run_testsuite}
|
%if %{run_testsuite}
|
||||||
BuildRequires: dejagnu
|
BuildRequires: dejagnu
|
||||||
BuildRequires: sharutils
|
BuildRequires: sharutils
|
||||||
@ -60,15 +169,35 @@ Requires: mingw64-filesystem >= 95
|
|||||||
Cross compiled binutils (utilities like 'strip', 'as', 'ld') which
|
Cross compiled binutils (utilities like 'strip', 'as', 'ld') which
|
||||||
understand Windows executables and DLLs.
|
understand Windows executables and DLLs.
|
||||||
|
|
||||||
|
%package -n ucrt64-binutils
|
||||||
|
Summary: Cross-compiled version of binutils for the Win64 environment
|
||||||
|
Requires: mingw-binutils-generic = %{version}-%{release}
|
||||||
|
|
||||||
|
# NB: This must be left in.
|
||||||
|
Requires: ucrt64-filesystem >= 133
|
||||||
|
|
||||||
|
%description -n ucrt64-binutils
|
||||||
|
Cross compiled binutils (utilities like 'strip', 'as', 'ld') which
|
||||||
|
understand Windows executables and DLLs.
|
||||||
|
|
||||||
|
|
||||||
%prep
|
%prep
|
||||||
%setup -q -n binutils-%{version}
|
%autosetup -p1 -n binutils-%{version}
|
||||||
%patch0001 -p1 -b .0001
|
|
||||||
|
# See Patch02
|
||||||
|
sed -i -e 's/%''{release}/%{release}/g' bfd/Makefile{.am,.in}
|
||||||
|
|
||||||
|
|
||||||
%build
|
%build
|
||||||
|
# We call configure directly rather than via macros, thus if
|
||||||
|
# we are using LTO, we have to manually fix the broken configure
|
||||||
|
# scripts
|
||||||
|
[ %{_lto_cflags}x != x ] && %{_fix_broken_configure_for_lto}
|
||||||
|
|
||||||
|
|
||||||
mkdir build_win32
|
mkdir build_win32
|
||||||
pushd build_win32
|
pushd build_win32
|
||||||
CFLAGS="$RPM_OPT_FLAGS" \
|
CFLAGS="%{optflags}" \
|
||||||
../configure \
|
../configure \
|
||||||
--build=%_build --host=%_host \
|
--build=%_build --host=%_host \
|
||||||
--target=%{mingw32_target} \
|
--target=%{mingw32_target} \
|
||||||
@ -81,12 +210,12 @@ CFLAGS="$RPM_OPT_FLAGS" \
|
|||||||
--mandir=%{_mandir} \
|
--mandir=%{_mandir} \
|
||||||
--infodir=%{_infodir}
|
--infodir=%{_infodir}
|
||||||
|
|
||||||
make all %{?_smp_mflags}
|
%make_build
|
||||||
popd
|
popd
|
||||||
|
|
||||||
mkdir build_win64
|
mkdir build_win64
|
||||||
pushd build_win64
|
pushd build_win64
|
||||||
CFLAGS="$RPM_OPT_FLAGS" \
|
CFLAGS="%{optflags}" \
|
||||||
../configure \
|
../configure \
|
||||||
--build=%_build --host=%_host \
|
--build=%_build --host=%_host \
|
||||||
--target=%{mingw64_target} \
|
--target=%{mingw64_target} \
|
||||||
@ -99,17 +228,35 @@ CFLAGS="$RPM_OPT_FLAGS" \
|
|||||||
--mandir=%{_mandir} \
|
--mandir=%{_mandir} \
|
||||||
--infodir=%{_infodir}
|
--infodir=%{_infodir}
|
||||||
|
|
||||||
make all %{?_smp_mflags}
|
%make_build
|
||||||
|
popd
|
||||||
|
|
||||||
|
mkdir build_ucrt64
|
||||||
|
pushd build_ucrt64
|
||||||
|
CFLAGS="%{optflags}" \
|
||||||
|
../configure \
|
||||||
|
--build=%_build --host=%_host \
|
||||||
|
--target=%{ucrt64_target} \
|
||||||
|
--disable-nls \
|
||||||
|
--with-sysroot=%{ucrt64_sysroot} \
|
||||||
|
--prefix=%{_prefix} \
|
||||||
|
--bindir=%{_bindir} \
|
||||||
|
--includedir=%{_includedir} \
|
||||||
|
--libdir=%{_libdir} \
|
||||||
|
--mandir=%{_mandir} \
|
||||||
|
--infodir=%{_infodir}
|
||||||
|
|
||||||
|
%make_build
|
||||||
popd
|
popd
|
||||||
|
|
||||||
# Create multilib versions for the tools strip, objdump nm, and objcopy
|
# Create multilib versions for the tools strip, objdump nm, and objcopy
|
||||||
mkdir build_multilib
|
mkdir build_multilib
|
||||||
pushd build_multilib
|
pushd build_multilib
|
||||||
CFLAGS="$RPM_OPT_FLAGS" \
|
CFLAGS="%{optflags}" \
|
||||||
../configure \
|
../configure \
|
||||||
--build=%_build --host=%_host \
|
--build=%_build --host=%_host \
|
||||||
--target=%{mingw64_target} \
|
--target=%{mingw64_target} \
|
||||||
--enable-targets=%{mingw64_target},%{mingw32_target} \
|
--enable-targets=%{mingw64_target},%{mingw32_target},%{ucrt64_target} \
|
||||||
--disable-nls \
|
--disable-nls \
|
||||||
--with-sysroot=%{mingw64_sysroot} \
|
--with-sysroot=%{mingw64_sysroot} \
|
||||||
--prefix=%{_prefix} \
|
--prefix=%{_prefix} \
|
||||||
@ -119,7 +266,7 @@ CFLAGS="$RPM_OPT_FLAGS" \
|
|||||||
--mandir=%{_mandir} \
|
--mandir=%{_mandir} \
|
||||||
--infodir=%{_infodir}
|
--infodir=%{_infodir}
|
||||||
|
|
||||||
make %{?_smp_mflags}
|
%make_build
|
||||||
popd
|
popd
|
||||||
|
|
||||||
|
|
||||||
@ -154,30 +301,47 @@ pushd build_win64
|
|||||||
uuencode binutils-%{mingw64_target}.tar.bz2 binutils-%{mingw64_target}.tar.bz2
|
uuencode binutils-%{mingw64_target}.tar.bz2 binutils-%{mingw64_target}.tar.bz2
|
||||||
rm -f binutils-%{mingw64_target}.tar.bz2 binutils-%{mingw64_target}-*.{sum,log}
|
rm -f binutils-%{mingw64_target}.tar.bz2 binutils-%{mingw64_target}-*.{sum,log}
|
||||||
popd
|
popd
|
||||||
|
|
||||||
|
pushd build_ucrt64
|
||||||
|
make -k check < /dev/null || :
|
||||||
|
echo ====================TESTING UCRT64 =========================
|
||||||
|
cat {gas/testsuite/gas,ld/ld,binutils/binutils}.sum
|
||||||
|
echo ====================TESTING UCRT64 END=====================
|
||||||
|
for file in {gas/testsuite/gas,ld/ld,binutils/binutils}.{sum,log}
|
||||||
|
do
|
||||||
|
ln $file binutils-%{ucrt64_target}-$(basename $file) || :
|
||||||
|
done
|
||||||
|
tar cjf binutils-%{ucrt64_target}.tar.bz2 binutils-%{ucrt64_target}-*.{sum,log}
|
||||||
|
uuencode binutils-%{ucrt64_target}.tar.bz2 binutils-%{ucrt64_target}.tar.bz2
|
||||||
|
rm -f binutils-%{ucrt64_target}.tar.bz2 binutils-%{ucrt64_target}-*.{sum,log}
|
||||||
|
popd
|
||||||
%endif
|
%endif
|
||||||
|
|
||||||
|
|
||||||
%install
|
%install
|
||||||
%mingw_make_install DESTDIR=$RPM_BUILD_ROOT
|
%mingw_make_install
|
||||||
make -C build_multilib DESTDIR=$RPM_BUILD_ROOT/multilib install
|
make -C build_multilib DESTDIR=%{buildroot}/multilib install
|
||||||
|
|
||||||
# These files conflict with ordinary binutils.
|
# These files conflict with ordinary binutils.
|
||||||
rm -rf $RPM_BUILD_ROOT%{_infodir}
|
rm -rf %{buildroot}%{_infodir}
|
||||||
rm -f $RPM_BUILD_ROOT%{_libdir}/libiberty*
|
rm -f %{buildroot}%{_libdir}/libiberty*
|
||||||
|
rm -f %{buildroot}%{_libdir}/bfd-plugins/libdep.so
|
||||||
|
|
||||||
# Keep the multilib versions of the strip, objdump and objcopy commands
|
# Keep the multilib versions of the strip, objdump and objcopy commands
|
||||||
# We need these for the RPM integration as these tools must be able to
|
# We need these for the RPM integration as these tools must be able to
|
||||||
# both process win32 and win64 binaries
|
# both process win32 and win64 binaries
|
||||||
mv $RPM_BUILD_ROOT/multilib%{_bindir}/%{mingw64_strip} $RPM_BUILD_ROOT%{_bindir}/%{mingw_strip}
|
mv %{buildroot}/multilib%{_bindir}/%{mingw64_strip} %{buildroot}%{_bindir}/%{mingw_strip}
|
||||||
mv $RPM_BUILD_ROOT/multilib%{_bindir}/%{mingw64_objdump} $RPM_BUILD_ROOT%{_bindir}/%{mingw_objdump}
|
mv %{buildroot}/multilib%{_bindir}/%{mingw64_objdump} %{buildroot}%{_bindir}/%{mingw_objdump}
|
||||||
mv $RPM_BUILD_ROOT/multilib%{_bindir}/%{mingw64_objcopy} $RPM_BUILD_ROOT%{_bindir}/%{mingw_objcopy}
|
mv %{buildroot}/multilib%{_bindir}/%{mingw64_objcopy} %{buildroot}%{_bindir}/%{mingw_objcopy}
|
||||||
mv $RPM_BUILD_ROOT/multilib%{_bindir}/%{mingw64_nm} $RPM_BUILD_ROOT%{_bindir}/%{mingw_nm}
|
mv %{buildroot}/multilib%{_bindir}/%{mingw64_nm} %{buildroot}%{_bindir}/%{mingw_nm}
|
||||||
rm -rf $RPM_BUILD_ROOT/multilib
|
rm -rf %{buildroot}/multilib
|
||||||
|
|
||||||
|
# Drop man pages, they are a duplicate of those of the native tools
|
||||||
|
rm -rf %{buildroot}%{_mandir}/man1/*
|
||||||
|
|
||||||
|
|
||||||
%files -n mingw-binutils-generic
|
%files -n mingw-binutils-generic
|
||||||
%doc COPYING
|
%license COPYING
|
||||||
%{_mandir}/man1/*
|
|
||||||
%{_bindir}/%{mingw_strip}
|
%{_bindir}/%{mingw_strip}
|
||||||
%{_bindir}/%{mingw_objdump}
|
%{_bindir}/%{mingw_objdump}
|
||||||
%{_bindir}/%{mingw_objcopy}
|
%{_bindir}/%{mingw_objcopy}
|
||||||
@ -251,18 +415,186 @@ rm -rf $RPM_BUILD_ROOT/multilib
|
|||||||
%{_prefix}/%{mingw64_target}/bin/strip
|
%{_prefix}/%{mingw64_target}/bin/strip
|
||||||
%{_prefix}/%{mingw64_target}/lib/ldscripts
|
%{_prefix}/%{mingw64_target}/lib/ldscripts
|
||||||
|
|
||||||
|
%files -n ucrt64-binutils
|
||||||
|
%{_bindir}/%{ucrt64_target}-addr2line
|
||||||
|
%{_bindir}/%{ucrt64_target}-ar
|
||||||
|
%{_bindir}/%{ucrt64_target}-as
|
||||||
|
%{_bindir}/%{ucrt64_target}-c++filt
|
||||||
|
%{_bindir}/%{ucrt64_target}-dlltool
|
||||||
|
%{_bindir}/%{ucrt64_target}-dllwrap
|
||||||
|
%{_bindir}/%{ucrt64_target}-elfedit
|
||||||
|
%{_bindir}/%{ucrt64_target}-gprof
|
||||||
|
%{_bindir}/%{ucrt64_target}-ld
|
||||||
|
%{_bindir}/%{ucrt64_target}-ld.bfd
|
||||||
|
%{_bindir}/%{ucrt64_target}-nm
|
||||||
|
%{_bindir}/%{ucrt64_target}-objcopy
|
||||||
|
%{_bindir}/%{ucrt64_target}-objdump
|
||||||
|
%{_bindir}/%{ucrt64_target}-ranlib
|
||||||
|
%{_bindir}/%{ucrt64_target}-readelf
|
||||||
|
%{_bindir}/%{ucrt64_target}-size
|
||||||
|
%{_bindir}/%{ucrt64_target}-strings
|
||||||
|
%{_bindir}/%{ucrt64_target}-strip
|
||||||
|
%{_bindir}/%{ucrt64_target}-windmc
|
||||||
|
%{_bindir}/%{ucrt64_target}-windres
|
||||||
|
%{_prefix}/%{ucrt64_target}/bin/ar
|
||||||
|
%{_prefix}/%{ucrt64_target}/bin/as
|
||||||
|
%{_prefix}/%{ucrt64_target}/bin/dlltool
|
||||||
|
%{_prefix}/%{ucrt64_target}/bin/ld
|
||||||
|
%{_prefix}/%{ucrt64_target}/bin/ld.bfd
|
||||||
|
%{_prefix}/%{ucrt64_target}/bin/nm
|
||||||
|
%{_prefix}/%{ucrt64_target}/bin/objcopy
|
||||||
|
%{_prefix}/%{ucrt64_target}/bin/objdump
|
||||||
|
%{_prefix}/%{ucrt64_target}/bin/ranlib
|
||||||
|
%{_prefix}/%{ucrt64_target}/bin/readelf
|
||||||
|
%{_prefix}/%{ucrt64_target}/bin/strip
|
||||||
|
%{_prefix}/%{ucrt64_target}/lib/ldscripts
|
||||||
|
|
||||||
|
|
||||||
%changelog
|
%changelog
|
||||||
* Tue Dec 01 2020 Uri Lublin <uril@redhat.com> - 2.30-3
|
* Wed Oct 02 2024 Davide Cavalca <dcavalca@fedoraproject.org> - 2.43.1-2
|
||||||
- rebuilt
|
- Fix invalid SPDX expression in license tag
|
||||||
|
|
||||||
* Thu Jun 11 2020 Uri Lublin <uril@redhat.com> - 2.30-2
|
* Tue Aug 20 2024 Sandro Mani <manisandro@gmail.com> - 2.43.1-1
|
||||||
- Remove PROVIDE() qualifiers from definition of __CTOR_LIST__ and __DTOR_LIST__
|
- Update to 2.43.1
|
||||||
Resolves: rhbz#1846152
|
|
||||||
|
|
||||||
* Wed Aug 22 2018 Victor Toso <victortoso@redhat.com> - 2.30-1
|
* Thu Jul 18 2024 Fedora Release Engineering <releng@fedoraproject.org> - 2.42-2
|
||||||
|
- Rebuilt for https://fedoraproject.org/wiki/Fedora_41_Mass_Rebuild
|
||||||
|
|
||||||
|
* Sun Feb 18 2024 Sandro Mani <manisandro@gmail.com> - 2.42-1
|
||||||
|
- Update to 2.42
|
||||||
|
|
||||||
|
* Thu Jan 25 2024 Fedora Release Engineering <releng@fedoraproject.org> - 2.41-3
|
||||||
|
- Rebuilt for https://fedoraproject.org/wiki/Fedora_40_Mass_Rebuild
|
||||||
|
|
||||||
|
* Sun Jan 21 2024 Fedora Release Engineering <releng@fedoraproject.org> - 2.41-2
|
||||||
|
- Rebuilt for https://fedoraproject.org/wiki/Fedora_40_Mass_Rebuild
|
||||||
|
|
||||||
|
* Tue Oct 17 2023 Sandro Mani <manisandro@gmail.com> - 2.41-1
|
||||||
|
- Update to 2.41
|
||||||
|
|
||||||
|
* Thu Jul 20 2023 Fedora Release Engineering <releng@fedoraproject.org> - 2.40-4
|
||||||
|
- Rebuilt for https://fedoraproject.org/wiki/Fedora_39_Mass_Rebuild
|
||||||
|
|
||||||
|
* Wed Jun 14 2023 Sandro Mani <manisandro@gmail.com> - 2.40-3
|
||||||
|
- Backport fix for Backport fix for
|
||||||
|
https://sourceware.org/bugzilla/show_bug.cgi?id=30079
|
||||||
|
|
||||||
|
* Fri Apr 14 2023 Sandro Mani <manisandro@gmail.com> - 2.40-2
|
||||||
|
- Backport fix for CVE-2023-1972
|
||||||
|
|
||||||
|
* Thu Mar 09 2023 Sandro Mani <manisandro@gmail.com> - 2.40-1
|
||||||
|
- Update to 2.40
|
||||||
|
|
||||||
|
* Tue Mar 07 2023 Sandro Mani <manisandro@gmail.com> - 2.39-5
|
||||||
|
- Backport patch for CVE-2023-25587
|
||||||
|
|
||||||
|
* Thu Jan 19 2023 Fedora Release Engineering <releng@fedoraproject.org> - 2.39-4
|
||||||
|
- Rebuilt for https://fedoraproject.org/wiki/Fedora_38_Mass_Rebuild
|
||||||
|
|
||||||
|
* Tue Jan 03 2023 Sandro Mani <manisandro@gmail.com> - 2.39-3
|
||||||
|
- Backport patch for CVE-2022-4285
|
||||||
|
|
||||||
|
* Sun Oct 30 2022 Sandro Mani <manisandro@gmail.com> - 2.39-2
|
||||||
|
- Backport patch for CVE-2022-38533
|
||||||
|
|
||||||
|
* Tue Aug 16 2022 Sandro Mani <manisandro@gmail.com> - 2.39-1
|
||||||
|
- Update to 2.39
|
||||||
|
|
||||||
|
* Thu Jul 21 2022 Fedora Release Engineering <releng@fedoraproject.org> - 2.38-3
|
||||||
|
- Rebuilt for https://fedoraproject.org/wiki/Fedora_37_Mass_Rebuild
|
||||||
|
|
||||||
|
* Tue Apr 26 2022 Sandro Mani <manisandro@gmail.com> - 2.38-2
|
||||||
|
- Backport proposed fix for binutils #29006
|
||||||
|
|
||||||
|
* Fri Mar 11 2022 Sandro Mani <manisandro@gmail.com> - 2.38-1
|
||||||
|
- Update to 2.38
|
||||||
|
|
||||||
|
* Wed Feb 23 2022 Marc-André Lureau <marcandre.lureau@redhat.com> - 2.37-5
|
||||||
|
- Add ucrt64 target. Related to rhbz#2055254.
|
||||||
|
|
||||||
|
* Thu Jan 20 2022 Fedora Release Engineering <releng@fedoraproject.org> - 2.37-4
|
||||||
|
- Rebuilt for https://fedoraproject.org/wiki/Fedora_36_Mass_Rebuild
|
||||||
|
|
||||||
|
* Sat Dec 18 2021 Sandro Mani <manisandro@gmail.com> - 2.37-3
|
||||||
|
- Backport fix for CVE-2021-45078
|
||||||
|
|
||||||
|
* Thu Aug 12 2021 Sandro Mani <manisandro@gmail.com> - 2.37-2
|
||||||
|
- Drop man pages
|
||||||
|
|
||||||
|
* Sat Jul 24 2021 Sandro Mani <manisandro@gmail.com> - 2.37-1
|
||||||
|
- Update to 2.37
|
||||||
|
|
||||||
|
* Sat Jul 24 2021 Sandro Mani <manisandro@gmail.com> - 2.36.1-3
|
||||||
|
- Backport fix for "relocation truncated to fit" errors
|
||||||
|
|
||||||
|
* Thu Jul 22 2021 Fedora Release Engineering <releng@fedoraproject.org> - 2.36.1-2
|
||||||
|
- Rebuilt for https://fedoraproject.org/wiki/Fedora_35_Mass_Rebuild
|
||||||
|
|
||||||
|
* Sat Feb 13 2021 Sandro Mani <manisandro@gmail.com> - 2.36.1-1
|
||||||
|
- Update to 2.36.1
|
||||||
|
|
||||||
|
* Thu Jan 28 2021 Richard W.M. Jones <rjones@redhat.com> - 2.34-7
|
||||||
|
- Backport fixes for CVE-2021-20197.
|
||||||
|
- Bump and rebuild for s390.
|
||||||
|
|
||||||
|
* Tue Jan 26 2021 Fedora Release Engineering <releng@fedoraproject.org> - 2.34-5
|
||||||
|
- Rebuilt for https://fedoraproject.org/wiki/Fedora_34_Mass_Rebuild
|
||||||
|
|
||||||
|
* Fri Dec 18 2020 Sandro Mani <manisandro@gmail.com> - 2.34-4
|
||||||
|
- Backport patches for CVE-2020-16592, CVE-2020-16598
|
||||||
|
|
||||||
|
* Wed Jul 29 2020 Sandro Mani <manisandro@gmail.com> - 2.34-3
|
||||||
|
- Fix ld --version output
|
||||||
|
|
||||||
|
* Tue Jul 28 2020 Fedora Release Engineering <releng@fedoraproject.org> - 2.34-2
|
||||||
|
- Rebuilt for https://fedoraproject.org/wiki/Fedora_33_Mass_Rebuild
|
||||||
|
|
||||||
|
* Mon Jul 20 2020 Jeff Law <law@redhat.com> - 2.34.0-2
|
||||||
|
- Fix configure tests compromised by LTO
|
||||||
|
|
||||||
|
* Fri Jun 19 2020 Sandro Mani <manisandro@gmail.com> - 2.34.0-1
|
||||||
|
- Update to 2.34.0
|
||||||
|
- Modernize spec
|
||||||
|
|
||||||
|
* Wed Jan 29 2020 Fedora Release Engineering <releng@fedoraproject.org> - 2.32-7
|
||||||
|
- Rebuilt for https://fedoraproject.org/wiki/Fedora_32_Mass_Rebuild
|
||||||
|
|
||||||
|
* Tue Nov 19 2019 Sandro Mani <manisandro@gmail.com> - 2.32-6
|
||||||
|
- Add binutils_24267.patch
|
||||||
|
- Drop non-relevant patches from native binutils package
|
||||||
|
|
||||||
|
* Tue Aug 13 2019 Fabiano Fidêncio <fidencio@redhat.com> - 3.32-5
|
||||||
|
- Backport all patches from native binutils package, rhbz#1740709
|
||||||
|
|
||||||
|
* Wed Aug 07 2019 Sandro Mani <manisandro@gmail.com> - 2.32-4
|
||||||
|
- Backport patch to fix "too many open files" when linking libLLVM.dll
|
||||||
|
|
||||||
|
* Thu Jul 25 2019 Fedora Release Engineering <releng@fedoraproject.org> - 2.32-2
|
||||||
|
- Rebuilt for https://fedoraproject.org/wiki/Fedora_31_Mass_Rebuild
|
||||||
|
|
||||||
|
* Tue May 07 2019 Sandro Mani <manisandro@gmail.com> - 2.32-1
|
||||||
|
- Update to 2.32
|
||||||
|
|
||||||
|
* Fri Feb 01 2019 Fedora Release Engineering <releng@fedoraproject.org> - 2.30-6
|
||||||
|
- Rebuilt for https://fedoraproject.org/wiki/Fedora_30_Mass_Rebuild
|
||||||
|
|
||||||
|
* Wed Aug 22 2018 Sandro Mani <manisandro@gmail.com> - 2.30-5
|
||||||
|
- Refresh patch for binutils bug #23061
|
||||||
|
|
||||||
|
* Wed Aug 08 2018 Sandro Mani <manisandro@gmail.com> - 2.30-4
|
||||||
|
- Backport patch for binutils bug #23061
|
||||||
|
|
||||||
|
* Fri Jul 13 2018 Fedora Release Engineering <releng@fedoraproject.org> - 2.30-3
|
||||||
|
- Rebuilt for https://fedoraproject.org/wiki/Fedora_29_Mass_Rebuild
|
||||||
|
|
||||||
|
* Thu Jun 14 2018 Sandro Mani <manisandro@gmail.com> - 2.30-2
|
||||||
|
- Backport patch for binutils bug #22762
|
||||||
|
|
||||||
|
* Thu Jun 14 2018 Sandro Mani <manisandro@gmail.com> - 2.30-1
|
||||||
- Update to 2.30
|
- Update to 2.30
|
||||||
- Related: rhbz#1615874
|
|
||||||
|
* Thu Feb 08 2018 Fedora Release Engineering <releng@fedoraproject.org> - 2.29.1-2
|
||||||
|
- Rebuilt for https://fedoraproject.org/wiki/Fedora_28_Mass_Rebuild
|
||||||
|
|
||||||
* Sun Oct 08 2017 Kalev Lember <klember@redhat.com> - 2.29.1-1
|
* Sun Oct 08 2017 Kalev Lember <klember@redhat.com> - 2.29.1-1
|
||||||
- Update to 2.29.1
|
- Update to 2.29.1
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user