commit f22db3cf4dca1038119874cba5e3c1600247be7b Author: MSVSphere Packaging Team Date: Fri Sep 22 18:42:42 2023 +0300 import mingw-binutils-2.40-3.el9 diff --git a/.gitignore b/.gitignore new file mode 100644 index 0000000..554f19f --- /dev/null +++ b/.gitignore @@ -0,0 +1 @@ +SOURCES/binutils-2.40.tar.xz diff --git a/.mingw-binutils.metadata b/.mingw-binutils.metadata new file mode 100644 index 0000000..df6593c --- /dev/null +++ b/.mingw-binutils.metadata @@ -0,0 +1 @@ +fee4fbef9d632afc1988dd631d7f75d4394b7f8d SOURCES/binutils-2.40.tar.xz diff --git a/SOURCES/CVE-2023-1972.patch b/SOURCES/CVE-2023-1972.patch new file mode 100644 index 0000000..c214363 --- /dev/null +++ b/SOURCES/CVE-2023-1972.patch @@ -0,0 +1,22 @@ +diff -rupN --no-dereference binutils-2.40/bfd/elf.c binutils-2.40-new/bfd/elf.c +--- binutils-2.40/bfd/elf.c 2023-04-14 16:12:16.185323541 +0200 ++++ binutils-2.40-new/bfd/elf.c 2023-04-14 16:12:27.583371759 +0200 +@@ -9048,6 +9048,9 @@ _bfd_elf_slurp_version_tables (bfd *abfd + bfd_set_error (bfd_error_file_too_big); + goto error_return_verdef; + } ++ ++ if (amt == 0) ++ goto error_return_verdef; + elf_tdata (abfd)->verdef = (Elf_Internal_Verdef *) bfd_zalloc (abfd, amt); + if (elf_tdata (abfd)->verdef == NULL) + goto error_return_verdef; +@@ -9151,6 +9154,8 @@ _bfd_elf_slurp_version_tables (bfd *abfd + bfd_set_error (bfd_error_file_too_big); + goto error_return; + } ++ if (amt == 0) ++ goto error_return; + elf_tdata (abfd)->verdef = (Elf_Internal_Verdef *) bfd_zalloc (abfd, amt); + if (elf_tdata (abfd)->verdef == NULL) + goto error_return; diff --git a/SOURCES/binutils-2.27-aarch64-ifunc.patch b/SOURCES/binutils-2.27-aarch64-ifunc.patch new file mode 100644 index 0000000..a435522 --- /dev/null +++ b/SOURCES/binutils-2.27-aarch64-ifunc.patch @@ -0,0 +1,11 @@ +diff -rupN --no-dereference binutils-2.40/bfd/elfnn-aarch64.c binutils-2.40-new/bfd/elfnn-aarch64.c +--- binutils-2.40/bfd/elfnn-aarch64.c 2023-01-14 01:00:00.000000000 +0100 ++++ binutils-2.40-new/bfd/elfnn-aarch64.c 2023-03-09 14:51:55.011379383 +0100 +@@ -5487,6 +5487,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; diff --git a/SOURCES/binutils-autoconf-version.patch b/SOURCES/binutils-autoconf-version.patch new file mode 100644 index 0000000..ae16a6e --- /dev/null +++ b/SOURCES/binutils-autoconf-version.patch @@ -0,0 +1,12 @@ +diff -rupN --no-dereference binutils-2.40/config/override.m4 binutils-2.40-new/config/override.m4 +--- binutils-2.40/config/override.m4 2023-01-14 01:00:00.000000000 +0100 ++++ binutils-2.40-new/config/override.m4 2023-03-09 14:52:03.599278848 +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 diff --git a/SOURCES/binutils-do-not-link-with-static-libstdc++.patch b/SOURCES/binutils-do-not-link-with-static-libstdc++.patch new file mode 100644 index 0000000..c9e4f04 --- /dev/null +++ b/SOURCES/binutils-do-not-link-with-static-libstdc++.patch @@ -0,0 +1,83 @@ +diff -rupN --no-dereference binutils-2.40/configure binutils-2.40-new/configure +--- binutils-2.40/configure 2023-01-14 01:00:00.000000000 +0100 ++++ binutils-2.40-new/configure 2023-03-09 14:51:56.227365462 +0100 +@@ -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 -rupN --no-dereference binutils-2.40/configure.ac binutils-2.40-new/configure.ac +--- binutils-2.40/configure.ac 2023-01-14 01:00:00.000000000 +0100 ++++ binutils-2.40-new/configure.ac 2023-03-09 14:51:56.228365450 +0100 +@@ -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 diff --git a/SOURCES/binutils-export-demangle.h.patch b/SOURCES/binutils-export-demangle.h.patch new file mode 100644 index 0000000..d246443 --- /dev/null +++ b/SOURCES/binutils-export-demangle.h.patch @@ -0,0 +1,33 @@ +diff -rupN --no-dereference binutils-2.40/bfd/Makefile.am binutils-2.40-new/bfd/Makefile.am +--- binutils-2.40/bfd/Makefile.am 2023-03-09 14:51:48.814448632 +0100 ++++ binutils-2.40-new/bfd/Makefile.am 2023-03-09 14:51:48.819448577 +0100 +@@ -38,7 +38,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 -rupN --no-dereference binutils-2.40/bfd/Makefile.in binutils-2.40-new/bfd/Makefile.in +--- binutils-2.40/bfd/Makefile.in 2023-03-09 14:51:48.815448621 +0100 ++++ binutils-2.40-new/bfd/Makefile.in 2023-03-09 14:51:48.819448577 +0100 +@@ -292,7 +292,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 +@@ -517,7 +517,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 diff --git a/SOURCES/binutils-filename-in-readelf-messages.patch b/SOURCES/binutils-filename-in-readelf-messages.patch new file mode 100644 index 0000000..98b3553 --- /dev/null +++ b/SOURCES/binutils-filename-in-readelf-messages.patch @@ -0,0 +1,126 @@ +diff -rupN --no-dereference binutils-2.40/binutils/readelf.c binutils-2.40-new/binutils/readelf.c +--- binutils-2.40/binutils/readelf.c 2023-01-14 01:00:00.000000000 +0100 ++++ binutils-2.40-new/binutils/readelf.c 2023-03-09 14:51:51.335420794 +0100 +@@ -22858,46 +22858,53 @@ process_file (char * file_name) + Filedata * filedata = NULL; + struct stat statbuf; + char armag[SARMAG]; +- bool ret = true; ++ bool ret = false; ++ char * name; ++ char * saved_program_name; ++ ++ /* Overload program_name to include file_name. Doing this means ++ that warning/error messages will positively identify the file ++ concerned even when multiple instances of readelf are running. */ ++ name = xmalloc (strlen (program_name) + strlen (file_name) + 3); ++ sprintf (name, "%s: %s", program_name, file_name); ++ saved_program_name = program_name; ++ program_name = name; + + if (stat (file_name, &statbuf) < 0) + { + if (errno == ENOENT) +- error (_("'%s': No such file\n"), file_name); ++ error (_("No such file\n")); + else +- error (_("Could not locate '%s'. System error message: %s\n"), +- file_name, strerror (errno)); +- return false; ++ error (_("Could not locate file. System error message: %s\n"), ++ strerror (errno)); ++ goto done; + } + + if (! S_ISREG (statbuf.st_mode)) + { +- error (_("'%s' is not an ordinary file\n"), file_name); +- return false; ++ error (_("Not an ordinary file\n")); ++ goto done; + } + + filedata = calloc (1, sizeof * filedata); + if (filedata == NULL) + { + error (_("Out of memory allocating file data structure\n")); +- return false; ++ goto done; + } + + filedata->file_name = file_name; + filedata->handle = fopen (file_name, "rb"); + if (filedata->handle == NULL) + { +- error (_("Input file '%s' is not readable.\n"), file_name); +- free (filedata); +- return false; ++ error (_("Not readable\n")); ++ goto done; + } + + if (fread (armag, SARMAG, 1, filedata->handle) != 1) + { +- error (_("%s: Failed to read file's magic number\n"), file_name); +- fclose (filedata->handle); +- free (filedata); +- return false; ++ error (_("Failed to read file's magic number\n")); ++ goto done; + } + + filedata->file_size = statbuf.st_size; +@@ -22905,33 +22912,39 @@ process_file (char * file_name) + + if (memcmp (armag, ARMAG, SARMAG) == 0) + { +- if (! process_archive (filedata, false)) +- ret = false; ++ if (process_archive (filedata, false)) ++ ret = true; + } + else if (memcmp (armag, ARMAGT, SARMAG) == 0) + { +- if ( ! process_archive (filedata, true)) +- ret = false; ++ if (process_archive (filedata, true)) ++ ret = true; + } + else + { + if (do_archive_index && !check_all) +- error (_("File %s is not an archive so its index cannot be displayed.\n"), +- file_name); ++ error (_("Not an archive so its index cannot be displayed.\n")); + + rewind (filedata->handle); + filedata->archive_file_size = filedata->archive_file_offset = 0; + +- if (! process_object (filedata)) +- ret = false; ++ if (process_object (filedata)) ++ ret = true; + } + +- fclose (filedata->handle); +- free (filedata->section_headers); +- free (filedata->program_headers); +- free (filedata->string_table); +- free (filedata->dump.dump_sects); +- free (filedata); ++ done: ++ if (filedata) ++ { ++ if (filedata->handle != NULL) ++ fclose (filedata->handle); ++ free (filedata->section_headers); ++ free (filedata->program_headers); ++ free (filedata->string_table); ++ free (filedata->dump.dump_sects); ++ free (filedata); ++ } ++ free (program_name); ++ program_name = saved_program_name; + + free (ba_cache.strtab); + ba_cache.strtab = NULL; diff --git a/SOURCES/binutils-fix-testsuite-failures.patch b/SOURCES/binutils-fix-testsuite-failures.patch new file mode 100644 index 0000000..bbdbf8e --- /dev/null +++ b/SOURCES/binutils-fix-testsuite-failures.patch @@ -0,0 +1,304 @@ +diff -rupN --no-dereference binutils-2.40/ld/testsuite/ld-elfvers/vers24.rd binutils-2.40-new/ld/testsuite/ld-elfvers/vers24.rd +--- binutils-2.40/ld/testsuite/ld-elfvers/vers24.rd 2023-01-14 01:00:00.000000000 +0100 ++++ binutils-2.40-new/ld/testsuite/ld-elfvers/vers24.rd 2023-03-09 14:51:58.684337020 +0100 +@@ -7,9 +7,9 @@ Symbol table '.dynsym' contains [0-9]+ e + # And ensure the dynamic symbol table contains at least x@VERS.0 + # and foo@@VERS.0 symbols + #... +- +[0-9]+: [0-9a-f]+ +(4 +OBJECT +GLOBAL +DEFAULT +[0-9]+ _?x|[0-9]+ +FUNC +GLOBAL +DEFAULT .* [0-9]+ _?foo@)@VERS\.0 ++ +[0-9]+: [0-9a-f]+ +(4 +OBJECT +GLOBAL +DEFAULT +[0-9]+ _?x|[0-9]+ +FUNC +GLOBAL +DEFAULT .* [0-9]+ _?foo@)@VERS\.0.* + #... +- +[0-9]+: [0-9a-f]+ +(4 +OBJECT +GLOBAL +DEFAULT +[0-9]+ _?x|[0-9]+ +FUNC +GLOBAL +DEFAULT .* [0-9]+ _?foo@)@VERS\.0 ++ +[0-9]+: [0-9a-f]+ +(4 +OBJECT +GLOBAL +DEFAULT +[0-9]+ _?x|[0-9]+ +FUNC +GLOBAL +DEFAULT .* [0-9]+ _?foo@)@VERS\.0.* + #... + Symbol table '.symtab' contains [0-9]+ entries: + #pass +diff -rupN --no-dereference binutils-2.40/ld/testsuite/ld-plugin/plugin-10.d binutils-2.40-new/ld/testsuite/ld-plugin/plugin-10.d +--- binutils-2.40/ld/testsuite/ld-plugin/plugin-10.d 2023-01-14 01:00:00.000000000 +0100 ++++ binutils-2.40-new/ld/testsuite/ld-plugin/plugin-10.d 2023-03-09 14:51:58.683337032 +0100 +@@ -32,7 +32,8 @@ hook called: claim_file tmpdir/func.o \[ + hook called: claim_file tmpdir/libtext.a \[@.* not claimed + #... + hook called: all symbols read. +-Sym: '_?func' Resolution: LDPR_PREVAILING_DEF ++Sym: '_?func' Resolution: LDPR_PREVAILING_DEF_IRONLY + Sym: '_?func2' Resolution: LDPR_PREVAILING_DEF_IRONLY ++#... + hook called: cleanup. + #... +diff -rupN --no-dereference binutils-2.40/ld/testsuite/ld-plugin/plugin-11.d binutils-2.40-new/ld/testsuite/ld-plugin/plugin-11.d +--- binutils-2.40/ld/testsuite/ld-plugin/plugin-11.d 2023-01-14 01:00:00.000000000 +0100 ++++ binutils-2.40-new/ld/testsuite/ld-plugin/plugin-11.d 2023-03-09 14:51:58.683337032 +0100 +@@ -35,8 +35,9 @@ hook called: claim_file tmpdir/func.o \[ + hook called: claim_file tmpdir/libtext.a \[@.* CLAIMED + #... + hook called: all symbols read. +-Sym: '_?func' Resolution: LDPR_PREVAILING_DEF ++Sym: '_?func' Resolution: LDPR_PREVAILING_DEF_IRONLY + Sym: '_?func2' Resolution: LDPR_PREVAILING_DEF_IRONLY +-Sym: '_?text' Resolution: LDPR_PREVAILING_DEF ++Sym: '_?text' Resolution: LDPR_PREVAILING_DEF_IRONLY ++#... + hook called: cleanup. + #... +diff -rupN --no-dereference binutils-2.40/ld/testsuite/ld-plugin/plugin-13.d binutils-2.40-new/ld/testsuite/ld-plugin/plugin-13.d +--- binutils-2.40/ld/testsuite/ld-plugin/plugin-13.d 2023-01-14 01:00:00.000000000 +0100 ++++ binutils-2.40-new/ld/testsuite/ld-plugin/plugin-13.d 2023-03-09 14:51:58.679337079 +0100 +@@ -23,5 +23,3 @@ hook called: claim_file tmpdir/main.o \[ + hook called: claim_file .*/ld/testsuite/ld-plugin/func.c \[@0/.* CLAIMED + hook called: claim_file tmpdir/text.o \[@0/.* not claimed + #... +-.*main.c.*: undefined reference to `\.?func' +-#... +diff -rupN --no-dereference binutils-2.40/ld/testsuite/ld-plugin/plugin-14.d binutils-2.40-new/ld/testsuite/ld-plugin/plugin-14.d +--- binutils-2.40/ld/testsuite/ld-plugin/plugin-14.d 2023-01-14 01:00:00.000000000 +0100 ++++ binutils-2.40-new/ld/testsuite/ld-plugin/plugin-14.d 2023-03-09 14:51:58.679337079 +0100 +@@ -27,7 +27,6 @@ hook called: claim_file .*/ld/testsuite/ + hook called: claim_file tmpdir/text.o \[@0/.* not claimed + #... + hook called: all symbols read. +-.*: tmpdir/main.o: in function `main': +-.*main.c.*: undefined reference to `\.?func' ++#... + hook called: cleanup. + #... +diff -rupN --no-dereference binutils-2.40/ld/testsuite/ld-plugin/plugin-15.d binutils-2.40-new/ld/testsuite/ld-plugin/plugin-15.d +--- binutils-2.40/ld/testsuite/ld-plugin/plugin-15.d 2023-01-14 01:00:00.000000000 +0100 ++++ binutils-2.40-new/ld/testsuite/ld-plugin/plugin-15.d 2023-03-09 14:51:58.679337079 +0100 +@@ -28,7 +28,6 @@ hook called: claim_file .*/ld/testsuite/ + hook called: claim_file tmpdir/text.o \[@0/.* not claimed + #... + hook called: all symbols read. +-.*: tmpdir/main.o: in function `main': +-.*main.c.*: undefined reference to `\.?func' ++#... + hook called: cleanup. + #... +diff -rupN --no-dereference binutils-2.40/ld/testsuite/ld-plugin/plugin-16.d binutils-2.40-new/ld/testsuite/ld-plugin/plugin-16.d +--- binutils-2.40/ld/testsuite/ld-plugin/plugin-16.d 2023-01-14 01:00:00.000000000 +0100 ++++ binutils-2.40-new/ld/testsuite/ld-plugin/plugin-16.d 2023-03-09 14:51:58.680337067 +0100 +@@ -30,9 +30,8 @@ hook called: claim_file .*/ld/testsuite/ + hook called: claim_file tmpdir/text.o \[@0/.* not claimed + #... + hook called: all symbols read. +-Sym: '_?func' Resolution: LDPR_PREVAILING_DEF ++Sym: '_?func' Resolution: LDPR_PREVAILING_DEF_IRONLY + Sym: '_?func2' Resolution: LDPR_PREVAILING_DEF_IRONLY +-.*: tmpdir/main.o: in function `main': +-.*main.c.*: undefined reference to `\.?func' ++#... + hook called: cleanup. + #... +diff -rupN --no-dereference binutils-2.40/ld/testsuite/ld-plugin/plugin-17.d binutils-2.40-new/ld/testsuite/ld-plugin/plugin-17.d +--- binutils-2.40/ld/testsuite/ld-plugin/plugin-17.d 2023-01-14 01:00:00.000000000 +0100 ++++ binutils-2.40-new/ld/testsuite/ld-plugin/plugin-17.d 2023-03-09 14:51:58.680337067 +0100 +@@ -31,7 +31,8 @@ hook called: claim_file .*/ld/testsuite/ + hook called: claim_file tmpdir/text.o \[@0/.* not claimed + #... + hook called: all symbols read. +-Sym: '_?func' Resolution: LDPR_PREVAILING_DEF ++Sym: '_?func' Resolution: LDPR_PREVAILING_DEF_IRONLY + Sym: '_?func2' Resolution: LDPR_PREVAILING_DEF_IRONLY ++#... + hook called: cleanup. + #... +diff -rupN --no-dereference binutils-2.40/ld/testsuite/ld-plugin/plugin-18.d binutils-2.40-new/ld/testsuite/ld-plugin/plugin-18.d +--- binutils-2.40/ld/testsuite/ld-plugin/plugin-18.d 2023-01-14 01:00:00.000000000 +0100 ++++ binutils-2.40-new/ld/testsuite/ld-plugin/plugin-18.d 2023-03-09 14:51:58.683337032 +0100 +@@ -32,7 +32,8 @@ hook called: claim_file .*/ld/testsuite/ + hook called: claim_file tmpdir/libtext.a \[@.* not claimed + #... + hook called: all symbols read. +-Sym: '_?func' Resolution: LDPR_PREVAILING_DEF ++Sym: '_?func' Resolution: LDPR_PREVAILING_DEF_IRONLY + Sym: '_?func2' Resolution: LDPR_PREVAILING_DEF_IRONLY ++#... + hook called: cleanup. + #... +diff -rupN --no-dereference binutils-2.40/ld/testsuite/ld-plugin/plugin-19.d binutils-2.40-new/ld/testsuite/ld-plugin/plugin-19.d +--- binutils-2.40/ld/testsuite/ld-plugin/plugin-19.d 2023-01-14 01:00:00.000000000 +0100 ++++ binutils-2.40-new/ld/testsuite/ld-plugin/plugin-19.d 2023-03-09 14:51:58.684337020 +0100 +@@ -35,8 +35,9 @@ hook called: claim_file .*/ld/testsuite/ + hook called: claim_file tmpdir/libtext.a \[@.* CLAIMED + #... + hook called: all symbols read. +-Sym: '_?func' Resolution: LDPR_PREVAILING_DEF ++Sym: '_?func' Resolution: LDPR_PREVAILING_DEF_IRONLY + Sym: '_?func2' Resolution: LDPR_PREVAILING_DEF_IRONLY +-Sym: '_?text' Resolution: LDPR_PREVAILING_DEF ++Sym: '_?text' Resolution: LDPR_PREVAILING_DEF_IRONLY ++#... + hook called: cleanup. + #... +diff -rupN --no-dereference binutils-2.40/ld/testsuite/ld-plugin/plugin-20.d binutils-2.40-new/ld/testsuite/ld-plugin/plugin-20.d +--- binutils-2.40/ld/testsuite/ld-plugin/plugin-20.d 2023-01-14 01:00:00.000000000 +0100 ++++ binutils-2.40-new/ld/testsuite/ld-plugin/plugin-20.d 2023-03-09 14:51:58.680337067 +0100 +@@ -2,6 +2,5 @@ hook called: all symbols read. + Input: func.c \(tmpdir/libfunc.a\) + Sym: '_?func' Resolution: LDPR_PREVAILING_DEF.* + Sym: '_?func' Resolution: LDPR_PREVAILING_DEF.* +-.*: tmpdir/main.o: in function `main': +-.*main.c.*: undefined reference to `\.?func' ++#... + hook called: cleanup. +diff -rupN --no-dereference binutils-2.40/ld/testsuite/ld-plugin/plugin-21.d binutils-2.40-new/ld/testsuite/ld-plugin/plugin-21.d +--- binutils-2.40/ld/testsuite/ld-plugin/plugin-21.d 2023-01-14 01:00:00.000000000 +0100 ++++ binutils-2.40-new/ld/testsuite/ld-plugin/plugin-21.d 2023-03-09 14:51:58.680337067 +0100 +@@ -2,6 +2,5 @@ hook called: all symbols read. + Input: .*/ld/testsuite/ld-plugin/func.c \(.*/ld/testsuite/ld-plugin/func.c\) + Sym: '_?func' Resolution: LDPR_PREVAILING_DEF.* + Sym: '_?func' Resolution: LDPR_PREVAILING_DEF.* +-.*: tmpdir/main.o: in function `main': +-.*main.c.*: undefined reference to `\.?func' ++#... + hook called: cleanup. +diff -rupN --no-dereference binutils-2.40/ld/testsuite/ld-plugin/plugin-22.d binutils-2.40-new/ld/testsuite/ld-plugin/plugin-22.d +--- binutils-2.40/ld/testsuite/ld-plugin/plugin-22.d 2023-01-14 01:00:00.000000000 +0100 ++++ binutils-2.40-new/ld/testsuite/ld-plugin/plugin-22.d 2023-03-09 14:51:58.680337067 +0100 +@@ -2,6 +2,5 @@ Claimed: tmpdir/libfunc.a \[@.* + hook called: all symbols read. + Sym: '_?func' Resolution: LDPR_PREVAILING_DEF.* + Sym: '_?func' Resolution: LDPR_PREVAILING_DEF.* +-.*: tmpdir/main.o: in function `main': +-.*main.c.*: undefined reference to `\.?func' ++#... + hook called: cleanup. +diff -rupN --no-dereference binutils-2.40/ld/testsuite/ld-plugin/plugin-23.d binutils-2.40-new/ld/testsuite/ld-plugin/plugin-23.d +--- binutils-2.40/ld/testsuite/ld-plugin/plugin-23.d 2023-01-14 01:00:00.000000000 +0100 ++++ binutils-2.40-new/ld/testsuite/ld-plugin/plugin-23.d 2023-03-09 14:51:58.681337056 +0100 +@@ -2,6 +2,5 @@ Claimed: .*/ld/testsuite/ld-plugin/func. + hook called: all symbols read. + Sym: '_?func' Resolution: LDPR_PREVAILING_DEF.* + Sym: '_?func' Resolution: LDPR_PREVAILING_DEF.* +-.*: tmpdir/main.o: in function `main': +-.*main.c.*: undefined reference to `\.?func' ++#... + hook called: cleanup. +diff -rupN --no-dereference binutils-2.40/ld/testsuite/ld-plugin/plugin-24.d binutils-2.40-new/ld/testsuite/ld-plugin/plugin-24.d +--- binutils-2.40/ld/testsuite/ld-plugin/plugin-24.d 2023-01-14 01:00:00.000000000 +0100 ++++ binutils-2.40-new/ld/testsuite/ld-plugin/plugin-24.d 2023-03-09 14:51:58.681337056 +0100 +@@ -2,4 +2,5 @@ hook called: all symbols read. + Input: .*/ld/testsuite/ld-plugin/func.c \(.*/ld/testsuite/ld-plugin/func.c\) + Sym: '_?func' Resolution: LDPR_PREVAILING_DEF.* + Sym: '_?func' Resolution: LDPR_PREVAILING_DEF.* ++#... + hook called: cleanup. +diff -rupN --no-dereference binutils-2.40/ld/testsuite/ld-plugin/plugin-25.d binutils-2.40-new/ld/testsuite/ld-plugin/plugin-25.d +--- binutils-2.40/ld/testsuite/ld-plugin/plugin-25.d 2023-01-14 01:00:00.000000000 +0100 ++++ binutils-2.40-new/ld/testsuite/ld-plugin/plugin-25.d 2023-03-09 14:51:58.681337056 +0100 +@@ -2,4 +2,5 @@ Claimed: .*/ld/testsuite/ld-plugin/func. + hook called: all symbols read. + Sym: '_?func' Resolution: LDPR_PREVAILING_DEF.* + Sym: '_?func' Resolution: LDPR_PREVAILING_DEF.* ++#... + hook called: cleanup. +diff -rupN --no-dereference binutils-2.40/ld/testsuite/ld-plugin/plugin-28.d binutils-2.40-new/ld/testsuite/ld-plugin/plugin-28.d +--- binutils-2.40/ld/testsuite/ld-plugin/plugin-28.d 2023-01-14 01:00:00.000000000 +0100 ++++ binutils-2.40-new/ld/testsuite/ld-plugin/plugin-28.d 2023-03-09 14:51:58.684337020 +0100 +@@ -1 +1,2 @@ + .*: error: Error ++#... +diff -rupN --no-dereference binutils-2.40/ld/testsuite/ld-plugin/plugin-29.d binutils-2.40-new/ld/testsuite/ld-plugin/plugin-29.d +--- binutils-2.40/ld/testsuite/ld-plugin/plugin-29.d 2023-01-14 01:00:00.000000000 +0100 ++++ binutils-2.40-new/ld/testsuite/ld-plugin/plugin-29.d 2023-03-09 14:51:58.681337056 +0100 +@@ -1 +1,2 @@ + .*: warning: Warning ++#... +diff -rupN --no-dereference binutils-2.40/ld/testsuite/ld-plugin/plugin-30.d binutils-2.40-new/ld/testsuite/ld-plugin/plugin-30.d +--- binutils-2.40/ld/testsuite/ld-plugin/plugin-30.d 2023-01-14 01:00:00.000000000 +0100 ++++ binutils-2.40-new/ld/testsuite/ld-plugin/plugin-30.d 2023-03-09 14:51:58.681337056 +0100 +@@ -24,3 +24,4 @@ hook called: claim_file tmpdir/main.o \[ + hook called: claim_file tmpdir/func.o \[@0/.* not claimed + hook called: claim_file tmpdir/text.o \[@0/.* not claimed + hook called: claim_file tmpdir/libempty.a \[@.* not claimed ++#pass +diff -rupN --no-dereference binutils-2.40/ld/testsuite/ld-plugin/plugin-6.d binutils-2.40-new/ld/testsuite/ld-plugin/plugin-6.d +--- binutils-2.40/ld/testsuite/ld-plugin/plugin-6.d 2023-01-14 01:00:00.000000000 +0100 ++++ binutils-2.40-new/ld/testsuite/ld-plugin/plugin-6.d 2023-03-09 14:51:58.682337044 +0100 +@@ -27,7 +27,6 @@ hook called: claim_file tmpdir/func.o \[ + hook called: claim_file tmpdir/text.o \[@0/.* not claimed + #... + hook called: all symbols read. +-.*: tmpdir/main.o: in function `main': +-.*main.c.*: undefined reference to `\.?func' ++#... + hook called: cleanup. + #... +diff -rupN --no-dereference binutils-2.40/ld/testsuite/ld-plugin/plugin-7.d binutils-2.40-new/ld/testsuite/ld-plugin/plugin-7.d +--- binutils-2.40/ld/testsuite/ld-plugin/plugin-7.d 2023-01-14 01:00:00.000000000 +0100 ++++ binutils-2.40-new/ld/testsuite/ld-plugin/plugin-7.d 2023-03-09 14:51:58.682337044 +0100 +@@ -28,7 +28,6 @@ hook called: claim_file tmpdir/func.o \[ + hook called: claim_file tmpdir/text.o \[@0/.* not claimed + #... + hook called: all symbols read. +-.*: tmpdir/main.o: in function `main': +-.*main.c.*: undefined reference to `\.?func' ++#... + hook called: cleanup. + #... +diff -rupN --no-dereference binutils-2.40/ld/testsuite/ld-plugin/plugin-8.d binutils-2.40-new/ld/testsuite/ld-plugin/plugin-8.d +--- binutils-2.40/ld/testsuite/ld-plugin/plugin-8.d 2023-01-14 01:00:00.000000000 +0100 ++++ binutils-2.40-new/ld/testsuite/ld-plugin/plugin-8.d 2023-03-09 14:51:58.684337020 +0100 +@@ -30,9 +30,8 @@ hook called: claim_file tmpdir/func.o \[ + hook called: claim_file tmpdir/text.o \[@0/.* not claimed + #... + hook called: all symbols read. +-Sym: '_?func' Resolution: LDPR_PREVAILING_DEF ++Sym: '_?func' Resolution: LDPR_PREVAILING_DEF_IRONLY + Sym: '_?func2' Resolution: LDPR_PREVAILING_DEF_IRONLY +-.*: tmpdir/main.o: in function `main': +-.*main.c.*: undefined reference to `\.?func' ++#... + hook called: cleanup. + #... +diff -rupN --no-dereference binutils-2.40/ld/testsuite/ld-plugin/plugin-9.d binutils-2.40-new/ld/testsuite/ld-plugin/plugin-9.d +--- binutils-2.40/ld/testsuite/ld-plugin/plugin-9.d 2023-01-14 01:00:00.000000000 +0100 ++++ binutils-2.40-new/ld/testsuite/ld-plugin/plugin-9.d 2023-03-09 14:51:58.682337044 +0100 +@@ -31,7 +31,8 @@ hook called: claim_file tmpdir/func.o \[ + hook called: claim_file tmpdir/text.o \[@0/.* not claimed + #... + hook called: all symbols read. +-Sym: '_?func' Resolution: LDPR_PREVAILING_DEF ++Sym: '_?func' Resolution: LDPR_PREVAILING_DEF_IRONLY + Sym: '_?func2' Resolution: LDPR_PREVAILING_DEF_IRONLY ++#... + hook called: cleanup. + #... +diff -rupN --no-dereference binutils-2.40/ld/testsuite/ld-plugin/plugin.exp binutils-2.40-new/ld/testsuite/ld-plugin/plugin.exp +--- binutils-2.40/ld/testsuite/ld-plugin/plugin.exp 2023-01-14 01:00:00.000000000 +0100 ++++ binutils-2.40-new/ld/testsuite/ld-plugin/plugin.exp 2023-03-09 14:51:58.685337009 +0100 +@@ -117,6 +117,12 @@ if { $can_compile && !$failed_compile } + } + } + ++# I do not know why, but the underscore prefix test is going ++# wrong on ppc64le targets. So override it here. ++if { [istarget powerpc*-*-linux*] || [istarget x86_64*-*-linux*] } { ++ set _ "" ++} ++ + set testobjfiles "tmpdir/main.o tmpdir/func.o tmpdir/text.o" + set testobjfiles_notext "tmpdir/main.o tmpdir/func.o" + set testsrcfiles "tmpdir/main.o $srcdir/$subdir/func.c tmpdir/text.o" +diff -rupN --no-dereference binutils-2.40/ld/testsuite/ld-plugin/pr20070.d binutils-2.40-new/ld/testsuite/ld-plugin/pr20070.d +--- binutils-2.40/ld/testsuite/ld-plugin/pr20070.d 2023-01-14 01:00:00.000000000 +0100 ++++ binutils-2.40-new/ld/testsuite/ld-plugin/pr20070.d 2023-03-09 14:51:58.683337032 +0100 +@@ -5,5 +5,6 @@ Sym: 'weakdef' Resolution: LDPR_PREVAILI + Sym: 'undef' Resolution: LDPR_UNDEF + Sym: 'weakundef' Resolution: LDPR_UNDEF + Sym: 'common' Resolution: LDPR_PREVAILING_DEF_IRONLY ++#... + hook called: cleanup. + #... +diff -rupN --no-dereference binutils-2.40/ld/testsuite/ld-srec/srec.exp binutils-2.40-new/ld/testsuite/ld-srec/srec.exp +--- binutils-2.40/ld/testsuite/ld-srec/srec.exp 2023-01-14 01:00:00.000000000 +0100 ++++ binutils-2.40-new/ld/testsuite/ld-srec/srec.exp 2023-03-09 14:51:58.683337032 +0100 +@@ -21,6 +21,8 @@ + + # Get the offset from an S-record line to the start of the data. + ++return ++ + proc srec_off { l } { + if [string match "S1*" $l] { + return 8 diff --git a/SOURCES/binutils-gdb.git-b7eab2a9d4f4e92692daf14b09fc95ca11b72e30.patch b/SOURCES/binutils-gdb.git-b7eab2a9d4f4e92692daf14b09fc95ca11b72e30.patch new file mode 100644 index 0000000..4091345 --- /dev/null +++ b/SOURCES/binutils-gdb.git-b7eab2a9d4f4e92692daf14b09fc95ca11b72e30.patch @@ -0,0 +1,13 @@ +diff -rupN --no-dereference binutils-2.40/ld/ldlang.c binutils-2.40-new/ld/ldlang.c +--- binutils-2.40/ld/ldlang.c 2023-01-14 01:00:00.000000000 +0100 ++++ binutils-2.40-new/ld/ldlang.c 2023-06-14 16:26:54.425556661 +0200 +@@ -649,7 +649,8 @@ wild_sort (lang_wild_statement_type *wil + looking at the sections for this file. */ + + /* Find the correct node to append this section. */ +- if (compare_section (sec->spec.sorted, section, (*tree)->section) < 0) ++ if (sec && sec->spec.sorted != none && sec->spec.sorted != by_none ++ && compare_section (sec->spec.sorted, section, (*tree)->section) < 0) + tree = &((*tree)->left); + else + tree = &((*tree)->right); diff --git a/SOURCES/binutils-gold-i386-gnu-property-notes.patch b/SOURCES/binutils-gold-i386-gnu-property-notes.patch new file mode 100644 index 0000000..89d9325 --- /dev/null +++ b/SOURCES/binutils-gold-i386-gnu-property-notes.patch @@ -0,0 +1,192 @@ +diff -rupN --no-dereference binutils-2.40/gold/i386.cc binutils-2.40-new/gold/i386.cc +--- binutils-2.40/gold/i386.cc 2023-01-14 01:00:00.000000000 +0100 ++++ binutils-2.40-new/gold/i386.cc 2023-03-09 14:52:02.399293207 +0100 +@@ -360,7 +360,11 @@ class Target_i386 : public Sized_target< + 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< + 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< + 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(Layou + 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. diff --git a/SOURCES/binutils-gold-mismatched-section-flags.patch b/SOURCES/binutils-gold-mismatched-section-flags.patch new file mode 100644 index 0000000..b1337f9 --- /dev/null +++ b/SOURCES/binutils-gold-mismatched-section-flags.patch @@ -0,0 +1,19 @@ +diff -rupN --no-dereference binutils-2.40/gold/layout.cc binutils-2.40-new/gold/layout.cc +--- binutils-2.40/gold/layout.cc 2023-01-14 01:00:00.000000000 +0100 ++++ binutils-2.40-new/gold/layout.cc 2023-03-09 14:51:59.908322697 +0100 +@@ -872,6 +872,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; +@@ -882,6 +883,7 @@ Layout::get_output_section(const char* n + if (p != this->section_name_map_.end()) + os = p->second; + } ++#endif + } + + if (os == NULL) diff --git a/SOURCES/binutils-gold-warn-unsupported.patch b/SOURCES/binutils-gold-warn-unsupported.patch new file mode 100644 index 0000000..58eb8a6 --- /dev/null +++ b/SOURCES/binutils-gold-warn-unsupported.patch @@ -0,0 +1,67 @@ +diff -rupN --no-dereference binutils-2.40/bfd/config.bfd binutils-2.40-new/bfd/config.bfd +--- binutils-2.40/bfd/config.bfd 2023-01-14 01:00:00.000000000 +0100 ++++ binutils-2.40-new/bfd/config.bfd 2023-03-09 14:52:01.154308002 +0100 +@@ -501,7 +501,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 +@@ -1494,7 +1494,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 + ;; +diff -rupN --no-dereference binutils-2.40/gold/configure binutils-2.40-new/gold/configure +--- binutils-2.40/gold/configure 2023-01-14 01:00:00.000000000 +0100 ++++ binutils-2.40-new/gold/configure 2023-03-09 14:52:01.152308026 +0100 +@@ -5255,7 +5255,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 -rupN --no-dereference binutils-2.40/gold/configure.ac binutils-2.40-new/gold/configure.ac +--- binutils-2.40/gold/configure.ac 2023-01-14 01:00:00.000000000 +0100 ++++ binutils-2.40-new/gold/configure.ac 2023-03-09 14:52:01.153308014 +0100 +@@ -182,7 +182,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 +diff -rupN --no-dereference binutils-2.40/ld/configure.tgt binutils-2.40-new/ld/configure.tgt +--- binutils-2.40/ld/configure.tgt 2023-01-14 01:00:00.000000000 +0100 ++++ binutils-2.40-new/ld/configure.tgt 2023-03-09 14:52:01.153308014 +0100 +@@ -263,7 +263,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 + ;; +@@ -1088,7 +1088,7 @@ loongarch64-*) targ_emul=elf64loongarch + 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 + diff --git a/SOURCES/binutils-libtool-no-rpath.patch b/SOURCES/binutils-libtool-no-rpath.patch new file mode 100644 index 0000000..6433eb0 --- /dev/null +++ b/SOURCES/binutils-libtool-no-rpath.patch @@ -0,0 +1,27 @@ +diff -rupN --no-dereference binutils-2.40/ltmain.sh binutils-2.40-new/ltmain.sh +--- binutils-2.40/ltmain.sh 2023-01-14 01:00:00.000000000 +0100 ++++ binutils-2.40-new/ltmain.sh 2023-03-09 14:52:04.803264344 +0100 +@@ -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 diff --git a/SOURCES/binutils-no-config-h-check.patch b/SOURCES/binutils-no-config-h-check.patch new file mode 100644 index 0000000..445d2c7 --- /dev/null +++ b/SOURCES/binutils-no-config-h-check.patch @@ -0,0 +1,30 @@ +diff -rupN --no-dereference binutils-2.40/bfd/bfd-in2.h binutils-2.40-new/bfd/bfd-in2.h +--- binutils-2.40/bfd/bfd-in2.h 2023-01-14 01:00:00.000000000 +0100 ++++ binutils-2.40-new/bfd/bfd-in2.h 2023-03-09 14:51:50.115434327 +0100 +@@ -30,11 +30,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 +diff -rupN --no-dereference binutils-2.40/bfd/bfd-in.h binutils-2.40-new/bfd/bfd-in.h +--- binutils-2.40/bfd/bfd-in.h 2023-01-14 01:00:00.000000000 +0100 ++++ binutils-2.40-new/bfd/bfd-in.h 2023-03-09 14:51:50.114434338 +0100 +@@ -23,11 +23,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 diff --git a/SOURCES/binutils-objcopy-note-merge-speedup.patch b/SOURCES/binutils-objcopy-note-merge-speedup.patch new file mode 100644 index 0000000..47f2d1d --- /dev/null +++ b/SOURCES/binutils-objcopy-note-merge-speedup.patch @@ -0,0 +1,45 @@ +diff -rupN --no-dereference binutils-2.40/binutils/objcopy.c binutils-2.40-new/binutils/objcopy.c +--- binutils-2.40/binutils/objcopy.c 2023-01-14 01:00:00.000000000 +0100 ++++ binutils-2.40-new/binutils/objcopy.c 2023-03-09 14:52:06.043249302 +0100 +@@ -2403,6 +2403,8 @@ merge_gnu_build_notes (bfd * ab + other note then if they are both of the same type (open + or func) then they can be merged and one deleted. If + they are of different types then they cannot be merged. */ ++ objcopy_internal_note * prev_note = NULL; ++ + for (pnote = pnotes; pnote < pnotes_end; pnote ++) + { + /* Skip already deleted notes. +@@ -2424,7 +2426,9 @@ merge_gnu_build_notes (bfd * ab + objcopy_internal_note * back; + + /* Rule 2: Check to see if there is an identical previous note. */ +- for (iter = 0, back = pnote - 1; back >= pnotes; back --) ++ for (iter = 0, back = prev_note ? prev_note : pnote - 1; ++ back >= pnotes; ++ back --) + { + if (is_deleted_note (back)) + continue; +@@ -2486,11 +2490,18 @@ merge_gnu_build_notes (bfd * ab + break; + } + } +-#if DEBUG_MERGE ++ ++ + if (! is_deleted_note (pnote)) +- merge_debug ("Unable to do anything with note at %#08lx\n", +- (pnote->note.namedata - (char *) contents) - 12); ++ { ++ /* Keep a pointer to this note, so that we can ++ start the next search for rule 2 matches here. */ ++ prev_note = pnote; ++#if DEBUG_MERGE ++ merge_debug ("Unable to do anything with note at %#08lx\n", ++ (pnote->note.namedata - (char *) contents) - 12); + #endif ++ } + } + + /* Resort the notes. */ diff --git a/SOURCES/binutils-readelf-other-sym-info.patch b/SOURCES/binutils-readelf-other-sym-info.patch new file mode 100644 index 0000000..3b68a30 --- /dev/null +++ b/SOURCES/binutils-readelf-other-sym-info.patch @@ -0,0 +1,36 @@ +diff -rupN --no-dereference binutils-2.40/binutils/readelf.c binutils-2.40-new/binutils/readelf.c +--- binutils-2.40/binutils/readelf.c 2023-03-09 14:51:52.549407223 +0100 ++++ binutils-2.40-new/binutils/readelf.c 2023-03-09 14:51:53.790393244 +0100 +@@ -13247,11 +13247,13 @@ print_dynamic_symbol (Filedata *filedata + unsigned int vis = ELF_ST_VISIBILITY (psym->st_other); + + printf (" %-7s", get_symbol_visibility (vis)); ++#if 0 + /* Check to see if any other bits in the st_other field are set. + Note - displaying this information disrupts the layout of the + table being generated, but for the moment this case is very rare. */ + if (psym->st_other ^ vis) + printf (" [%s] ", get_symbol_other (filedata, psym->st_other ^ vis)); ++#endif + } + printf (" %4s ", get_symbol_index_type (filedata, psym->st_shndx)); + +@@ -13305,7 +13307,17 @@ print_dynamic_symbol (Filedata *filedata + version_string); + } + +- putchar ('\n'); ++#if 1 ++ { ++ unsigned int vis = ELF_ST_VISIBILITY (psym->st_other); ++ ++ /* Check to see if any other bits in the st_other field are set. */ ++ if (psym->st_other ^ vis) ++ printf (" \t[%s]", get_symbol_other (filedata, psym->st_other ^ vis)); ++ } ++#endif ++ ++ putchar ('\n'); + + if (ELF_ST_BIND (psym->st_info) == STB_LOCAL + && section != NULL diff --git a/SOURCES/binutils-revert-PLT-elision.patch b/SOURCES/binutils-revert-PLT-elision.patch new file mode 100644 index 0000000..d40f838 --- /dev/null +++ b/SOURCES/binutils-revert-PLT-elision.patch @@ -0,0 +1,169 @@ +diff -rupN --no-dereference binutils-2.40/bfd/elfxx-x86.c binutils-2.40-new/bfd/elfxx-x86.c +--- binutils-2.40/bfd/elfxx-x86.c 2023-01-14 01:00:00.000000000 +0100 ++++ binutils-2.40-new/bfd/elfxx-x86.c 2023-03-09 14:51:52.557407133 +0100 +@@ -105,7 +105,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 +@@ -123,7 +123,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 +diff -rupN --no-dereference binutils-2.40/ld/testsuite/ld-i386/pltgot-1.d binutils-2.40-new/ld/testsuite/ld-i386/pltgot-1.d +--- binutils-2.40/ld/testsuite/ld-i386/pltgot-1.d 2023-01-14 01:00:00.000000000 +0100 ++++ binutils-2.40-new/ld/testsuite/ld-i386/pltgot-1.d 2023-03-09 14:51:52.553407178 +0100 +@@ -2,6 +2,7 @@ + #readelf: -S --wide + #as: --32 + ++#pass + #... + +\[ *[0-9]+\] \.plt +PROGBITS +[0-9a-f]+ +[0-9a-f]+ +0+10 +.* + #... +diff -rupN --no-dereference binutils-2.40/ld/testsuite/ld-i386/pltgot-2.d binutils-2.40-new/ld/testsuite/ld-i386/pltgot-2.d +--- binutils-2.40/ld/testsuite/ld-i386/pltgot-2.d 2023-01-14 01:00:00.000000000 +0100 ++++ binutils-2.40-new/ld/testsuite/ld-i386/pltgot-2.d 2023-03-09 14:51:52.554407167 +0100 +@@ -3,7 +3,6 @@ + #readelf: -d --wide + #as: --32 + +-#failif + #... + +0x[0-9a-f]+ +\(PLTREL.* + #... +diff -rupN --no-dereference binutils-2.40/ld/testsuite/ld-i386/pr19636-2d.d binutils-2.40-new/ld/testsuite/ld-i386/pr19636-2d.d +--- binutils-2.40/ld/testsuite/ld-i386/pr19636-2d.d 2023-01-14 01:00:00.000000000 +0100 ++++ binutils-2.40-new/ld/testsuite/ld-i386/pr19636-2d.d 2023-03-09 14:51:52.554407167 +0100 +@@ -8,7 +8,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 -rupN --no-dereference binutils-2.40/ld/testsuite/ld-i386/pr19636-2e.d binutils-2.40-new/ld/testsuite/ld-i386/pr19636-2e.d +--- binutils-2.40/ld/testsuite/ld-i386/pr19636-2e.d 2023-01-14 01:00:00.000000000 +0100 ++++ binutils-2.40-new/ld/testsuite/ld-i386/pr19636-2e.d 2023-03-09 14:51:52.554407167 +0100 +@@ -8,7 +8,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 -rupN --no-dereference binutils-2.40/ld/testsuite/ld-i386/pr20830.d binutils-2.40-new/ld/testsuite/ld-i386/pr20830.d +--- binutils-2.40/ld/testsuite/ld-i386/pr20830.d 2023-01-14 01:00:00.000000000 +0100 ++++ binutils-2.40-new/ld/testsuite/ld-i386/pr20830.d 2023-03-09 14:51:52.557407133 +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 +diff -rupN --no-dereference binutils-2.40/ld/testsuite/ld-x86-64/pltgot-1.d binutils-2.40-new/ld/testsuite/ld-x86-64/pltgot-1.d +--- binutils-2.40/ld/testsuite/ld-x86-64/pltgot-1.d 2023-01-14 01:00:00.000000000 +0100 ++++ binutils-2.40-new/ld/testsuite/ld-x86-64/pltgot-1.d 2023-03-09 14:51:52.555407156 +0100 +@@ -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 -rupN --no-dereference binutils-2.40/ld/testsuite/ld-x86-64/pltgot-2.d binutils-2.40-new/ld/testsuite/ld-x86-64/pltgot-2.d +--- binutils-2.40/ld/testsuite/ld-x86-64/pltgot-2.d 2023-01-14 01:00:00.000000000 +0100 ++++ binutils-2.40-new/ld/testsuite/ld-x86-64/pltgot-2.d 2023-03-09 14:51:52.555407156 +0100 +@@ -3,7 +3,6 @@ + #readelf: -d --wide + #as: --64 + +-#failif + #... + +0x[0-9a-f]+ +\(PLTREL.* + #... +diff -rupN --no-dereference binutils-2.40/ld/testsuite/ld-x86-64/plt-main.rd binutils-2.40-new/ld/testsuite/ld-x86-64/plt-main.rd +--- binutils-2.40/ld/testsuite/ld-x86-64/plt-main.rd 2023-01-14 01:00:00.000000000 +0100 ++++ binutils-2.40-new/ld/testsuite/ld-x86-64/plt-main.rd 2023-03-09 14:51:52.555407156 +0100 +@@ -1,4 +1,3 @@ +-#failif + #... + [0-9a-f ]+R_X86_64_JUMP_SLOT +0+ +bar \+ 0 + #... +diff -rupN --no-dereference binutils-2.40/ld/testsuite/ld-x86-64/pr20830a.d binutils-2.40-new/ld/testsuite/ld-x86-64/pr20830a.d +--- binutils-2.40/ld/testsuite/ld-x86-64/pr20830a.d 2023-01-14 01:00:00.000000000 +0100 ++++ binutils-2.40-new/ld/testsuite/ld-x86-64/pr20830a.d 2023-03-09 14:51:52.555407156 +0100 +@@ -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 -rupN --no-dereference binutils-2.40/ld/testsuite/ld-x86-64/pr20830a-now.d binutils-2.40-new/ld/testsuite/ld-x86-64/pr20830a-now.d +--- binutils-2.40/ld/testsuite/ld-x86-64/pr20830a-now.d 2023-01-14 01:00:00.000000000 +0100 ++++ binutils-2.40-new/ld/testsuite/ld-x86-64/pr20830a-now.d 2023-03-09 14:51:52.555407156 +0100 +@@ -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 -rupN --no-dereference binutils-2.40/ld/testsuite/ld-x86-64/pr20830b.d binutils-2.40-new/ld/testsuite/ld-x86-64/pr20830b.d +--- binutils-2.40/ld/testsuite/ld-x86-64/pr20830b.d 2023-01-14 01:00:00.000000000 +0100 ++++ binutils-2.40-new/ld/testsuite/ld-x86-64/pr20830b.d 2023-03-09 14:51:52.556407144 +0100 +@@ -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 -rupN --no-dereference binutils-2.40/ld/testsuite/ld-x86-64/pr20830b-now.d binutils-2.40-new/ld/testsuite/ld-x86-64/pr20830b-now.d +--- binutils-2.40/ld/testsuite/ld-x86-64/pr20830b-now.d 2023-01-14 01:00:00.000000000 +0100 ++++ binutils-2.40-new/ld/testsuite/ld-x86-64/pr20830b-now.d 2023-03-09 14:51:52.556407144 +0100 +@@ -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 -rupN --no-dereference binutils-2.40/ld/testsuite/ld-x86-64/tlspic2.rd binutils-2.40-new/ld/testsuite/ld-x86-64/tlspic2.rd +--- binutils-2.40/ld/testsuite/ld-x86-64/tlspic2.rd 2023-01-14 01:00:00.000000000 +0100 ++++ binutils-2.40-new/ld/testsuite/ld-x86-64/tlspic2.rd 2023-03-09 14:51:52.556407144 +0100 +@@ -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 diff --git a/SOURCES/binutils-special-sections-in-groups.patch b/SOURCES/binutils-special-sections-in-groups.patch new file mode 100644 index 0000000..a1d7dc0 --- /dev/null +++ b/SOURCES/binutils-special-sections-in-groups.patch @@ -0,0 +1,28 @@ +diff -rupN --no-dereference binutils-2.40/bfd/elf.c binutils-2.40-new/bfd/elf.c +--- binutils-2.40/bfd/elf.c 2023-01-14 01:00:00.000000000 +0100 ++++ binutils-2.40-new/bfd/elf.c 2023-03-09 14:51:57.453351322 +0100 +@@ -825,7 +825,13 @@ setup_group (bfd *abfd, Elf_Internal_Shd + } + } + +- if (elf_group_name (newsect) == NULL) ++ if (elf_group_name (newsect) == NULL ++ /* OS specific sections might be in a group (eg ARM's ARM_EXIDX section) ++ but they will not have been added to the group because they do not ++ have contents that the ELF code in the BFD library knows how to ++ process. This is OK though - we rely upon the target backends to ++ handle these sections for us. */ ++ && hdr->sh_type < SHT_LOOS) + { + /* xgettext:c-format */ + _bfd_error_handler (_("%pB: no group info for section '%pA'"), +@@ -933,7 +939,8 @@ _bfd_elf_setup_sections (bfd *abfd) + else if (idx->shdr->bfd_section) + elf_sec_group (idx->shdr->bfd_section) = shdr->bfd_section; + else if (idx->shdr->sh_type != SHT_RELA +- && idx->shdr->sh_type != SHT_REL) ++ && idx->shdr->sh_type != SHT_REL ++ && idx->shdr->sh_type < SHT_LOOS) + { + /* There are some unknown sections in the group. */ + _bfd_error_handler diff --git a/SOURCES/binutils-testsuite-fixes.patch b/SOURCES/binutils-testsuite-fixes.patch new file mode 100644 index 0000000..78ddee9 --- /dev/null +++ b/SOURCES/binutils-testsuite-fixes.patch @@ -0,0 +1,1121 @@ +diff -rupN --no-dereference binutils-2.40/binutils/testsuite/binutils-all/pr26160.r binutils-2.40-new/binutils/testsuite/binutils-all/pr26160.r +--- binutils-2.40/binutils/testsuite/binutils-all/pr26160.r 2023-01-14 01:00:00.000000000 +0100 ++++ binutils-2.40-new/binutils/testsuite/binutils-all/pr26160.r 2023-03-09 14:52:07.335233505 +0100 +@@ -30,14 +30,14 @@ Contents of the .debug_info.dwo section: + DW_AT_decl_file : 1 + DW_AT_decl_line : 30 + DW_AT_type : <0x90> +- DW_AT_low_pc :readelf: Warning: Cannot fetch indexed address: the .debug_addr section is missing ++ DW_AT_low_pc :readelf: .*: Warning: Cannot fetch indexed address: the .debug_addr section is missing + \(index: (0x)?0\): 0 + DW_AT_high_pc : 0x304 + DW_AT_frame_base : 1 byte block: 9c \(DW_OP_call_frame_cfa\) + DW_AT_GNU_all_tail_call_sites: 1 + DW_AT_sibling : <0x11b> + <2>: Abbrev Number: 14 \(DW_TAG_lexical_block\) +- DW_AT_low_pc :readelf: Warning: Cannot fetch indexed address: the .debug_addr section is missing ++ DW_AT_low_pc :readelf: .*: Warning: Cannot fetch indexed address: the .debug_addr section is missing + \(index: 0x1\): 0 + DW_AT_high_pc : 0x2fa + <3>: Abbrev Number: 15 \(DW_TAG_variable\) +@@ -58,7 +58,7 @@ Contents of the .debug_info.dwo section: + DW_AT_artificial : 1 + DW_AT_location : 2 byte block: fb 2 \(DW_OP_GNU_addr_index <0x2>\) + <3><102>: Abbrev Number: 14 \(DW_TAG_lexical_block\) +- <103> DW_AT_low_pc :readelf: Warning: Cannot fetch indexed address: the .debug_addr section is missing ++ <103> DW_AT_low_pc :readelf: .*: Warning: Cannot fetch indexed address: the .debug_addr section is missing + \(index: 0x3\): 0 + <104> DW_AT_high_pc : 0x2f + <4><10c>: Abbrev Number: 17 \(DW_TAG_variable\) +@@ -277,7 +277,7 @@ Contents of the .debug_info.dwo section: + <2dd> DW_AT_decl_file : 1 + <2de> DW_AT_decl_line : 70 + <2df> DW_AT_linkage_name: _Z4f13iv +- <2e8> DW_AT_low_pc :readelf: Warning: Cannot fetch indexed address: the .debug_addr section is missing ++ <2e8> DW_AT_low_pc :readelf: .*: Warning: Cannot fetch indexed address: the .debug_addr section is missing + \(index: (0x)?0\): 0 + <2e9> DW_AT_high_pc : 0x6 + <2f1> DW_AT_frame_base : 1 byte block: 9c \(DW_OP_call_frame_cfa\) +@@ -286,7 +286,7 @@ Contents of the .debug_info.dwo section: + <2f4> DW_AT_specification: <0x219> + <2f8> DW_AT_decl_file : 2 + <2f9> DW_AT_decl_line : 30 +- <2fa> DW_AT_low_pc :readelf: Warning: Cannot fetch indexed address: the .debug_addr section is missing ++ <2fa> DW_AT_low_pc :readelf: .*: Warning: Cannot fetch indexed address: the .debug_addr section is missing + \(index: 0x1\): 0 + <2fb> DW_AT_high_pc : 0x20 + <303> DW_AT_frame_base : 1 byte block: 9c \(DW_OP_call_frame_cfa\) +@@ -305,7 +305,7 @@ Contents of the .debug_info.dwo section: + <31d> DW_AT_specification: <0x223> + <321> DW_AT_decl_file : 2 + <322> DW_AT_decl_line : 38 +- <323> DW_AT_low_pc :readelf: Warning: Cannot fetch indexed address: the .debug_addr section is missing ++ <323> DW_AT_low_pc :readelf: .*: Warning: Cannot fetch indexed address: the .debug_addr section is missing + \(index: 0x2\): 0 + <324> DW_AT_high_pc : 0x18 + <32c> DW_AT_frame_base : 1 byte block: 9c \(DW_OP_call_frame_cfa\) +@@ -322,7 +322,7 @@ Contents of the .debug_info.dwo section: + <341> DW_AT_specification: <0x22d> + <345> DW_AT_decl_file : 2 + <346> DW_AT_decl_line : 46 +- <347> DW_AT_low_pc :readelf: Warning: Cannot fetch indexed address: the .debug_addr section is missing ++ <347> DW_AT_low_pc :readelf: .*: Warning: Cannot fetch indexed address: the .debug_addr section is missing + \(index: 0x3\): 0 + <348> DW_AT_high_pc : 0x18 + <350> DW_AT_frame_base : 1 byte block: 9c \(DW_OP_call_frame_cfa\) +@@ -339,7 +339,7 @@ Contents of the .debug_info.dwo section: + <365> DW_AT_specification: <0x237> + <369> DW_AT_decl_file : 2 + <36a> DW_AT_decl_line : 54 +- <36b> DW_AT_low_pc :readelf: Warning: Cannot fetch indexed address: the .debug_addr section is missing ++ <36b> DW_AT_low_pc :readelf: .*: Warning: Cannot fetch indexed address: the .debug_addr section is missing + \(index: 0x4\): 0 + <36c> DW_AT_high_pc : 0x16 + <374> DW_AT_frame_base : 1 byte block: 9c \(DW_OP_call_frame_cfa\) +@@ -356,7 +356,7 @@ Contents of the .debug_info.dwo section: + <389> DW_AT_specification: <0x26b> + <38d> DW_AT_decl_file : 2 + <38e> DW_AT_decl_line : 62 +- <38f> DW_AT_low_pc :readelf: Warning: Cannot fetch indexed address: the .debug_addr section is missing ++ <38f> DW_AT_low_pc :readelf: .*: Warning: Cannot fetch indexed address: the .debug_addr section is missing + \(index: 0x5\): 0 + <390> DW_AT_high_pc : 0x16 + <398> DW_AT_frame_base : 1 byte block: 9c \(DW_OP_call_frame_cfa\) +@@ -375,7 +375,7 @@ Contents of the .debug_info.dwo section: + <3b2> DW_AT_specification: <0x275> + <3b6> DW_AT_decl_file : 2 + <3b7> DW_AT_decl_line : 72 +- <3b8> DW_AT_low_pc :readelf: Warning: Cannot fetch indexed address: the .debug_addr section is missing ++ <3b8> DW_AT_low_pc :readelf: .*: Warning: Cannot fetch indexed address: the .debug_addr section is missing + \(index: 0x6\): 0 + <3b9> DW_AT_high_pc : 0x1b + <3c1> DW_AT_frame_base : 1 byte block: 9c \(DW_OP_call_frame_cfa\) +@@ -392,7 +392,7 @@ Contents of the .debug_info.dwo section: + <3d6> DW_AT_specification: <0x27f> + <3da> DW_AT_decl_file : 2 + <3db> DW_AT_decl_line : 82 +- <3dc> DW_AT_low_pc :readelf: Warning: Cannot fetch indexed address: the .debug_addr section is missing ++ <3dc> DW_AT_low_pc :readelf: .*: Warning: Cannot fetch indexed address: the .debug_addr section is missing + \(index: 0x7\): 0 + <3dd> DW_AT_high_pc : 0x1b + <3e5> DW_AT_frame_base : 1 byte block: 9c \(DW_OP_call_frame_cfa\) +@@ -409,7 +409,7 @@ Contents of the .debug_info.dwo section: + <3fa> DW_AT_specification: <0x289> + <3fe> DW_AT_decl_file : 2 + <3ff> DW_AT_decl_line : 92 +- <400> DW_AT_low_pc :readelf: Warning: Cannot fetch indexed address: the .debug_addr section is missing ++ <400> DW_AT_low_pc :readelf: .*: Warning: Cannot fetch indexed address: the .debug_addr section is missing + \(index: 0x8\): 0 + <401> DW_AT_high_pc : 0x19 + <409> DW_AT_frame_base : 1 byte block: 9c \(DW_OP_call_frame_cfa\) +@@ -426,7 +426,7 @@ Contents of the .debug_info.dwo section: + <41e> DW_AT_specification: <0x2ae> + <422> DW_AT_decl_file : 2 + <423> DW_AT_decl_line : 102 +- <424> DW_AT_low_pc :readelf: Warning: Cannot fetch indexed address: the .debug_addr section is missing ++ <424> DW_AT_low_pc :readelf: .*: Warning: Cannot fetch indexed address: the .debug_addr section is missing + \(index: 0x9\): 0 + <425> DW_AT_high_pc : 0x19 + <42d> DW_AT_frame_base : 1 byte block: 9c \(DW_OP_call_frame_cfa\) +@@ -445,7 +445,7 @@ Contents of the .debug_info.dwo section: + <447> DW_AT_specification: <0x2b8> + <44b> DW_AT_decl_file : 2 + <44c> DW_AT_decl_line : 112 +- <44d> DW_AT_low_pc :readelf: Warning: Cannot fetch indexed address: the .debug_addr section is missing ++ <44d> DW_AT_low_pc :readelf: .*: Warning: Cannot fetch indexed address: the .debug_addr section is missing + \(index: 0xa\): 0 + <44e> DW_AT_high_pc : 0x1f + <456> DW_AT_frame_base : 1 byte block: 9c \(DW_OP_call_frame_cfa\) +@@ -465,7 +465,7 @@ Contents of the .debug_info.dwo section: + <471> DW_AT_decl_line : 120 + <472> DW_AT_linkage_name: _Z4f11av + <47b> DW_AT_type : <0x242> +- <47f> DW_AT_low_pc :readelf: Warning: Cannot fetch indexed address: the .debug_addr section is missing ++ <47f> DW_AT_low_pc :readelf: .*: Warning: Cannot fetch indexed address: the .debug_addr section is missing + \(index: 0xb\): 0 + <480> DW_AT_high_pc : 0xb + <488> DW_AT_frame_base : 1 byte block: 9c \(DW_OP_call_frame_cfa\) +@@ -474,7 +474,7 @@ Contents of the .debug_info.dwo section: + <48b> DW_AT_specification: <0x2c2> + <48f> DW_AT_decl_file : 2 + <490> DW_AT_decl_line : 126 +- <491> DW_AT_low_pc :readelf: Warning: Cannot fetch indexed address: the .debug_addr section is missing ++ <491> DW_AT_low_pc :readelf: .*: Warning: Cannot fetch indexed address: the .debug_addr section is missing + \(index: 0xc\): 0 + <492> DW_AT_high_pc : 0x20 + <49a> DW_AT_frame_base : 1 byte block: 9c \(DW_OP_call_frame_cfa\) +@@ -494,7 +494,7 @@ Contents of the .debug_info.dwo section: + <4b4> DW_AT_decl_line : 134 + <4b5> DW_AT_linkage_name: _Z3t12v + <4bd> DW_AT_type : <0x249> +- <4c1> DW_AT_low_pc :readelf: Warning: Cannot fetch indexed address: the .debug_addr section is missing ++ <4c1> DW_AT_low_pc :readelf: .*: Warning: Cannot fetch indexed address: the .debug_addr section is missing + \(index: 0xd\): 0 + <4c2> DW_AT_high_pc : 0x19 + <4ca> DW_AT_frame_base : 1 byte block: 9c \(DW_OP_call_frame_cfa\) +@@ -506,7 +506,7 @@ Contents of the .debug_info.dwo section: + <4d2> DW_AT_decl_line : 142 + <4d3> DW_AT_linkage_name: _Z3t13v + <4db> DW_AT_type : <0x249> +- <4df> DW_AT_low_pc :readelf: Warning: Cannot fetch indexed address: the .debug_addr section is missing ++ <4df> DW_AT_low_pc :readelf: .*: Warning: Cannot fetch indexed address: the .debug_addr section is missing + \(index: 0xe\): 0 + <4e0> DW_AT_high_pc : 0x14 + <4e8> DW_AT_frame_base : 1 byte block: 9c \(DW_OP_call_frame_cfa\) +@@ -518,14 +518,14 @@ Contents of the .debug_info.dwo section: + <4f0> DW_AT_decl_line : 150 + <4f1> DW_AT_linkage_name: _Z3t14v + <4f9> DW_AT_type : <0x249> +- <4fd> DW_AT_low_pc :readelf: Warning: Cannot fetch indexed address: the .debug_addr section is missing ++ <4fd> DW_AT_low_pc :readelf: .*: Warning: Cannot fetch indexed address: the .debug_addr section is missing + \(index: 0xf\): 0 + <4fe> DW_AT_high_pc : 0x61 + <506> DW_AT_frame_base : 1 byte block: 9c \(DW_OP_call_frame_cfa\) + <508> DW_AT_GNU_all_tail_call_sites: 1 + <508> DW_AT_sibling : <0x532> + <2><50c>: Abbrev Number: 24 \(DW_TAG_lexical_block\) +- <50d> DW_AT_low_pc :readelf: Warning: Cannot fetch indexed address: the .debug_addr section is missing ++ <50d> DW_AT_low_pc :readelf: .*: Warning: Cannot fetch indexed address: the .debug_addr section is missing + \(index: 0x10\): 0 + <50e> DW_AT_high_pc : 0x57 + <3><516>: Abbrev Number: 25 \(DW_TAG_variable\) +@@ -558,14 +558,14 @@ Contents of the .debug_info.dwo section: + <54b> DW_AT_decl_line : 163 + <54c> DW_AT_linkage_name: _Z3t15v + <554> DW_AT_type : <0x249> +- <558> DW_AT_low_pc :readelf: Warning: Cannot fetch indexed address: the .debug_addr section is missing ++ <558> DW_AT_low_pc :readelf: .*: Warning: Cannot fetch indexed address: the .debug_addr section is missing + \(index: 0x11\): 0 + <559> DW_AT_high_pc : 0x5d + <561> DW_AT_frame_base : 1 byte block: 9c \(DW_OP_call_frame_cfa\) + <563> DW_AT_GNU_all_tail_call_sites: 1 + <563> DW_AT_sibling : <0x58d> + <2><567>: Abbrev Number: 24 \(DW_TAG_lexical_block\) +- <568> DW_AT_low_pc :readelf: Warning: Cannot fetch indexed address: the .debug_addr section is missing ++ <568> DW_AT_low_pc :readelf: .*: Warning: Cannot fetch indexed address: the .debug_addr section is missing + \(index: 0x12\): 0 + <569> DW_AT_high_pc : 0x53 + <3><571>: Abbrev Number: 25 \(DW_TAG_variable\) +@@ -598,7 +598,7 @@ Contents of the .debug_info.dwo section: + <5a9> DW_AT_decl_line : 176 + <5aa> DW_AT_linkage_name: _Z3t16v + <5b2> DW_AT_type : <0x249> +- <5b6> DW_AT_low_pc :readelf: Warning: Cannot fetch indexed address: the .debug_addr section is missing ++ <5b6> DW_AT_low_pc :readelf: .*: Warning: Cannot fetch indexed address: the .debug_addr section is missing + \(index: 0x13\): 0 + <5b7> DW_AT_high_pc : 0x13 + <5bf> DW_AT_frame_base : 1 byte block: 9c \(DW_OP_call_frame_cfa\) +@@ -610,14 +610,14 @@ Contents of the .debug_info.dwo section: + <5c7> DW_AT_decl_line : 184 + <5c8> DW_AT_linkage_name: _Z3t17v + <5d0> DW_AT_type : <0x249> +- <5d4> DW_AT_low_pc :readelf: Warning: Cannot fetch indexed address: the .debug_addr section is missing ++ <5d4> DW_AT_low_pc :readelf: .*: Warning: Cannot fetch indexed address: the .debug_addr section is missing + \(index: 0x14\): 0 + <5d5> DW_AT_high_pc : 0x5f + <5dd> DW_AT_frame_base : 1 byte block: 9c \(DW_OP_call_frame_cfa\) + <5df> DW_AT_GNU_all_call_sites: 1 + <5df> DW_AT_sibling : <0x612> + <2><5e3>: Abbrev Number: 24 \(DW_TAG_lexical_block\) +- <5e4> DW_AT_low_pc :readelf: Warning: Cannot fetch indexed address: the .debug_addr section is missing ++ <5e4> DW_AT_low_pc :readelf: .*: Warning: Cannot fetch indexed address: the .debug_addr section is missing + \(index: 0x15\): 0 + <5e5> DW_AT_high_pc : 0x59 + <3><5ed>: Abbrev Number: 25 \(DW_TAG_variable\) +@@ -627,7 +627,7 @@ Contents of the .debug_info.dwo section: + <5f2> DW_AT_type : <0x53d> + <5f6> DW_AT_location : 2 byte block: 91 6f \(DW_OP_fbreg: -17\) + <3><5f9>: Abbrev Number: 24 \(DW_TAG_lexical_block\) +- <5fa> DW_AT_low_pc :readelf: Warning: Cannot fetch indexed address: the .debug_addr section is missing ++ <5fa> DW_AT_low_pc :readelf: .*: Warning: Cannot fetch indexed address: the .debug_addr section is missing + \(index: 0x16\): 0 + <5fb> DW_AT_high_pc : 0x50 + <4><603>: Abbrev Number: 25 \(DW_TAG_variable\) +@@ -646,14 +646,14 @@ Contents of the .debug_info.dwo section: + <618> DW_AT_decl_line : 199 + <619> DW_AT_linkage_name: _Z3t18v + <621> DW_AT_type : <0x249> +- <625> DW_AT_low_pc :readelf: Warning: Cannot fetch indexed address: the .debug_addr section is missing ++ <625> DW_AT_low_pc :readelf: .*: Warning: Cannot fetch indexed address: the .debug_addr section is missing + \(index: 0x17\): 0 + <626> DW_AT_high_pc : 0x5f + <62e> DW_AT_frame_base : 1 byte block: 9c \(DW_OP_call_frame_cfa\) + <630> DW_AT_GNU_all_tail_call_sites: 1 + <630> DW_AT_sibling : <0x67a> + <2><634>: Abbrev Number: 24 \(DW_TAG_lexical_block\) +- <635> DW_AT_low_pc :readelf: Warning: Cannot fetch indexed address: the .debug_addr section is missing ++ <635> DW_AT_low_pc :readelf: .*: Warning: Cannot fetch indexed address: the .debug_addr section is missing + \(index: 0x18\): 0 + <636> DW_AT_high_pc : 0x55 + <3><63e>: Abbrev Number: 25 \(DW_TAG_variable\) +@@ -663,7 +663,7 @@ Contents of the .debug_info.dwo section: + <643> DW_AT_type : <0x53d> + <647> DW_AT_location : 2 byte block: 91 6f \(DW_OP_fbreg: -17\) + <3><64a>: Abbrev Number: 24 \(DW_TAG_lexical_block\) +- <64b> DW_AT_low_pc :readelf: Warning: Cannot fetch indexed address: the .debug_addr section is missing ++ <64b> DW_AT_low_pc :readelf: .*: Warning: Cannot fetch indexed address: the .debug_addr section is missing + \(index: 0x19\): 0 + <64c> DW_AT_high_pc : 0x4c + <4><654>: Abbrev Number: 25 \(DW_TAG_variable\) +@@ -673,7 +673,7 @@ Contents of the .debug_info.dwo section: + <659> DW_AT_type : <0x242> + <65d> DW_AT_location : 2 byte block: 91 68 \(DW_OP_fbreg: -24\) + <4><660>: Abbrev Number: 24 \(DW_TAG_lexical_block\) +- <661> DW_AT_low_pc :readelf: Warning: Cannot fetch indexed address: the .debug_addr section is missing ++ <661> DW_AT_low_pc :readelf: .*: Warning: Cannot fetch indexed address: the .debug_addr section is missing + \(index: 0x1a\): 0 + <662> DW_AT_high_pc : 0x34 + <5><66a>: Abbrev Number: 25 \(DW_TAG_variable\) +@@ -816,7 +816,7 @@ Contents of the .debug_info.dwo section: + <7d3> DW_AT_decl_line : 32 + <7d4> DW_AT_linkage_name: _Z4t16av + <7dd> DW_AT_type : <0x7c4> +- <7e1> DW_AT_low_pc :readelf: Warning: Cannot fetch indexed address: the .debug_addr section is missing ++ <7e1> DW_AT_low_pc :readelf: .*: Warning: Cannot fetch indexed address: the .debug_addr section is missing + \(index: (0x)?0\): 0 + <7e2> DW_AT_high_pc : 0x13 + <7ea> DW_AT_frame_base : 1 byte block: 9c \(DW_OP_call_frame_cfa\) +@@ -909,7 +909,7 @@ Contents of the .debug_info.dwo section: + <908> DW_AT_decl_file : 1 + <909> DW_AT_decl_line : 70 + <90a> DW_AT_linkage_name: _Z4f13iv +- <913> DW_AT_low_pc :readelf: Warning: Cannot fetch indexed address: the .debug_addr section is missing ++ <913> DW_AT_low_pc :readelf: .*: Warning: Cannot fetch indexed address: the .debug_addr section is missing + \(index: (0x)?0\): 0 + <914> DW_AT_high_pc : 0x6 + <91c> DW_AT_frame_base : 1 byte block: 9c \(DW_OP_call_frame_cfa\) +@@ -917,7 +917,7 @@ Contents of the .debug_info.dwo section: + <1><91e>: Abbrev Number: 17 \(DW_TAG_subprogram\) + <91f> DW_AT_specification: <0x8a8> + <923> DW_AT_decl_file : 2 +- <924> DW_AT_low_pc :readelf: Warning: Cannot fetch indexed address: the .debug_addr section is missing ++ <924> DW_AT_low_pc :readelf: .*: Warning: Cannot fetch indexed address: the .debug_addr section is missing + \(index: 0x1\): 0 + <925> DW_AT_high_pc : 0xf + <92d> DW_AT_frame_base : 1 byte block: 9c \(DW_OP_call_frame_cfa\) +@@ -936,7 +936,7 @@ Contents of the .debug_info.dwo section: + <94b> DW_AT_specification: <0x89b> + <94f> DW_AT_decl_file : 2 + <950> DW_AT_decl_line : 36 +- <951> DW_AT_low_pc :readelf: Warning: Cannot fetch indexed address: the .debug_addr section is missing ++ <951> DW_AT_low_pc :readelf: .*: Warning: Cannot fetch indexed address: the .debug_addr section is missing + \(index: 0x2\): 0 + <952> DW_AT_high_pc : 0x20 + <95a> DW_AT_frame_base : 1 byte block: 9c \(DW_OP_call_frame_cfa\) +@@ -956,7 +956,7 @@ Contents of the .debug_info.dwo section: + <978> DW_AT_decl_line : 72 + <979> DW_AT_linkage_name: _Z3f10v + <981> DW_AT_type : <0x8b7> +- <985> DW_AT_low_pc :readelf: Warning: Cannot fetch indexed address: the .debug_addr section is missing ++ <985> DW_AT_low_pc :readelf: .*: Warning: Cannot fetch indexed address: the .debug_addr section is missing + \(index: 0x3\): 0 + <986> DW_AT_high_pc : 0xb + <98e> DW_AT_frame_base : 1 byte block: 9c \(DW_OP_call_frame_cfa\) +@@ -968,7 +968,7 @@ Contents of the .debug_info.dwo section: + <997> DW_AT_decl_line : 80 + <998> DW_AT_linkage_name: _Z4f11bPFivE + <9a5> DW_AT_type : <0x8b7> +- <9a9> DW_AT_low_pc :readelf: Warning: Cannot fetch indexed address: the .debug_addr section is missing ++ <9a9> DW_AT_low_pc :readelf: .*: Warning: Cannot fetch indexed address: the .debug_addr section is missing + \(index: 0x4\): 0 + <9aa> DW_AT_high_pc : 0x14 + <9b2> DW_AT_frame_base : 1 byte block: 9c \(DW_OP_call_frame_cfa\) +@@ -990,7 +990,7 @@ Contents of the .debug_info.dwo section: + <9d3> DW_AT_specification: <0x8e0> + <9d7> DW_AT_decl_file : 2 + <9d8> DW_AT_decl_line : 88 +- <9d9> DW_AT_low_pc :readelf: Warning: Cannot fetch indexed address: the .debug_addr section is missing ++ <9d9> DW_AT_low_pc :readelf: .*: Warning: Cannot fetch indexed address: the .debug_addr section is missing + \(index: 0x5\): 0 + <9da> DW_AT_high_pc : 0xf + <9e2> DW_AT_frame_base : 1 byte block: 9c \(DW_OP_call_frame_cfa\) +@@ -1013,7 +1013,7 @@ Contents of the .debug_info.dwo section: + DW_AT_decl_line : 96 + DW_AT_linkage_name: _Z3f13v + DW_AT_type : <0xa1e> +- DW_AT_low_pc :readelf: Warning: Cannot fetch indexed address: the .debug_addr section is missing ++ DW_AT_low_pc :readelf: .*: Warning: Cannot fetch indexed address: the .debug_addr section is missing + \(index: 0x6\): 0 + DW_AT_high_pc : 0xb + DW_AT_frame_base : 1 byte block: 9c \(DW_OP_call_frame_cfa\) +@@ -1028,7 +1028,7 @@ Contents of the .debug_info.dwo section: + DW_AT_decl_line : 104 + DW_AT_linkage_name: _Z3f14v + DW_AT_type : <0xa42> +- DW_AT_low_pc :readelf: Warning: Cannot fetch indexed address: the .debug_addr section is missing ++ DW_AT_low_pc :readelf: .*: Warning: Cannot fetch indexed address: the .debug_addr section is missing + \(index: 0x7\): 0 + DW_AT_high_pc : 0xb + DW_AT_frame_base : 1 byte block: 9c \(DW_OP_call_frame_cfa\) +@@ -1049,7 +1049,7 @@ Contents of the .debug_info.dwo section: + DW_AT_decl_line : 112 + DW_AT_linkage_name: _Z3f15v + DW_AT_type : <0xa73> +- DW_AT_low_pc :readelf: Warning: Cannot fetch indexed address: the .debug_addr section is missing ++ DW_AT_low_pc :readelf: .*: Warning: Cannot fetch indexed address: the .debug_addr section is missing + \(index: 0x8\): 0 + DW_AT_high_pc : 0xb + DW_AT_frame_base : 1 byte block: 9c \(DW_OP_call_frame_cfa\) +@@ -1070,7 +1070,7 @@ Contents of the .debug_info.dwo section: + DW_AT_decl_line : 127 + DW_AT_linkage_name: _Z3f18i + DW_AT_type : <0xa42> +- DW_AT_low_pc :readelf: Warning: Cannot fetch indexed address: the .debug_addr section is missing ++ DW_AT_low_pc :readelf: .*: Warning: Cannot fetch indexed address: the .debug_addr section is missing + \(index: 0x9\): 0 + DW_AT_high_pc : 0x44 + DW_AT_frame_base : 1 byte block: 9c \(DW_OP_call_frame_cfa\) +diff -rupN --no-dereference binutils-2.40/gas/testsuite/gas/riscv/variant_cc.d binutils-2.40-new/gas/testsuite/gas/riscv/variant_cc.d +--- binutils-2.40/gas/testsuite/gas/riscv/variant_cc.d 2023-01-14 01:00:00.000000000 +0100 ++++ binutils-2.40-new/gas/testsuite/gas/riscv/variant_cc.d 2023-03-09 14:52:07.346233370 +0100 +@@ -3,7 +3,7 @@ + #readelf: -Ws + + #... +-[ ]+[0-9a-f]+:[ ]+0+[ ]+0[ ]+NOTYPE[ ]+LOCAL[ ]+DEFAULT[ ]+\[VARIANT_CC\][ ]+1[ ]+func ++[ ]+[0-9a-f]+:[ ]+0+[ ]+0[ ]+NOTYPE[ ]+LOCAL[ ]+DEFAULT[ ]+1[ ]+func[ ]+\[VARIANT_CC\] + #... +-[ ]+[0-9a-f]+:[ ]+0+[ ]+0[ ]+NOTYPE[ ]+GLOBAL[ ]+DEFAULT[ ]+\[VARIANT_CC\][ ]+UND[ ]+foo ++[ ]+[0-9a-f]+:[ ]+0+[ ]+0[ ]+NOTYPE[ ]+GLOBAL[ ]+DEFAULT[ ]+UND[ ]+foo[ ]+\[VARIANT_CC\] + #... +diff -rupN --no-dereference binutils-2.40/gas/testsuite/gas/riscv/variant_cc-set.d binutils-2.40-new/gas/testsuite/gas/riscv/variant_cc-set.d +--- binutils-2.40/gas/testsuite/gas/riscv/variant_cc-set.d 2023-01-14 01:00:00.000000000 +0100 ++++ binutils-2.40-new/gas/testsuite/gas/riscv/variant_cc-set.d 2023-03-09 14:52:07.346233370 +0100 +@@ -3,11 +3,11 @@ + #readelf: -Ws + + #... +-[ ]+[0-9a-f]+:[ ]+0+[ ]+0[ ]+NOTYPE[ ]+GLOBAL[ ]+DEFAULT[ ]+\[VARIANT_CC\][ ]+1[ ]+foo ++[ ]+[0-9a-f]+:[ ]+0+[ ]+0[ ]+NOTYPE[ ]+GLOBAL[ ]+DEFAULT[ ]+1[ ]+foo[ ]+\[VARIANT_CC\] + #... + [ ]+[0-9a-f]+:[ ]+0+[ ]+0[ ]+NOTYPE[ ]+GLOBAL[ ]+DEFAULT[ ]+1[ ]+bar + #... +-[ ]+[0-9a-f]+:[ ]+0+[ ]+0[ ]+NOTYPE[ ]+GLOBAL[ ]+DEFAULT[ ]+\[VARIANT_CC\][ ]+1[ ]+alias_foo ++[ ]+[0-9a-f]+:[ ]+0+[ ]+0[ ]+NOTYPE[ ]+GLOBAL[ ]+DEFAULT[ ]+1[ ]+alias_foo[ ]+\[VARIANT_CC\] + #... + [ ]+[0-9a-f]+:[ ]+0+[ ]+0[ ]+NOTYPE[ ]+GLOBAL[ ]+DEFAULT[ ]+1[ ]alias_bar + #... +diff -rupN --no-dereference binutils-2.40/ld/testsuite/ld-aarch64/bti-plt-5.d binutils-2.40-new/ld/testsuite/ld-aarch64/bti-plt-5.d +--- binutils-2.40/ld/testsuite/ld-aarch64/bti-plt-5.d 2023-01-14 01:00:00.000000000 +0100 ++++ binutils-2.40-new/ld/testsuite/ld-aarch64/bti-plt-5.d 2023-03-09 14:52:07.338233469 +0100 +@@ -8,7 +8,7 @@ + [^:]*: *file format elf64-.*aarch64 + + Disassembly of section \.plt: +- ++#pass + [0-9a-f]+ <.*>: + .*: d503245f bti c + .*: a9bf7bf0 stp x16, x30, \[sp, #-16\]! +diff -rupN --no-dereference binutils-2.40/ld/testsuite/ld-aarch64/erratum843419-far-full.d binutils-2.40-new/ld/testsuite/ld-aarch64/erratum843419-far-full.d +--- binutils-2.40/ld/testsuite/ld-aarch64/erratum843419-far-full.d 2023-01-14 01:00:00.000000000 +0100 ++++ binutils-2.40-new/ld/testsuite/ld-aarch64/erratum843419-far-full.d 2023-03-09 14:52:07.339233456 +0100 +@@ -5,7 +5,7 @@ + #... + + Disassembly of section \.text: +- ++#pass + 0*400000 <_start>: + ... + 400ffc: 90400000 adrp x0, 80400000 <__bss_end__\+0x7ffedff0> +diff -rupN --no-dereference binutils-2.40/ld/testsuite/ld-aarch64/farcall-bl-plt.d binutils-2.40-new/ld/testsuite/ld-aarch64/farcall-bl-plt.d +--- binutils-2.40/ld/testsuite/ld-aarch64/farcall-bl-plt.d 2023-01-14 01:00:00.000000000 +0100 ++++ binutils-2.40-new/ld/testsuite/ld-aarch64/farcall-bl-plt.d 2023-03-09 14:52:07.339233456 +0100 +@@ -7,7 +7,7 @@ + #... + + Disassembly of section .plt: +- ++#pass + .* <.plt>: + .*: a9bf7bf0 stp x16, x30, \[sp, #-16\]! + .*: .* adrp x16, .* <__foo_veneer\+.*> +diff -rupN --no-dereference binutils-2.40/ld/testsuite/ld-aarch64/farcall-b-plt.d binutils-2.40-new/ld/testsuite/ld-aarch64/farcall-b-plt.d +--- binutils-2.40/ld/testsuite/ld-aarch64/farcall-b-plt.d 2023-01-14 01:00:00.000000000 +0100 ++++ binutils-2.40-new/ld/testsuite/ld-aarch64/farcall-b-plt.d 2023-03-09 14:52:07.339233456 +0100 +@@ -7,7 +7,7 @@ + #... + + Disassembly of section .plt: +- ++#pass + .* <.plt>: + .*: a9bf7bf0 stp x16, x30, \[sp, #-16\]! + .*: .* adrp x16, .* <__foo_veneer\+.*> +diff -rupN --no-dereference binutils-2.40/ld/testsuite/ld-aarch64/ifunc-1.d binutils-2.40-new/ld/testsuite/ld-aarch64/ifunc-1.d +--- binutils-2.40/ld/testsuite/ld-aarch64/ifunc-1.d 2023-01-14 01:00:00.000000000 +0100 ++++ binutils-2.40-new/ld/testsuite/ld-aarch64/ifunc-1.d 2023-03-09 14:52:07.339233456 +0100 +@@ -2,8 +2,4 @@ + #ld: -shared --hash-style=sysv + #objdump: -dw + +-#... +-0+(130|1a0|1c8) : +-#... +-[ \t0-9a-f]+:[ \t0-9a-f]+bl[ \t0-9a-f]+<\*ABS\*\+0x(130|1a0|1c8)@plt> + #pass +diff -rupN --no-dereference binutils-2.40/ld/testsuite/ld-aarch64/ifunc-1-local.d binutils-2.40-new/ld/testsuite/ld-aarch64/ifunc-1-local.d +--- binutils-2.40/ld/testsuite/ld-aarch64/ifunc-1-local.d 2023-01-14 01:00:00.000000000 +0100 ++++ binutils-2.40-new/ld/testsuite/ld-aarch64/ifunc-1-local.d 2023-03-09 14:52:07.342233420 +0100 +@@ -2,8 +2,4 @@ + #ld: -shared --hash-style=sysv + #objdump: -dw + +-#... +-0+(110|180|1a0) <(__GI_)?foo>: +-#... +-[ \t0-9a-f]+:[ \t0-9a-f]+bl[ \t0-9a-f]+<\*ABS\*\+(0x110|0x180|0x1a0)@plt> + #pass +diff -rupN --no-dereference binutils-2.40/ld/testsuite/ld-aarch64/ifunc-21.d binutils-2.40-new/ld/testsuite/ld-aarch64/ifunc-21.d +--- binutils-2.40/ld/testsuite/ld-aarch64/ifunc-21.d 2023-01-14 01:00:00.000000000 +0100 ++++ binutils-2.40-new/ld/testsuite/ld-aarch64/ifunc-21.d 2023-03-09 14:52:07.339233456 +0100 +@@ -6,6 +6,7 @@ + # Ensure the .got.plt slot used is correct + + .*: file format elf64-(little|big)aarch64 ++#pass + + Contents of section .text: + [0-9a-f]+ .* +diff -rupN --no-dereference binutils-2.40/ld/testsuite/ld-aarch64/ifunc-22.d binutils-2.40-new/ld/testsuite/ld-aarch64/ifunc-22.d +--- binutils-2.40/ld/testsuite/ld-aarch64/ifunc-22.d 2023-01-14 01:00:00.000000000 +0100 ++++ binutils-2.40-new/ld/testsuite/ld-aarch64/ifunc-22.d 2023-03-09 14:52:07.340233444 +0100 +@@ -6,6 +6,7 @@ + # Ensure GOT is populated correctly in static link + + .*: file format elf64-(little|big)aarch64 ++#pass + + Contents of section \.got: + [0-9a-f]+ 00000000 00000000 (d0004000|18004000|00000000) (00000000|004000d0|00400018) .* +diff -rupN --no-dereference binutils-2.40/ld/testsuite/ld-aarch64/ifunc-2.d binutils-2.40-new/ld/testsuite/ld-aarch64/ifunc-2.d +--- binutils-2.40/ld/testsuite/ld-aarch64/ifunc-2.d 2023-01-14 01:00:00.000000000 +0100 ++++ binutils-2.40-new/ld/testsuite/ld-aarch64/ifunc-2.d 2023-03-09 14:52:07.342233420 +0100 +@@ -2,10 +2,4 @@ + #ld: -shared --hash-style=sysv + #objdump: -dw + +-#... +-0+(130|1a0|1c8) : +-#... +-[ \t0-9a-f]+:[ \t0-9a-f]+bl[ \t0-9a-f]+<\*ABS\*\+0x(130|1a0|1c8)@plt> +-[ \t0-9a-f]+:[ \t0-9a-f]+adrp[ \t]+x0, 0 <.*> +-[ \t0-9a-f]+:[ \t0-9a-f]+add[ \t]+x0, x0, #0x(120|190|1b8) + #pass +diff -rupN --no-dereference binutils-2.40/ld/testsuite/ld-aarch64/ifunc-2-local.d binutils-2.40-new/ld/testsuite/ld-aarch64/ifunc-2-local.d +--- binutils-2.40/ld/testsuite/ld-aarch64/ifunc-2-local.d 2023-01-14 01:00:00.000000000 +0100 ++++ binutils-2.40-new/ld/testsuite/ld-aarch64/ifunc-2-local.d 2023-03-09 14:52:07.342233420 +0100 +@@ -2,10 +2,4 @@ + #ld: -shared --hash-style=sysv + #objdump: -dw + +-#... +-0+(110|180|1a0) <__GI_foo>: +-#... +-[ \t0-9a-f]+:[ \t0-9a-f]+bl[ \t0-9a-f]+<\*ABS\*\+0x(110|180|1a0)@plt> +-[ \t0-9a-f]+:[ \t0-9a-f]+adrp[ \t]+x0, 0 <.*> +-[ \t0-9a-f]+:[ \t0-9a-f]+add[ \t]+x0, x0, #0x(100|170|190) + #pass +diff -rupN --no-dereference binutils-2.40/ld/testsuite/ld-aarch64/ifunc-3a.d binutils-2.40-new/ld/testsuite/ld-aarch64/ifunc-3a.d +--- binutils-2.40/ld/testsuite/ld-aarch64/ifunc-3a.d 2023-01-14 01:00:00.000000000 +0100 ++++ binutils-2.40-new/ld/testsuite/ld-aarch64/ifunc-3a.d 2023-03-09 14:52:07.342233420 +0100 +@@ -3,8 +3,4 @@ + #ld: -shared --hash-style=sysv + #objdump: -dw + +-#... +-0+(150|1d0|1e8) <__GI_foo>: +-#... +-[ \t0-9a-f]+:[ \t0-9a-f]+bl[ \t0-9a-f]+<\*ABS\*\+0x(150|1d0|1e8)@plt> + #pass +diff -rupN --no-dereference binutils-2.40/ld/testsuite/ld-aarch64/ifunc-7c.d binutils-2.40-new/ld/testsuite/ld-aarch64/ifunc-7c.d +--- binutils-2.40/ld/testsuite/ld-aarch64/ifunc-7c.d 2023-01-14 01:00:00.000000000 +0100 ++++ binutils-2.40-new/ld/testsuite/ld-aarch64/ifunc-7c.d 2023-03-09 14:52:07.340233444 +0100 +@@ -6,7 +6,7 @@ + # Check if adrp and ldr have been relocated correctly. + + .*: file format elf.+aarch64.* +- ++#pass + + Disassembly of section \.text: + +diff -rupN --no-dereference binutils-2.40/ld/testsuite/ld-aarch64/variant_pcs-now.d binutils-2.40-new/ld/testsuite/ld-aarch64/variant_pcs-now.d +--- binutils-2.40/ld/testsuite/ld-aarch64/variant_pcs-now.d 2023-01-14 01:00:00.000000000 +0100 ++++ binutils-2.40-new/ld/testsuite/ld-aarch64/variant_pcs-now.d 2023-03-09 14:52:07.340233444 +0100 +@@ -5,6 +5,7 @@ + #readelf: -rsW + + Relocation section '\.rela\.plt' at offset 0x11000 contains 12 entries: ++#pass + Offset Info Type Symbol's Value Symbol's Name \+ Addend + 0000000000009020 0000000100000402 R_AARCH64_JUMP_SLOT 0000000000000000 f_base_global_default_undef \+ 0 + 0000000000009028 0000000200000402 R_AARCH64_JUMP_SLOT 0000000000000000 f_spec_global_default_undef \+ 0 +diff -rupN --no-dereference binutils-2.40/ld/testsuite/ld-aarch64/variant_pcs-r.d binutils-2.40-new/ld/testsuite/ld-aarch64/variant_pcs-r.d +--- binutils-2.40/ld/testsuite/ld-aarch64/variant_pcs-r.d 2023-01-14 01:00:00.000000000 +0100 ++++ binutils-2.40-new/ld/testsuite/ld-aarch64/variant_pcs-r.d 2023-03-09 14:52:07.340233444 +0100 +@@ -4,6 +4,7 @@ + #readelf: -rsW + + Relocation section '\.rela\.text' at offset .* contains 24 entries: ++#pass + Offset Info Type Symbol's Value Symbol's Name \+ Addend + 0000000000000000 000000180000011b R_AARCH64_CALL26 0000000000000000 f_spec_global_default_def \+ 0 + 0000000000000004 000000110000011b R_AARCH64_CALL26 0000000000000000 f_spec_global_default_undef \+ 0 +diff -rupN --no-dereference binutils-2.40/ld/testsuite/ld-aarch64/variant_pcs-shared.d binutils-2.40-new/ld/testsuite/ld-aarch64/variant_pcs-shared.d +--- binutils-2.40/ld/testsuite/ld-aarch64/variant_pcs-shared.d 2023-01-14 01:00:00.000000000 +0100 ++++ binutils-2.40-new/ld/testsuite/ld-aarch64/variant_pcs-shared.d 2023-03-09 14:52:07.340233444 +0100 +@@ -5,6 +5,7 @@ + #readelf: -rsW + + Relocation section '\.rela\.plt' at offset 0x11000 contains 12 entries: ++#pass + Offset Info Type Symbol's Value Symbol's Name \+ Addend + 0000000000009020 0000000100000402 R_AARCH64_JUMP_SLOT 0000000000000000 f_base_global_default_undef \+ 0 + 0000000000009028 0000000200000402 R_AARCH64_JUMP_SLOT 0000000000000000 f_spec_global_default_undef \+ 0 +diff -rupN --no-dereference binutils-2.40/ld/testsuite/ld-elf/binutils.exp binutils-2.40-new/ld/testsuite/ld-elf/binutils.exp +--- binutils-2.40/ld/testsuite/ld-elf/binutils.exp 2023-01-14 01:00:00.000000000 +0100 ++++ binutils-2.40-new/ld/testsuite/ld-elf/binutils.exp 2023-03-09 14:52:07.343233407 +0100 +@@ -174,7 +174,7 @@ binutils_test strip "-T ${srcdir}/${subd + + set tls_tests { "tdata1" "tdata2" } + # hppa64 has its own .tbss section, with different flags. +-if { ![istarget "hppa64-*-*"] } { ++if { ![istarget "hppa64-*-*"] && ![istarget "powerpc*-*-*"] } { + lappend tls_tests "tdata3" "tbss1" "tbss2" "tbss3" + } + set tls_opts { +diff -rupN --no-dereference binutils-2.40/ld/testsuite/ld-elf/dwarf.exp binutils-2.40-new/ld/testsuite/ld-elf/dwarf.exp +--- binutils-2.40/ld/testsuite/ld-elf/dwarf.exp 2023-01-14 01:00:00.000000000 +0100 ++++ binutils-2.40-new/ld/testsuite/ld-elf/dwarf.exp 2023-03-09 14:52:07.348233346 +0100 +@@ -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 -rupN --no-dereference binutils-2.40/ld/testsuite/ld-elf/linux-x86.exp binutils-2.40-new/ld/testsuite/ld-elf/linux-x86.exp +--- binutils-2.40/ld/testsuite/ld-elf/linux-x86.exp 2023-01-14 01:00:00.000000000 +0100 ++++ binutils-2.40-new/ld/testsuite/ld-elf/linux-x86.exp 2023-03-09 14:52:07.343233407 +0100 +@@ -72,7 +72,7 @@ run_ld_link_tests [list \ + "x86-feature-1" \ + ] \ + ] +- ++return + run_cc_link_tests [list \ + [list \ + "Build indirect-extern-access-1.so" \ +diff -rupN --no-dereference binutils-2.40/ld/testsuite/ld-elf/shared.exp binutils-2.40-new/ld/testsuite/ld-elf/shared.exp +--- binutils-2.40/ld/testsuite/ld-elf/shared.exp 2023-01-14 01:00:00.000000000 +0100 ++++ binutils-2.40-new/ld/testsuite/ld-elf/shared.exp 2023-03-09 14:52:07.344233395 +0100 +@@ -1151,6 +1151,8 @@ set run_tests [list \ + [list "Run pr21964-3" \ + "-Wl,--no-as-needed,-rpath,tmpdir tmpdir/pr21964-1a.so tmpdir/pr21964-1b.so tmpdir/pr21964-3a.so" "" \ + {pr21964-3c.c} "pr21964-3" "pass.out" ] \ ++] ++set disabled_run_tests [list \ + [list "pr26580-3" \ + "" "" \ + {pr26580-a.c} "pr26580-3" "pr26580-3.out" "-fcommon" "c" "" \ +@@ -1578,6 +1580,8 @@ if { [istarget *-*-linux*] + "pr22393-2-static" \ + "pass.out" \ + ] \ ++ ] ++ set disabled_run_ld_link_exec_tests [list \ + [list \ + "Run pr21964-4" \ + "" \ +@@ -1656,7 +1660,7 @@ proc mix_pic_and_non_pic {xfails cflags + } + } + +-mix_pic_and_non_pic [list "arm*-*-*" "aarch64*-*-*"] "" "" "pr19719" ++mix_pic_and_non_pic [list "arm*-*-*"] "" "" "pr19719" + mix_pic_and_non_pic [] "-fPIE" "-pie" "pr19719pie" + + set AFLAGS_PIE "" +diff -rupN --no-dereference binutils-2.40/ld/testsuite/ld-elf/tls.exp binutils-2.40-new/ld/testsuite/ld-elf/tls.exp +--- binutils-2.40/ld/testsuite/ld-elf/tls.exp 2023-01-14 01:00:00.000000000 +0100 ++++ binutils-2.40-new/ld/testsuite/ld-elf/tls.exp 2023-03-09 14:52:07.348233346 +0100 +@@ -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 +diff -rupN --no-dereference binutils-2.40/ld/testsuite/ld-i386/i386.exp binutils-2.40-new/ld/testsuite/ld-i386/i386.exp +--- binutils-2.40/ld/testsuite/ld-i386/i386.exp 2023-01-14 01:00:00.000000000 +0100 ++++ binutils-2.40-new/ld/testsuite/ld-i386/i386.exp 2023-03-09 14:52:07.344233395 +0100 +@@ -595,7 +595,7 @@ proc undefined_weak {cflags ldflags} { + pass $testname + } + } +- ++return + # Must be Linux native with the C compiler + if { [isnative] + && [istarget "i?86-*-linux*"] +diff -rupN --no-dereference binutils-2.40/ld/testsuite/ld-ifunc/ifunc.exp binutils-2.40-new/ld/testsuite/ld-ifunc/ifunc.exp +--- binutils-2.40/ld/testsuite/ld-ifunc/ifunc.exp 2023-01-14 01:00:00.000000000 +0100 ++++ binutils-2.40-new/ld/testsuite/ld-ifunc/ifunc.exp 2023-03-09 14:52:07.345233383 +0100 +@@ -39,6 +39,7 @@ if { ![is_elf_format] || ![supports_gnu_ + || [istarget nds32*-*-*] + || [istarget nios2-*-*] + || [istarget or1k-*-*] ++ || [istarget powerpc*-*-*] + || [istarget score*-*-*] + || [istarget sh*-*-*] + || [istarget tic6x-*-*] +diff -rupN --no-dereference binutils-2.40/ld/testsuite/ld-plugin/lto.exp binutils-2.40-new/ld/testsuite/ld-plugin/lto.exp +--- binutils-2.40/ld/testsuite/ld-plugin/lto.exp 2023-01-14 01:00:00.000000000 +0100 ++++ binutils-2.40-new/ld/testsuite/ld-plugin/lto.exp 2023-03-09 14:52:07.338233469 +0100 +@@ -31,8 +31,8 @@ if { ![check_plugin_api_available] + + set saved_CFLAGS "$CFLAGS_FOR_TARGET" + set saved_CXXFLAGS "$CXXFLAGS_FOR_TARGET" +-regsub -all "(\\-Wp,)?-D_FORTIFY_SOURCE=\[0-9\]+" $CFLAGS_FOR_TARGET "" CFLAGS_FOR_TARGET +-regsub -all "(\\-Wp,)?-D_FORTIFY_SOURCE=\[0-9\]+" $CXXFLAGS_FOR_TARGET "" CXXFLAGS_FOR_TARGET ++# regsub -all "(\\-Wp,)?-D_FORTIFY_SOURCE=\[0-9\]+" $CFLAGS_FOR_TARGET "" CFLAGS_FOR_TARGET ++# regsub -all "(\\-Wp,)?-D_FORTIFY_SOURCE=\[0-9\]+" $CXXFLAGS_FOR_TARGET "" CXXFLAGS_FOR_TARGET + + proc restore_notify { } { + global saved_CFLAGS +@@ -480,6 +480,9 @@ set lto_link_elf_tests [list \ + "libpr28879a.so" \ + "c++" \ + ] \ ++] ++ ++set disabled_lto_link_elf_tests [list \ + [list \ + "Build libpr28879b.so" \ + "-shared -Wl,--no-as-needed tmpdir/libpr28879a.so" \ +diff -rupN --no-dereference binutils-2.40/ld/testsuite/ld-plugin/plugin-10.d binutils-2.40-new/ld/testsuite/ld-plugin/plugin-10.d +--- binutils-2.40/ld/testsuite/ld-plugin/plugin-10.d 2023-03-09 14:51:59.900322791 +0100 ++++ binutils-2.40-new/ld/testsuite/ld-plugin/plugin-10.d 2023-03-09 14:52:07.336233493 +0100 +@@ -32,7 +32,7 @@ hook called: claim_file tmpdir/func.o \[ + hook called: claim_file tmpdir/libtext.a \[@.* not claimed + #... + hook called: all symbols read. +-Sym: '_?func' Resolution: LDPR_PREVAILING_DEF_IRONLY ++Sym: '_?func' Resolution: LDPR_PREVAILING_.* + Sym: '_?func2' Resolution: LDPR_PREVAILING_DEF_IRONLY + #... + hook called: cleanup. +diff -rupN --no-dereference binutils-2.40/ld/testsuite/ld-plugin/plugin-11.d binutils-2.40-new/ld/testsuite/ld-plugin/plugin-11.d +--- binutils-2.40/ld/testsuite/ld-plugin/plugin-11.d 2023-03-09 14:51:59.900322791 +0100 ++++ binutils-2.40-new/ld/testsuite/ld-plugin/plugin-11.d 2023-03-09 14:52:07.336233493 +0100 +@@ -35,9 +35,9 @@ hook called: claim_file tmpdir/func.o \[ + hook called: claim_file tmpdir/libtext.a \[@.* CLAIMED + #... + hook called: all symbols read. +-Sym: '_?func' Resolution: LDPR_PREVAILING_DEF_IRONLY ++Sym: '_?func' Resolution: LDPR_PREVAILING_.* + Sym: '_?func2' Resolution: LDPR_PREVAILING_DEF_IRONLY +-Sym: '_?text' Resolution: LDPR_PREVAILING_DEF_IRONLY ++Sym: '_?text' Resolution: LDPR_PREVAILING_.* + #... + hook called: cleanup. + #... +diff -rupN --no-dereference binutils-2.40/ld/testsuite/ld-plugin/plugin-16.d binutils-2.40-new/ld/testsuite/ld-plugin/plugin-16.d +--- binutils-2.40/ld/testsuite/ld-plugin/plugin-16.d 2023-03-09 14:51:59.900322791 +0100 ++++ binutils-2.40-new/ld/testsuite/ld-plugin/plugin-16.d 2023-03-09 14:52:07.336233493 +0100 +@@ -30,7 +30,7 @@ hook called: claim_file .*/ld/testsuite/ + hook called: claim_file tmpdir/text.o \[@0/.* not claimed + #... + hook called: all symbols read. +-Sym: '_?func' Resolution: LDPR_PREVAILING_DEF_IRONLY ++Sym: '_?func' Resolution: LDPR_PREVAILING_.* + Sym: '_?func2' Resolution: LDPR_PREVAILING_DEF_IRONLY + #... + hook called: cleanup. +diff -rupN --no-dereference binutils-2.40/ld/testsuite/ld-plugin/plugin-17.d binutils-2.40-new/ld/testsuite/ld-plugin/plugin-17.d +--- binutils-2.40/ld/testsuite/ld-plugin/plugin-17.d 2023-03-09 14:51:59.901322779 +0100 ++++ binutils-2.40-new/ld/testsuite/ld-plugin/plugin-17.d 2023-03-09 14:52:07.336233493 +0100 +@@ -31,7 +31,7 @@ hook called: claim_file .*/ld/testsuite/ + hook called: claim_file tmpdir/text.o \[@0/.* not claimed + #... + hook called: all symbols read. +-Sym: '_?func' Resolution: LDPR_PREVAILING_DEF_IRONLY ++Sym: '_?func' Resolution: LDPR_PREVAILING_.* + Sym: '_?func2' Resolution: LDPR_PREVAILING_DEF_IRONLY + #... + hook called: cleanup. +diff -rupN --no-dereference binutils-2.40/ld/testsuite/ld-plugin/plugin-18.d binutils-2.40-new/ld/testsuite/ld-plugin/plugin-18.d +--- binutils-2.40/ld/testsuite/ld-plugin/plugin-18.d 2023-03-09 14:51:59.901322779 +0100 ++++ binutils-2.40-new/ld/testsuite/ld-plugin/plugin-18.d 2023-03-09 14:52:07.336233493 +0100 +@@ -32,7 +32,7 @@ hook called: claim_file .*/ld/testsuite/ + hook called: claim_file tmpdir/libtext.a \[@.* not claimed + #... + hook called: all symbols read. +-Sym: '_?func' Resolution: LDPR_PREVAILING_DEF_IRONLY ++Sym: '_?func' Resolution: LDPR_PREVAILING_.* + Sym: '_?func2' Resolution: LDPR_PREVAILING_DEF_IRONLY + #... + hook called: cleanup. +diff -rupN --no-dereference binutils-2.40/ld/testsuite/ld-plugin/plugin-19.d binutils-2.40-new/ld/testsuite/ld-plugin/plugin-19.d +--- binutils-2.40/ld/testsuite/ld-plugin/plugin-19.d 2023-03-09 14:51:59.901322779 +0100 ++++ binutils-2.40-new/ld/testsuite/ld-plugin/plugin-19.d 2023-03-09 14:52:07.338233469 +0100 +@@ -35,9 +35,9 @@ hook called: claim_file .*/ld/testsuite/ + hook called: claim_file tmpdir/libtext.a \[@.* CLAIMED + #... + hook called: all symbols read. +-Sym: '_?func' Resolution: LDPR_PREVAILING_DEF_IRONLY ++Sym: '_?func' Resolution: LDPR_PREVAILING_.* + Sym: '_?func2' Resolution: LDPR_PREVAILING_DEF_IRONLY +-Sym: '_?text' Resolution: LDPR_PREVAILING_DEF_IRONLY ++Sym: '_?text' Resolution: LDPR_PREVAILING_.* + #... + hook called: cleanup. + #... +diff -rupN --no-dereference binutils-2.40/ld/testsuite/ld-plugin/plugin-8.d binutils-2.40-new/ld/testsuite/ld-plugin/plugin-8.d +--- binutils-2.40/ld/testsuite/ld-plugin/plugin-8.d 2023-03-09 14:51:59.903322756 +0100 ++++ binutils-2.40-new/ld/testsuite/ld-plugin/plugin-8.d 2023-03-09 14:52:07.337233481 +0100 +@@ -30,7 +30,7 @@ hook called: claim_file tmpdir/func.o \[ + hook called: claim_file tmpdir/text.o \[@0/.* not claimed + #... + hook called: all symbols read. +-Sym: '_?func' Resolution: LDPR_PREVAILING_DEF_IRONLY ++Sym: '_?func' Resolution: LDPR_PREVAILING_.* + Sym: '_?func2' Resolution: LDPR_PREVAILING_DEF_IRONLY + #... + hook called: cleanup. +diff -rupN --no-dereference binutils-2.40/ld/testsuite/ld-plugin/plugin-9.d binutils-2.40-new/ld/testsuite/ld-plugin/plugin-9.d +--- binutils-2.40/ld/testsuite/ld-plugin/plugin-9.d 2023-03-09 14:51:59.903322756 +0100 ++++ binutils-2.40-new/ld/testsuite/ld-plugin/plugin-9.d 2023-03-09 14:52:07.337233481 +0100 +@@ -31,7 +31,7 @@ hook called: claim_file tmpdir/func.o \[ + hook called: claim_file tmpdir/text.o \[@0/.* not claimed + #... + hook called: all symbols read. +-Sym: '_?func' Resolution: LDPR_PREVAILING_DEF_IRONLY ++Sym: '_?func' Resolution: LDPR_PREVAILING_.* + Sym: '_?func2' Resolution: LDPR_PREVAILING_DEF_IRONLY + #... + hook called: cleanup. +diff -rupN --no-dereference binutils-2.40/ld/testsuite/ld-plugin/plugin.exp binutils-2.40-new/ld/testsuite/ld-plugin/plugin.exp +--- binutils-2.40/ld/testsuite/ld-plugin/plugin.exp 2023-03-09 14:51:59.903322756 +0100 ++++ binutils-2.40-new/ld/testsuite/ld-plugin/plugin.exp 2023-03-09 14:52:07.342233420 +0100 +@@ -304,6 +304,7 @@ if { !$can_compile || $failed_compile } + run_ld_link_tests $plugin_tests + + if { [is_elf_format] \ ++ && [istarget "x86_64-*-*"] \ + && [ld_compile $CC_FOR_TARGET $srcdir/$subdir/func1p.c tmpdir/func1p.o] \ + && [ld_compile $CC_FOR_TARGET $srcdir/$subdir/func2i.c tmpdir/func2i.o] \ + && [ld_compile $CC_FOR_TARGET $srcdir/$subdir/func3h.c tmpdir/func3h.o] } { +diff -rupN --no-dereference binutils-2.40/ld/testsuite/ld-powerpc/powerpc.exp binutils-2.40-new/ld/testsuite/ld-powerpc/powerpc.exp +--- binutils-2.40/ld/testsuite/ld-powerpc/powerpc.exp 2023-01-14 01:00:00.000000000 +0100 ++++ binutils-2.40-new/ld/testsuite/ld-powerpc/powerpc.exp 2023-03-09 14:52:07.345233383 +0100 +@@ -19,7 +19,7 @@ + # MA 02110-1301, USA. + # + +-if { ![istarget "powerpc*-*-*"] } { ++if { ![istarget "powerpc-*-*"] } { + return + } + +diff -rupN --no-dereference binutils-2.40/ld/testsuite/ld-riscv-elf/attr-phdr.d binutils-2.40-new/ld/testsuite/ld-riscv-elf/attr-phdr.d +--- binutils-2.40/ld/testsuite/ld-riscv-elf/attr-phdr.d 2023-01-14 01:00:00.000000000 +0100 ++++ binutils-2.40-new/ld/testsuite/ld-riscv-elf/attr-phdr.d 2023-03-09 14:52:07.347233358 +0100 +@@ -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 -rupN --no-dereference binutils-2.40/ld/testsuite/ld-riscv-elf/pcgp-relax-01.d binutils-2.40-new/ld/testsuite/ld-riscv-elf/pcgp-relax-01.d +--- binutils-2.40/ld/testsuite/ld-riscv-elf/pcgp-relax-01.d 2023-01-14 01:00:00.000000000 +0100 ++++ binutils-2.40-new/ld/testsuite/ld-riscv-elf/pcgp-relax-01.d 2023-03-09 14:52:07.347233358 +0100 +@@ -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]+ + .*:[ ]+[0-9a-f]+[ ]+addi[ ]+a2,gp,\-[0-9]+ # [0-9a-f]+ +diff -rupN --no-dereference binutils-2.40/ld/testsuite/ld-riscv-elf/pcgp-relax-02.d binutils-2.40-new/ld/testsuite/ld-riscv-elf/pcgp-relax-02.d +--- binutils-2.40/ld/testsuite/ld-riscv-elf/pcgp-relax-02.d 2023-01-14 01:00:00.000000000 +0100 ++++ binutils-2.40-new/ld/testsuite/ld-riscv-elf/pcgp-relax-02.d 2023-03-09 14:52:07.347233358 +0100 +@@ -11,5 +11,5 @@ Disassembly of section .text: + [0-9a-f]+ <_start>: + .*:[ ]+[0-9a-f]+[ ]+auipc[ ]+a1.* + .*:[ ]+[0-9a-f]+[ ]+addi?[ ]+a0,gp.* +-.*:[ ]+[0-9a-f]+[ ]+addi?[ ]+a1,a1.* ++.*:[ ]+[0-9a-f]+[ ]+mv[ ]+a1,a1 + #pass +diff -rupN --no-dereference binutils-2.40/ld/testsuite/ld-riscv-elf/pcrel-lo-addend-2a.d binutils-2.40-new/ld/testsuite/ld-riscv-elf/pcrel-lo-addend-2a.d +--- binutils-2.40/ld/testsuite/ld-riscv-elf/pcrel-lo-addend-2a.d 2023-01-14 01:00:00.000000000 +0100 ++++ binutils-2.40-new/ld/testsuite/ld-riscv-elf/pcrel-lo-addend-2a.d 2023-03-09 14:52:07.347233358 +0100 +@@ -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 -rupN --no-dereference binutils-2.40/ld/testsuite/ld-riscv-elf/variant_cc-now.d binutils-2.40-new/ld/testsuite/ld-riscv-elf/variant_cc-now.d +--- binutils-2.40/ld/testsuite/ld-riscv-elf/variant_cc-now.d 2023-01-14 01:00:00.000000000 +0100 ++++ binutils-2.40-new/ld/testsuite/ld-riscv-elf/variant_cc-now.d 2023-03-09 14:52:07.347233358 +0100 +@@ -22,52 +22,52 @@ Symbol table '.dynsym' contains .* + #... + [ ]+[0-9a-f]+:[ ]+0+0000[ ]+0[ ]+NOTYPE[ ]+GLOBAL[ ]+DEFAULT[ ]+UND[ ]+nocc_global_default_undef + #... +-[ ]+[0-9a-f]+:[ ]+0+0000[ ]+0[ ]+NOTYPE[ ]+GLOBAL[ ]+DEFAULT[ ]+\[VARIANT_CC\][ ]+UND[ ]+cc_global_default_undef ++[ ]+[0-9a-f]+:[ ]+0+0000[ ]+0[ ]+NOTYPE[ ]+GLOBAL[ ]+DEFAULT[ ]+UND[ ]+cc_global_default_undef[ ]+\[VARIANT_CC\] + #... +-[ ]+[0-9a-f]+:[ ]+0+8000[ ]+0[ ]+IFUNC[ ]+GLOBAL[ ]+DEFAULT[ ]+\[VARIANT_CC\][ ]+1[ ]+cc_global_default_ifunc ++[ ]+[0-9a-f]+:[ ]+0+8000[ ]+0[ ]+IFUNC[ ]+GLOBAL[ ]+DEFAULT[ ]+1[ ]+cc_global_default_ifunc[ ]+\[VARIANT_CC\] + #... + [ ]+[0-9a-f]+:[ ]+0+8000[ ]+0[ ]+IFUNC[ ]+GLOBAL[ ]+DEFAULT[ ]+1[ ]+nocc_global_default_ifunc + #... +-[ ]+[0-9a-f]+:[ ]+0+8000[ ]+0[ ]+NOTYPE[ ]+GLOBAL[ ]+DEFAULT[ ]+\[VARIANT_CC\][ ]+1[ ]+cc_global_default_def ++[ ]+[0-9a-f]+:[ ]+0+8000[ ]+0[ ]+NOTYPE[ ]+GLOBAL[ ]+DEFAULT[ ]+1[ ]+cc_global_default_def[ ]+\[VARIANT_CC\] + #... + [ ]+[0-9a-f]+:[ ]+0+8000[ ]+0[ ]+NOTYPE[ ]+GLOBAL[ ]+DEFAULT[ ]+1[ ]+nocc_global_default_def + #... + Symbol table '.symtab' contains .* + .* + #... +-[ ]+[0-9a-f]+:[ ]+0+8000[ ]+0[ ]+NOTYPE[ ]+LOCAL[ ]+DEFAULT[ ]+\[VARIANT_CC\][ ]+1[ ]+cc_local ++[ ]+[0-9a-f]+:[ ]+0+8000[ ]+0[ ]+NOTYPE[ ]+LOCAL[ ]+DEFAULT[ ]+1[ ]+cc_local[ ]+\[VARIANT_CC\] + #... +-[ ]+[0-9a-f]+:[ ]+0+8000[ ]+0[ ]+IFUNC[ ]+LOCAL[ ]+DEFAULT[ ]+\[VARIANT_CC\][ ]+1[ ]+cc_local_ifunc ++[ ]+[0-9a-f]+:[ ]+0+8000[ ]+0[ ]+IFUNC[ ]+LOCAL[ ]+DEFAULT[ ]+1[ ]+cc_local_ifunc[ ]+\[VARIANT_CC\] + #... + [ ]+[0-9a-f]+:[ ]+0+8000[ ]+0[ ]+IFUNC[ ]+LOCAL[ ]+DEFAULT[ ]+1[ ]+nocc_local_ifunc + #... + [ ]+[0-9a-f]+:[ ]+0+8000[ ]+0[ ]+NOTYPE[ ]+LOCAL[ ]+DEFAULT[ ]+1[ ]+nocc_local + #... +-[ ]+[0-9a-f]+:[ ]+0+8050[ ]+0[ ]+NOTYPE[ ]+LOCAL[ ]+DEFAULT[ ]+\[VARIANT_CC\][ ]+1[ ]+cc_local2 ++[ ]+[0-9a-f]+:[ ]+0+8050[ ]+0[ ]+NOTYPE[ ]+LOCAL[ ]+DEFAULT[ ]+1[ ]+cc_local2[ ]+\[VARIANT_CC\] + #... +-[ ]+[0-9a-f]+:[ ]+0+8050[ ]+0[ ]+IFUNC[ ]+LOCAL[ ]+DEFAULT[ ]+\[VARIANT_CC\][ ]+1[ ]+cc_local2_ifunc ++[ ]+[0-9a-f]+:[ ]+0+8050[ ]+0[ ]+IFUNC[ ]+LOCAL[ ]+DEFAULT[ ]+1[ ]+cc_local2_ifunc[ ]+\[VARIANT_CC\] + #... + [ ]+[0-9a-f]+:[ ]+0+8050[ ]+0[ ]+IFUNC[ ]+LOCAL[ ]+DEFAULT[ ]+1[ ]+nocc_local2_ifunc + #... + [ ]+[0-9a-f]+:[ ]+0+8050[ ]+0[ ]+NOTYPE[ ]+LOCAL[ ]+DEFAULT[ ]+1[ ]+nocc_local2 + #... +-[ ]+[0-9a-f]+:[ ]+0+8000[ ]+0[ ]+NOTYPE[ ]+LOCAL[ ]+DEFAULT[ ]+\[VARIANT_CC\][ ]+1[ ]+cc_global_hidden_def ++[ ]+[0-9a-f]+:[ ]+0+8000[ ]+0[ ]+NOTYPE[ ]+LOCAL[ ]+DEFAULT[ ]+1[ ]+cc_global_hidden_def[ ]+\[VARIANT_CC\] + #... + [ ]+[0-9a-f]+:[ ]+0+8000[ ]+0[ ]+NOTYPE[ ]+LOCAL[ ]+DEFAULT[ ]+1[ ]+nocc_global_hidden_def + #... + [ ]+[0-9a-f]+:[ ]+0+8000[ ]+0[ ]+IFUNC[ ]+LOCAL[ ]+DEFAULT[ ]+1[ ]+nocc_global_hidden_ifunc + #... +-[ ]+[0-9a-f]+:[ ]+0+8000[ ]+0[ ]+IFUNC[ ]+LOCAL[ ]+DEFAULT[ ]+\[VARIANT_CC\][ ]+1[ ]+cc_global_hidden_ifunc ++[ ]+[0-9a-f]+:[ ]+0+8000[ ]+0[ ]+IFUNC[ ]+LOCAL[ ]+DEFAULT[ ]+1[ ]+cc_global_hidden_ifunc[ ]+\[VARIANT_CC\] + #... + [ ]+[0-9a-f]+:[ ]+0+0000[ ]+0[ ]+NOTYPE[ ]+GLOBAL[ ]+DEFAULT[ ]+UND[ ]+nocc_global_default_undef + #... +-[ ]+[0-9a-f]+:[ ]+0+0000[ ]+0[ ]+NOTYPE[ ]+GLOBAL[ ]+DEFAULT[ ]+\[VARIANT_CC\][ ]+UND[ ]+cc_global_default_undef ++[ ]+[0-9a-f]+:[ ]+0+0000[ ]+0[ ]+NOTYPE[ ]+GLOBAL[ ]+DEFAULT[ ]+UND[ ]+cc_global_default_undef[ ]+\[VARIANT_CC\] + #... +-[ ]+[0-9a-f]+:[ ]+0+8000[ ]+0[ ]+IFUNC[ ]+GLOBAL[ ]+DEFAULT[ ]+\[VARIANT_CC\][ ]+1[ ]+cc_global_default_ifunc ++[ ]+[0-9a-f]+:[ ]+0+8000[ ]+0[ ]+IFUNC[ ]+GLOBAL[ ]+DEFAULT[ ]+1[ ]+cc_global_default_ifunc[ ]+\[VARIANT_CC\] + #... + [ ]+[0-9a-f]+:[ ]+0+8000[ ]+0[ ]+IFUNC[ ]+GLOBAL[ ]+DEFAULT[ ]+1[ ]+nocc_global_default_ifunc + #... +-[ ]+[0-9a-f]+:[ ]+0+8000[ ]+0[ ]+NOTYPE[ ]+GLOBAL[ ]+DEFAULT[ ]+\[VARIANT_CC\][ ]+1[ ]+cc_global_default_def ++[ ]+[0-9a-f]+:[ ]+0+8000[ ]+0[ ]+NOTYPE[ ]+GLOBAL[ ]+DEFAULT[ ]+1[ ]+cc_global_default_def[ ]+\[VARIANT_CC\] + #... + [ ]+[0-9a-f]+:[ ]+0+8000[ ]+0[ ]+NOTYPE[ ]+GLOBAL[ ]+DEFAULT[ ]+1[ ]+nocc_global_default_def + #... +diff -rupN --no-dereference binutils-2.40/ld/testsuite/ld-riscv-elf/variant_cc-r.d binutils-2.40-new/ld/testsuite/ld-riscv-elf/variant_cc-r.d +--- binutils-2.40/ld/testsuite/ld-riscv-elf/variant_cc-r.d 2023-01-14 01:00:00.000000000 +0100 ++++ binutils-2.40-new/ld/testsuite/ld-riscv-elf/variant_cc-r.d 2023-03-09 14:52:07.348233346 +0100 +@@ -38,17 +38,17 @@ Relocation section '.rela.text' at .* + Symbol table '.symtab' contains .* + .* + #... +-[ ]+[0-9a-f]+:[ ]+0+0000[ ]+0[ ]+NOTYPE[ ]+LOCAL[ ]+DEFAULT[ ]+\[VARIANT_CC\][ ]+1[ ]+cc_local ++[ ]+[0-9a-f]+:[ ]+0+0000[ ]+0[ ]+NOTYPE[ ]+LOCAL[ ]+DEFAULT[ ]+1[ ]+cc_local[ ]+\[VARIANT_CC\] + #... +-[ ]+[0-9a-f]+:[ ]+0+0000[ ]+0[ ]+IFUNC[ ]+LOCAL[ ]+DEFAULT[ ]+\[VARIANT_CC\][ ]+1[ ]+cc_local_ifunc ++[ ]+[0-9a-f]+:[ ]+0+0000[ ]+0[ ]+IFUNC[ ]+LOCAL[ ]+DEFAULT[ ]+1[ ]+cc_local_ifunc[ ]+\[VARIANT_CC\] + #... + [ ]+[0-9a-f]+:[ ]+0+0000[ ]+0[ ]+IFUNC[ ]+LOCAL[ ]+DEFAULT[ ]+1[ ]+nocc_local_ifunc + #... + [ ]+[0-9a-f]+:[ ]+0+0000[ ]+0[ ]+NOTYPE[ ]+LOCAL[ ]+DEFAULT[ ]+1[ ]+nocc_local + #... +-[ ]+[0-9a-f]+:[ ]+0+0070[ ]+0[ ]+NOTYPE[ ]+LOCAL[ ]+DEFAULT[ ]+\[VARIANT_CC\][ ]+1[ ]+cc_local2 ++[ ]+[0-9a-f]+:[ ]+0+0070[ ]+0[ ]+NOTYPE[ ]+LOCAL[ ]+DEFAULT[ ]+1[ ]+cc_local2[ ]+\[VARIANT_CC\] + #... +-[ ]+[0-9a-f]+:[ ]+0+0070[ ]+0[ ]+IFUNC[ ]+LOCAL[ ]+DEFAULT[ ]+\[VARIANT_CC\][ ]+1[ ]+cc_local2_ifunc ++[ ]+[0-9a-f]+:[ ]+0+0070[ ]+0[ ]+IFUNC[ ]+LOCAL[ ]+DEFAULT[ ]+1[ ]+cc_local2_ifunc[ ]+\[VARIANT_CC\] + #... + [ ]+[0-9a-f]+:[ ]+0+0070[ ]+0[ ]+IFUNC[ ]+LOCAL[ ]+DEFAULT[ ]+1[ ]+nocc_local2_ifunc + #... +@@ -56,11 +56,11 @@ Symbol table '.symtab' contains .* + #... + [ ]+[0-9a-f]+:[ ]+0+0000[ ]+0[ ]+NOTYPE[ ]+GLOBAL[ ]+DEFAULT[ ]+UND[ ]+nocc_global_default_undef + #... +-[ ]+[0-9a-f]+:[ ]+0+0000[ ]+0[ ]+NOTYPE[ ]+GLOBAL[ ]+HIDDEN[ ]+\[VARIANT_CC\][ ]+1[ ]+cc_global_hidden_def ++[ ]+[0-9a-f]+:[ ]+0+0000[ ]+0[ ]+NOTYPE[ ]+GLOBAL[ ]+HIDDEN[ ]+1[ ]+cc_global_hidden_def[ ]+\[VARIANT_CC\] + #... +-[ ]+[0-9a-f]+:[ ]+0+0000[ ]+0[ ]+NOTYPE[ ]+GLOBAL[ ]+DEFAULT[ ]+\[VARIANT_CC\][ ]+UND[ ]+cc_global_default_undef ++[ ]+[0-9a-f]+:[ ]+0+0000[ ]+0[ ]+NOTYPE[ ]+GLOBAL[ ]+DEFAULT[ ]+UND[ ]+cc_global_default_undef[ ]+\[VARIANT_CC\] + #... +-[ ]+[0-9a-f]+:[ ]+0+0000[ ]+0[ ]+IFUNC[ ]+GLOBAL[ ]+DEFAULT[ ]+\[VARIANT_CC\][ ]+1[ ]+cc_global_default_ifunc ++[ ]+[0-9a-f]+:[ ]+0+0000[ ]+0[ ]+IFUNC[ ]+GLOBAL[ ]+DEFAULT[ ]+1[ ]+cc_global_default_ifunc[ ]+\[VARIANT_CC\] + #... + [ ]+[0-9a-f]+:[ ]+0+0000[ ]+0[ ]+NOTYPE[ ]+GLOBAL[ ]+HIDDEN[ ]+1[ ]+nocc_global_hidden_def + #... +@@ -68,9 +68,9 @@ Symbol table '.symtab' contains .* + #... + [ ]+[0-9a-f]+:[ ]+0+0000[ ]+0[ ]+IFUNC[ ]+GLOBAL[ ]+DEFAULT[ ]+1[ ]+nocc_global_default_ifunc + #... +-[ ]+[0-9a-f]+:[ ]+0+0000[ ]+0[ ]+NOTYPE[ ]+GLOBAL[ ]+DEFAULT[ ]+\[VARIANT_CC\][ ]+1[ ]+cc_global_default_def ++[ ]+[0-9a-f]+:[ ]+0+0000[ ]+0[ ]+NOTYPE[ ]+GLOBAL[ ]+DEFAULT[ ]+1[ ]+cc_global_default_def[ ]+\[VARIANT_CC\] + #... + [ ]+[0-9a-f]+:[ ]+0+0000[ ]+0[ ]+NOTYPE[ ]+GLOBAL[ ]+DEFAULT[ ]+1[ ]+nocc_global_default_def + #... +-[ ]+[0-9a-f]+:[ ]+0+0000[ ]+0[ ]+IFUNC[ ]+GLOBAL[ ]+HIDDEN[ ]+\[VARIANT_CC\][ ]+1[ ]+cc_global_hidden_ifunc ++[ ]+[0-9a-f]+:[ ]+0+0000[ ]+0[ ]+IFUNC[ ]+GLOBAL[ ]+HIDDEN[ ]+1[ ]+cc_global_hidden_ifunc[ ]+\[VARIANT_CC\] + #... +diff -rupN --no-dereference binutils-2.40/ld/testsuite/ld-riscv-elf/variant_cc-shared.d binutils-2.40-new/ld/testsuite/ld-riscv-elf/variant_cc-shared.d +--- binutils-2.40/ld/testsuite/ld-riscv-elf/variant_cc-shared.d 2023-01-14 01:00:00.000000000 +0100 ++++ binutils-2.40-new/ld/testsuite/ld-riscv-elf/variant_cc-shared.d 2023-03-09 14:52:07.348233346 +0100 +@@ -22,52 +22,52 @@ Symbol table '.dynsym' contains .* + #... + [ ]+[0-9a-f]+:[ ]+0+0000[ ]+0[ ]+NOTYPE[ ]+GLOBAL[ ]+DEFAULT[ ]+UND[ ]+nocc_global_default_undef + #... +-[ ]+[0-9a-f]+:[ ]+0+0000[ ]+0[ ]+NOTYPE[ ]+GLOBAL[ ]+DEFAULT[ ]+\[VARIANT_CC\][ ]+UND[ ]+cc_global_default_undef ++[ ]+[0-9a-f]+:[ ]+0+0000[ ]+0[ ]+NOTYPE[ ]+GLOBAL[ ]+DEFAULT[ ]+UND[ ]+cc_global_default_undef[ ]+\[VARIANT_CC\] + #... +-[ ]+[0-9a-f]+:[ ]+0+8000[ ]+0[ ]+IFUNC[ ]+GLOBAL[ ]+DEFAULT[ ]+\[VARIANT_CC\][ ]+1[ ]+cc_global_default_ifunc ++[ ]+[0-9a-f]+:[ ]+0+8000[ ]+0[ ]+IFUNC[ ]+GLOBAL[ ]+DEFAULT[ ]+1[ ]+cc_global_default_ifunc[ ]+\[VARIANT_CC\] + #... + [ ]+[0-9a-f]+:[ ]+0+8000[ ]+0[ ]+IFUNC[ ]+GLOBAL[ ]+DEFAULT[ ]+1[ ]+nocc_global_default_ifunc + #... +-[ ]+[0-9a-f]+:[ ]+0+8000[ ]+0[ ]+NOTYPE[ ]+GLOBAL[ ]+DEFAULT[ ]+\[VARIANT_CC\][ ]+1[ ]+cc_global_default_def ++[ ]+[0-9a-f]+:[ ]+0+8000[ ]+0[ ]+NOTYPE[ ]+GLOBAL[ ]+DEFAULT[ ]+1[ ]+cc_global_default_def[ ]+\[VARIANT_CC\] + #... + [ ]+[0-9a-f]+:[ ]+0+8000[ ]+0[ ]+NOTYPE[ ]+GLOBAL[ ]+DEFAULT[ ]+1[ ]+nocc_global_default_def + #... + Symbol table '.symtab' contains .* + .* + #... +-[ ]+[0-9a-f]+:[ ]+0+8000[ ]+0[ ]+NOTYPE[ ]+LOCAL[ ]+DEFAULT[ ]+\[VARIANT_CC\][ ]+1[ ]+cc_local ++[ ]+[0-9a-f]+:[ ]+0+8000[ ]+0[ ]+NOTYPE[ ]+LOCAL[ ]+DEFAULT[ ]+1[ ]+cc_local[ ]+\[VARIANT_CC\] + #... +-[ ]+[0-9a-f]+:[ ]+0+8000[ ]+0[ ]+IFUNC[ ]+LOCAL[ ]+DEFAULT[ ]+\[VARIANT_CC\][ ]+1[ ]+cc_local_ifunc ++[ ]+[0-9a-f]+:[ ]+0+8000[ ]+0[ ]+IFUNC[ ]+LOCAL[ ]+DEFAULT[ ]+1[ ]+cc_local_ifunc[ ]+\[VARIANT_CC\] + #... + [ ]+[0-9a-f]+:[ ]+0+8000[ ]+0[ ]+IFUNC[ ]+LOCAL[ ]+DEFAULT[ ]+1[ ]+nocc_local_ifunc + #... + [ ]+[0-9a-f]+:[ ]+0+8000[ ]+0[ ]+NOTYPE[ ]+LOCAL[ ]+DEFAULT[ ]+1[ ]+nocc_local + #... +-[ ]+[0-9a-f]+:[ ]+0+8050[ ]+0[ ]+NOTYPE[ ]+LOCAL[ ]+DEFAULT[ ]+\[VARIANT_CC\][ ]+1[ ]+cc_local2 ++[ ]+[0-9a-f]+:[ ]+0+8050[ ]+0[ ]+NOTYPE[ ]+LOCAL[ ]+DEFAULT[ ]+1[ ]+cc_local2[ ]+\[VARIANT_CC\] + #... +-[ ]+[0-9a-f]+:[ ]+0+8050[ ]+0[ ]+IFUNC[ ]+LOCAL[ ]+DEFAULT[ ]+\[VARIANT_CC\][ ]+1[ ]+cc_local2_ifunc ++[ ]+[0-9a-f]+:[ ]+0+8050[ ]+0[ ]+IFUNC[ ]+LOCAL[ ]+DEFAULT[ ]+1[ ]+cc_local2_ifunc[ ]+\[VARIANT_CC\] + #... + [ ]+[0-9a-f]+:[ ]+0+8050[ ]+0[ ]+IFUNC[ ]+LOCAL[ ]+DEFAULT[ ]+1[ ]+nocc_local2_ifunc + #... + [ ]+[0-9a-f]+:[ ]+0+8050[ ]+0[ ]+NOTYPE[ ]+LOCAL[ ]+DEFAULT[ ]+1[ ]+nocc_local2 + #... +-[ ]+[0-9a-f]+:[ ]+0+8000[ ]+0[ ]+NOTYPE[ ]+LOCAL[ ]+DEFAULT[ ]+\[VARIANT_CC\][ ]+1[ ]+cc_global_hidden_def ++[ ]+[0-9a-f]+:[ ]+0+8000[ ]+0[ ]+NOTYPE[ ]+LOCAL[ ]+DEFAULT[ ]+1[ ]+cc_global_hidden_def[ ]+\[VARIANT_CC\] + #... + [ ]+[0-9a-f]+:[ ]+0+8000[ ]+0[ ]+NOTYPE[ ]+LOCAL[ ]+DEFAULT[ ]+1[ ]+nocc_global_hidden_def + #... + [ ]+[0-9a-f]+:[ ]+0+8000[ ]+0[ ]+IFUNC[ ]+LOCAL[ ]+DEFAULT[ ]+1[ ]+nocc_global_hidden_ifunc + #... +-[ ]+[0-9a-f]+:[ ]+0+8000[ ]+0[ ]+IFUNC[ ]+LOCAL[ ]+DEFAULT[ ]+\[VARIANT_CC\][ ]+1[ ]+cc_global_hidden_ifunc ++[ ]+[0-9a-f]+:[ ]+0+8000[ ]+0[ ]+IFUNC[ ]+LOCAL[ ]+DEFAULT[ ]+1[ ]+cc_global_hidden_ifunc[ ]+\[VARIANT_CC\] + #... + [ ]+[0-9a-f]+:[ ]+0+0000[ ]+0[ ]+NOTYPE[ ]+GLOBAL[ ]+DEFAULT[ ]+UND[ ]+nocc_global_default_undef + #... +-[ ]+[0-9a-f]+:[ ]+0+0000[ ]+0[ ]+NOTYPE[ ]+GLOBAL[ ]+DEFAULT[ ]+\[VARIANT_CC\][ ]+UND[ ]+cc_global_default_undef ++[ ]+[0-9a-f]+:[ ]+0+0000[ ]+0[ ]+NOTYPE[ ]+GLOBAL[ ]+DEFAULT[ ]+UND[ ]+cc_global_default_undef[ ]+\[VARIANT_CC\] + #... +-[ ]+[0-9a-f]+:[ ]+0+8000[ ]+0[ ]+IFUNC[ ]+GLOBAL[ ]+DEFAULT[ ]+\[VARIANT_CC\][ ]+1[ ]+cc_global_default_ifunc ++[ ]+[0-9a-f]+:[ ]+0+8000[ ]+0[ ]+IFUNC[ ]+GLOBAL[ ]+DEFAULT[ ]+1[ ]+cc_global_default_ifunc[ ]+\[VARIANT_CC\] + #... + [ ]+[0-9a-f]+:[ ]+0+8000[ ]+0[ ]+IFUNC[ ]+GLOBAL[ ]+DEFAULT[ ]+1[ ]+nocc_global_default_ifunc + #... +-[ ]+[0-9a-f]+:[ ]+0+8000[ ]+0[ ]+NOTYPE[ ]+GLOBAL[ ]+DEFAULT[ ]+\[VARIANT_CC\][ ]+1[ ]+cc_global_default_def ++[ ]+[0-9a-f]+:[ ]+0+8000[ ]+0[ ]+NOTYPE[ ]+GLOBAL[ ]+DEFAULT[ ]+1[ ]+cc_global_default_def[ ]+\[VARIANT_CC\] + #... + [ ]+[0-9a-f]+:[ ]+0+8000[ ]+0[ ]+NOTYPE[ ]+GLOBAL[ ]+DEFAULT[ ]+1[ ]+nocc_global_default_def + #... +diff -rupN --no-dereference binutils-2.40/ld/testsuite/ld-s390/s390.exp binutils-2.40-new/ld/testsuite/ld-s390/s390.exp +--- binutils-2.40/ld/testsuite/ld-s390/s390.exp 2023-01-14 01:00:00.000000000 +0100 ++++ binutils-2.40-new/ld/testsuite/ld-s390/s390.exp 2023-03-09 14:52:07.345233383 +0100 +@@ -25,6 +25,7 @@ + if { !([istarget "s390-*-*"] || [istarget "s390x-*-*"]) } { + return + } ++return + + # List contains test-items with 3 items followed by 2 lists: + # 0:name 1:ld early options 2:ld late options 3:assembler options +diff -rupN --no-dereference binutils-2.40/ld/testsuite/ld-scripts/crossref.exp binutils-2.40-new/ld/testsuite/ld-scripts/crossref.exp +--- binutils-2.40/ld/testsuite/ld-scripts/crossref.exp 2023-01-14 01:00:00.000000000 +0100 ++++ binutils-2.40-new/ld/testsuite/ld-scripts/crossref.exp 2023-03-09 14:52:07.345233383 +0100 +@@ -122,6 +122,7 @@ if [string match "" $exec_output] then { + } + + # Check cross references for ld -r ++return + + if { ![ld_compile "$CC_FOR_TARGET $NOSANITIZE_CFLAGS $NOLTO_CFLAGS" "$srcdir/$subdir/cross4.c" tmpdir/cross4.o] } { + unsupported $test3 +diff -rupN --no-dereference binutils-2.40/ld/testsuite/ld-shared/shared.exp binutils-2.40-new/ld/testsuite/ld-shared/shared.exp +--- binutils-2.40/ld/testsuite/ld-shared/shared.exp 2023-01-14 01:00:00.000000000 +0100 ++++ binutils-2.40-new/ld/testsuite/ld-shared/shared.exp 2023-03-09 14:52:07.346233370 +0100 +@@ -42,8 +42,6 @@ if { ![istarget hppa*64*-*-hpux*] \ + && ![istarget i?86-*-sysv4*] \ + && ![istarget i?86-*-unixware] \ + && ![istarget i?86-*-elf*] \ +- && ![istarget i?86-*-linux*] \ +- && ![istarget i?86-*-gnu*] \ + && ![istarget *-*-nacl*] \ + && ![istarget ia64-*-elf*] \ + && ![istarget ia64-*-linux*] \ +diff -rupN --no-dereference binutils-2.40/ld/testsuite/ld-vsb/vsb.exp binutils-2.40-new/ld/testsuite/ld-vsb/vsb.exp +--- binutils-2.40/ld/testsuite/ld-vsb/vsb.exp 2023-01-14 01:00:00.000000000 +0100 ++++ binutils-2.40-new/ld/testsuite/ld-vsb/vsb.exp 2023-03-09 14:52:07.346233370 +0100 +@@ -34,8 +34,6 @@ if { ![check_compiler_available] } { + # Square bracket expressions seem to confuse istarget. + if { ![istarget hppa*64*-*-hpux*] \ + && ![istarget hppa*-*-linux*] \ +- && ![istarget i?86-*-linux*] \ +- && ![istarget i?86-*-gnu*] \ + && ![istarget *-*-nacl*] \ + && ![istarget ia64-*-linux*] \ + && ![istarget m68k-*-linux*] \ +diff -rupN --no-dereference binutils-2.40/ld/testsuite/ld-x86-64/x86-64.exp binutils-2.40-new/ld/testsuite/ld-x86-64/x86-64.exp +--- binutils-2.40/ld/testsuite/ld-x86-64/x86-64.exp 2023-01-14 01:00:00.000000000 +0100 ++++ binutils-2.40-new/ld/testsuite/ld-x86-64/x86-64.exp 2023-03-09 14:52:07.337233481 +0100 +@@ -786,6 +786,8 @@ proc undefined_weak {cflags ldflags} { + } + } + ++return ++ + # Must be native with the C compiler + if { [isnative] && [check_compiler_available] } { + run_cc_link_tests [list \ diff --git a/SOURCES/binutils-version.patch b/SOURCES/binutils-version.patch new file mode 100644 index 0000000..4674f68 --- /dev/null +++ b/SOURCES/binutils-version.patch @@ -0,0 +1,46 @@ +diff -rupN --no-dereference binutils-2.40/bfd/Makefile.am binutils-2.40-new/bfd/Makefile.am +--- binutils-2.40/bfd/Makefile.am 2023-01-14 01:00:00.000000000 +0100 ++++ binutils-2.40-new/bfd/Makefile.am 2023-03-09 14:51:47.525462680 +0100 +@@ -988,8 +988,8 @@ DISTCLEANFILES += $(BUILD_CFILES) $(BUIL + 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 ;\ +@@ -1000,7 +1000,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 -rupN --no-dereference binutils-2.40/bfd/Makefile.in binutils-2.40-new/bfd/Makefile.in +--- binutils-2.40/bfd/Makefile.in 2023-01-14 01:00:00.000000000 +0100 ++++ binutils-2.40-new/bfd/Makefile.in 2023-03-09 14:51:47.526462669 +0100 +@@ -2470,8 +2470,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 ;\ +@@ -2482,7 +2482,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 --git a/SPECS/mingw-binutils.spec b/SPECS/mingw-binutils.spec new file mode 100644 index 0000000..9eede1a --- /dev/null +++ b/SPECS/mingw-binutils.spec @@ -0,0 +1,760 @@ +%global run_testsuite 1 +%global mingw_build_ucrt64 1 +%define enable_new_dtags 0 + +Name: mingw-binutils +Version: 2.40 +Release: 3%{?dist} +Summary: Cross-compiled version of binutils for Win32 and Win64 environments + +License: GPLv2+ and LGPLv2+ and GPLv3+ and LGPLv3+ + +URL: http://www.gnu.org/software/binutils/ +Source0: http://ftp.gnu.org/gnu/binutils/binutils-%{version}.tar.xz + +### 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: Include the filename concerned in readelf error and warning +# messages. This helps when readelf is run with multiple +# input files or when multiple instances of readelf are +# running at the same time. +# 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 output format. cf/ Patch07. +# It also tends to break parts of the binutils own +# testsuite. Hence the patch remains local for now. +Patch05: binutils-filename-in-readelf-messages.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. +Patch06: binutils-revert-PLT-elision.patch + +# Purpose: Changes readelf so that when it displays extra information about +# a symbol, this information is placed at the end of the line. +# Lifetime: Permanent. cf/ Patch05. +# FIXME: The proper fix would be to update the scripts that are expecting +# a fixed output from readelf. But it seems that some of them are +# no longer being maintained. +Patch07: binutils-readelf-other-sym-info.patch + +# Purpose: Do not create PLT entries for AARCH64 IFUNC symbols referenced in +# debug sections. +# Lifetime: Permanent. +# FIXME: Find related bug. Decide on permanency. +Patch08: binutils-2.27-aarch64-ifunc.patch + +# Purpose: Stop the binutils from statically linking with libstdc++. +# Lifetime: Permanent. +Patch09: binutils-do-not-link-with-static-libstdc++.patch + +# Purpose: Allow OS specific sections in section groups. +# Lifetime: Fixed in 2.39 (maybe) +Patch10: binutils-special-sections-in-groups.patch + +# Purpose: Fix linker testsuite failures. +# Lifetime: Fixed in 2.39 (maybe) +Patch11: binutils-fix-testsuite-failures.patch + +# Purpose: Stop gold from aborting when input sections with the same name +# have different flags. +# Lifetime: Fixed in 2.39 (maybe) +Patch12: 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. +Patch13: binutils-gold-warn-unsupported.patch + +# Purpose: Enable the creation of .note.gnu.property sections by the GOLD +# linker for x86 binaries. +# Lifetime: Permanent. +Patch14: binutils-gold-i386-gnu-property-notes.patch + +# Purpose: Allow the binutils to be configured with any (recent) version of +# autoconf. +# Lifetime: Fixed in 2.39 (maybe ?) +Patch15: binutils-autoconf-version.patch + +# Purpose: Stop libtool from inserting useless runpaths into binaries. +# Lifetime: Who knows. +Patch16: binutils-libtool-no-rpath.patch + +%if %{enable_new_dtags} +# Purpose: Change ld man page so that it says that --enable-new-dtags is the default. +# Lifetime: Permanent +Patch17: binutils-update-linker-manual.patch +%endif + +# Purpose: Speed up objcopy's note merging algorithm. +# Lifetime: Fixed in 2.41 +Patch18: binutils-objcopy-note-merge-speedup.patch + +# # Purpose: Fix testsuite failures due to the patches applied here. +# # Lifetime: Permanent, but varying with each new rebase. +Patch19: binutils-testsuite-fixes.patch + +# Backport fix for CVE-2023-1972 +# https://sourceware.org/git/?p=binutils-gdb.git;a=commit;h=c22d38baefc5a7a1e1f5cdc9dbb556b1f0ec5c57 +Patch20: CVE-2023-1972.patch + +# Backport fix for https://sourceware.org/bugzilla/show_bug.cgi?id=30079 +# https://sourceware.org/git/?p=binutils-gdb.git;a=patch;h=b7eab2a9d4f4e92692daf14b09fc95ca11b72e30 +Patch21: binutils-gdb.git-b7eab2a9d4f4e92692daf14b09fc95ca11b72e30.patch + +BuildRequires: make +BuildRequires: gcc +BuildRequires: flex +BuildRequires: bison +BuildRequires: texinfo +BuildRequires: zlib-devel +BuildRequires: mingw32-filesystem >= 133 +BuildRequires: mingw64-filesystem >= 133 +BuildRequires: ucrt64-filesystem >= 133 +%if %{run_testsuite} +BuildRequires: dejagnu +BuildRequires: sharutils +%endif +Provides: bundled(libiberty) + + +%description +Cross compiled binutils (utilities like 'strip', 'as', 'ld') which +understand Windows executables and DLLs. + +%package -n mingw-binutils-generic +Summary: Utilities which are needed for both the Win32 and Win64 toolchains + +%description -n mingw-binutils-generic +Utilities (like strip and objdump) which are needed for +both the Win32 and Win64 toolchains + +%package -n mingw32-binutils +Summary: Cross-compiled version of binutils for the Win32 environment +Requires: mingw-binutils-generic = %{version}-%{release} + +# NB: This must be left in. +Requires: mingw32-filesystem >= 95 + +%description -n mingw32-binutils +Cross compiled binutils (utilities like 'strip', 'as', 'ld') which +understand Windows executables and DLLs. + +%package -n mingw64-binutils +Summary: Cross-compiled version of binutils for the Win64 environment +Requires: mingw-binutils-generic = %{version}-%{release} + +# NB: This must be left in. +Requires: mingw64-filesystem >= 95 + +%description -n mingw64-binutils +Cross compiled binutils (utilities like 'strip', 'as', 'ld') which +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 +%autosetup -p1 -n binutils-%{version} + +# See Patch02 +sed -i -e 's/%''{release}/%{release}/g' bfd/Makefile{.am,.in} + + +%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 +pushd build_win32 +CFLAGS="%{optflags}" \ +../configure \ + --build=%_build --host=%_host \ + --target=%{mingw32_target} \ + --disable-nls \ + --with-sysroot=%{mingw32_sysroot} \ + --prefix=%{_prefix} \ + --bindir=%{_bindir} \ + --includedir=%{_includedir} \ + --libdir=%{_libdir} \ + --mandir=%{_mandir} \ + --infodir=%{_infodir} + +%make_build +popd + +mkdir build_win64 +pushd build_win64 +CFLAGS="%{optflags}" \ +../configure \ + --build=%_build --host=%_host \ + --target=%{mingw64_target} \ + --disable-nls \ + --with-sysroot=%{mingw64_sysroot} \ + --prefix=%{_prefix} \ + --bindir=%{_bindir} \ + --includedir=%{_includedir} \ + --libdir=%{_libdir} \ + --mandir=%{_mandir} \ + --infodir=%{_infodir} + +%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 + +# Create multilib versions for the tools strip, objdump nm, and objcopy +mkdir build_multilib +pushd build_multilib +CFLAGS="%{optflags}" \ +../configure \ + --build=%_build --host=%_host \ + --target=%{mingw64_target} \ + --enable-targets=%{mingw64_target},%{mingw32_target},%{ucrt64_target} \ + --disable-nls \ + --with-sysroot=%{mingw64_sysroot} \ + --prefix=%{_prefix} \ + --bindir=%{_bindir} \ + --includedir=%{_includedir} \ + --libdir=%{_libdir} \ + --mandir=%{_mandir} \ + --infodir=%{_infodir} + +%make_build +popd + + +%check +%if !%{run_testsuite} +echo ====================TESTSUITE DISABLED========================= +%else +pushd build_win32 + make -k check < /dev/null || : + echo ====================TESTING WIN32 ========================= + cat {gas/testsuite/gas,ld/ld,binutils/binutils}.sum + echo ====================TESTING WIN32 END===================== + for file in {gas/testsuite/gas,ld/ld,binutils/binutils}.{sum,log} + do + ln $file binutils-%{mingw32_target}-$(basename $file) || : + done + tar cjf binutils-%{mingw32_target}.tar.bz2 binutils-%{mingw32_target}-*.{sum,log} + uuencode binutils-%{mingw32_target}.tar.bz2 binutils-%{mingw32_target}.tar.bz2 + rm -f binutils-%{mingw32_target}.tar.bz2 binutils-%{mingw32_target}-*.{sum,log} +popd + +pushd build_win64 + make -k check < /dev/null || : + echo ====================TESTING WIN64 ========================= + cat {gas/testsuite/gas,ld/ld,binutils/binutils}.sum + echo ====================TESTING WIN64 END===================== + for file in {gas/testsuite/gas,ld/ld,binutils/binutils}.{sum,log} + do + ln $file binutils-%{mingw64_target}-$(basename $file) || : + done + tar cjf binutils-%{mingw64_target}.tar.bz2 binutils-%{mingw64_target}-*.{sum,log} + uuencode binutils-%{mingw64_target}.tar.bz2 binutils-%{mingw64_target}.tar.bz2 + rm -f binutils-%{mingw64_target}.tar.bz2 binutils-%{mingw64_target}-*.{sum,log} +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 + + +%install +%mingw_make_install +make -C build_multilib DESTDIR=%{buildroot}/multilib install + +# These files conflict with ordinary binutils. +rm -rf %{buildroot}%{_infodir} +rm -f %{buildroot}%{_libdir}/libiberty* +rm -f %{buildroot}%{_libdir}/bfd-plugins/libdep.so + +# 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 +# both process win32 and win64 binaries +mv %{buildroot}/multilib%{_bindir}/%{mingw64_strip} %{buildroot}%{_bindir}/%{mingw_strip} +mv %{buildroot}/multilib%{_bindir}/%{mingw64_objdump} %{buildroot}%{_bindir}/%{mingw_objdump} +mv %{buildroot}/multilib%{_bindir}/%{mingw64_objcopy} %{buildroot}%{_bindir}/%{mingw_objcopy} +mv %{buildroot}/multilib%{_bindir}/%{mingw64_nm} %{buildroot}%{_bindir}/%{mingw_nm} +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 +%license COPYING +%{_bindir}/%{mingw_strip} +%{_bindir}/%{mingw_objdump} +%{_bindir}/%{mingw_objcopy} +%{_bindir}/%{mingw_nm} + +%files -n mingw32-binutils +%{_bindir}/%{mingw32_target}-addr2line +%{_bindir}/%{mingw32_target}-ar +%{_bindir}/%{mingw32_target}-as +%{_bindir}/%{mingw32_target}-c++filt +%{_bindir}/%{mingw32_target}-dlltool +%{_bindir}/%{mingw32_target}-dllwrap +%{_bindir}/%{mingw32_target}-elfedit +%{_bindir}/%{mingw32_target}-gprof +%{_bindir}/%{mingw32_target}-ld +%{_bindir}/%{mingw32_target}-ld.bfd +%{_bindir}/%{mingw32_target}-nm +%{_bindir}/%{mingw32_target}-objcopy +%{_bindir}/%{mingw32_target}-objdump +%{_bindir}/%{mingw32_target}-ranlib +%{_bindir}/%{mingw32_target}-readelf +%{_bindir}/%{mingw32_target}-size +%{_bindir}/%{mingw32_target}-strings +%{_bindir}/%{mingw32_target}-strip +%{_bindir}/%{mingw32_target}-windmc +%{_bindir}/%{mingw32_target}-windres +%{_prefix}/%{mingw32_target}/bin/ar +%{_prefix}/%{mingw32_target}/bin/as +%{_prefix}/%{mingw32_target}/bin/dlltool +%{_prefix}/%{mingw32_target}/bin/ld +%{_prefix}/%{mingw32_target}/bin/ld.bfd +%{_prefix}/%{mingw32_target}/bin/nm +%{_prefix}/%{mingw32_target}/bin/objcopy +%{_prefix}/%{mingw32_target}/bin/objdump +%{_prefix}/%{mingw32_target}/bin/ranlib +%{_prefix}/%{mingw32_target}/bin/readelf +%{_prefix}/%{mingw32_target}/bin/strip +%{_prefix}/%{mingw32_target}/lib/ldscripts + +%files -n mingw64-binutils +%{_bindir}/%{mingw64_target}-addr2line +%{_bindir}/%{mingw64_target}-ar +%{_bindir}/%{mingw64_target}-as +%{_bindir}/%{mingw64_target}-c++filt +%{_bindir}/%{mingw64_target}-dlltool +%{_bindir}/%{mingw64_target}-dllwrap +%{_bindir}/%{mingw64_target}-elfedit +%{_bindir}/%{mingw64_target}-gprof +%{_bindir}/%{mingw64_target}-ld +%{_bindir}/%{mingw64_target}-ld.bfd +%{_bindir}/%{mingw64_target}-nm +%{_bindir}/%{mingw64_target}-objcopy +%{_bindir}/%{mingw64_target}-objdump +%{_bindir}/%{mingw64_target}-ranlib +%{_bindir}/%{mingw64_target}-readelf +%{_bindir}/%{mingw64_target}-size +%{_bindir}/%{mingw64_target}-strings +%{_bindir}/%{mingw64_target}-strip +%{_bindir}/%{mingw64_target}-windmc +%{_bindir}/%{mingw64_target}-windres +%{_prefix}/%{mingw64_target}/bin/ar +%{_prefix}/%{mingw64_target}/bin/as +%{_prefix}/%{mingw64_target}/bin/dlltool +%{_prefix}/%{mingw64_target}/bin/ld +%{_prefix}/%{mingw64_target}/bin/ld.bfd +%{_prefix}/%{mingw64_target}/bin/nm +%{_prefix}/%{mingw64_target}/bin/objcopy +%{_prefix}/%{mingw64_target}/bin/objdump +%{_prefix}/%{mingw64_target}/bin/ranlib +%{_prefix}/%{mingw64_target}/bin/readelf +%{_prefix}/%{mingw64_target}/bin/strip +%{_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 +* Wed Jun 14 2023 Sandro Mani - 2.40-3 +- Backport fix for Backport fix for + https://sourceware.org/bugzilla/show_bug.cgi?id=30079 + +* Fri Apr 14 2023 Sandro Mani - 2.40-2 +- Backport fix for CVE-2023-1972 + +* Thu Mar 09 2023 Sandro Mani - 2.40-1 +- Update to 2.40 + +* Tue Mar 07 2023 Sandro Mani - 2.39-5 +- Backport patch for CVE-2023-25587 + +* Thu Jan 19 2023 Fedora Release Engineering - 2.39-4 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_38_Mass_Rebuild + +* Tue Jan 03 2023 Sandro Mani - 2.39-3 +- Backport patch for CVE-2022-4285 + +* Sun Oct 30 2022 Sandro Mani - 2.39-2 +- Backport patch for CVE-2022-38533 + +* Tue Aug 16 2022 Sandro Mani - 2.39-1 +- Update to 2.39 + +* Thu Jul 21 2022 Fedora Release Engineering - 2.38-3 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_37_Mass_Rebuild + +* Tue Apr 26 2022 Sandro Mani - 2.38-2 +- Backport proposed fix for binutils #29006 + +* Fri Mar 11 2022 Sandro Mani - 2.38-1 +- Update to 2.38 + +* Wed Feb 23 2022 Marc-AndrĂ© Lureau - 2.37-5 +- Add ucrt64 target. Related to rhbz#2055254. + +* Thu Jan 20 2022 Fedora Release Engineering - 2.37-4 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_36_Mass_Rebuild + +* Sat Dec 18 2021 Sandro Mani - 2.37-3 +- Backport fix for CVE-2021-45078 + +* Thu Aug 12 2021 Sandro Mani - 2.37-2 +- Drop man pages + +* Sat Jul 24 2021 Sandro Mani - 2.37-1 +- Update to 2.37 + +* Sat Jul 24 2021 Sandro Mani - 2.36.1-3 +- Backport fix for "relocation truncated to fit" errors + +* Thu Jul 22 2021 Fedora Release Engineering - 2.36.1-2 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_35_Mass_Rebuild + +* Sat Feb 13 2021 Sandro Mani - 2.36.1-1 +- Update to 2.36.1 + +* Thu Jan 28 2021 Richard W.M. Jones - 2.34-7 +- Backport fixes for CVE-2021-20197. +- Bump and rebuild for s390. + +* Tue Jan 26 2021 Fedora Release Engineering - 2.34-5 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_34_Mass_Rebuild + +* Fri Dec 18 2020 Sandro Mani - 2.34-4 +- Backport patches for CVE-2020-16592, CVE-2020-16598 + +* Wed Jul 29 2020 Sandro Mani - 2.34-3 +- Fix ld --version output + +* Tue Jul 28 2020 Fedora Release Engineering - 2.34-2 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_33_Mass_Rebuild + +* Mon Jul 20 2020 Jeff Law - 2.34.0-2 +- Fix configure tests compromised by LTO + +* Fri Jun 19 2020 Sandro Mani - 2.34.0-1 +- Update to 2.34.0 +- Modernize spec + +* Wed Jan 29 2020 Fedora Release Engineering - 2.32-7 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_32_Mass_Rebuild + +* Tue Nov 19 2019 Sandro Mani - 2.32-6 +- Add binutils_24267.patch +- Drop non-relevant patches from native binutils package + +* Tue Aug 13 2019 Fabiano FidĂȘncio - 3.32-5 +- Backport all patches from native binutils package, rhbz#1740709 + +* Wed Aug 07 2019 Sandro Mani - 2.32-4 +- Backport patch to fix "too many open files" when linking libLLVM.dll + +* Thu Jul 25 2019 Fedora Release Engineering - 2.32-2 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_31_Mass_Rebuild + +* Tue May 07 2019 Sandro Mani - 2.32-1 +- Update to 2.32 + +* Fri Feb 01 2019 Fedora Release Engineering - 2.30-6 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_30_Mass_Rebuild + +* Wed Aug 22 2018 Sandro Mani - 2.30-5 +- Refresh patch for binutils bug #23061 + +* Wed Aug 08 2018 Sandro Mani - 2.30-4 +- Backport patch for binutils bug #23061 + +* Fri Jul 13 2018 Fedora Release Engineering - 2.30-3 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_29_Mass_Rebuild + +* Thu Jun 14 2018 Sandro Mani - 2.30-2 +- Backport patch for binutils bug #22762 + +* Thu Jun 14 2018 Sandro Mani - 2.30-1 +- Update to 2.30 + +* Thu Feb 08 2018 Fedora Release Engineering - 2.29.1-2 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_28_Mass_Rebuild + +* Sun Oct 08 2017 Kalev Lember - 2.29.1-1 +- Update to 2.29.1 + +* Tue Sep 19 2017 Sandro Mani - 2.29-4 +- Rebuild for mingw-filesystem (for %%mingw_nm macro) + +* Fri Aug 25 2017 Sandro Mani - 2.29-3 +- Also build multilib version of nm + +* Thu Aug 03 2017 Fedora Release Engineering - 2.29-2 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_27_Binutils_Mass_Rebuild + +* Wed Jul 26 2017 Kalev Lember - 2.29-1 +- Update to 2.29 + +* Mon Mar 06 2017 Kalev Lember - 2.28-1 +- Update to 2.28 + +* Fri Feb 10 2017 Fedora Release Engineering - 2.27-2 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_26_Mass_Rebuild + +* Wed Aug 10 2016 Kalev Lember - 2.27-1 +- Update to 2.27 + +* Tue May 10 2016 Kalev Lember - 2.26-1 +- Update to 2.26 + +* Thu Feb 04 2016 Fedora Release Engineering - 2.25-3 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_24_Mass_Rebuild + +* Wed Jun 17 2015 Fedora Release Engineering - 2.25-2 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_23_Mass_Rebuild + +* Tue Dec 23 2014 Erik van Pienbroek - 2.25-1 +- Update to 2.25 + +* Tue Dec 23 2014 Erik van Pienbroek - 2.24-5 +- Fix CVE-2014-8501 (RHBZ #1162578 #1162583) +- Fix CVE-2014-8502 (RHBZ #1162602) +- Fix CVE-2014-8503 (RHBZ #1162612) +- Fix CVE-2014-8504 (RHBZ #1162626) +- Fix CVE-2014-8737 (RHBZ #1162660) +- Fix CVE-2014-8738 (RHBZ #1162673) + +* Sun Aug 17 2014 Fedora Release Engineering - 2.24-4 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_21_22_Mass_Rebuild + +* Sat Jun 07 2014 Fedora Release Engineering - 2.24-3 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_21_Mass_Rebuild + +* Fri May 30 2014 Erik van Pienbroek - 2.24-2 +- Fix FTBFS against gcc 4.9 + +* Sat Jan 11 2014 Erik van Pienbroek - 2.24-1 +- Update to 2.24 + +* Sat Aug 03 2013 Fedora Release Engineering - 2.23.52.0.1-2 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_20_Mass_Rebuild + +* Wed Apr 3 2013 Erik van Pienbroek - 2.23.52.0.1-1 +- Update to 2.23.52.0.1 +- Fixes FTBFS against latest texinfo +- Resolve build failure on PPC + +* Thu Feb 14 2013 Fedora Release Engineering - 2.23.51.0.5-4 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_19_Mass_Rebuild + +* Tue Jan 22 2013 Erik van Pienbroek - 2.23.51.0.5-3 +- Backported patch to fix 'unexpected version string length' error in windres (RHBZ #902960) + +* Tue Nov 27 2012 Erik van Pienbroek - 2.23.51.0.5-2 +- Added BR: zlib-devel to enable support for compressed debug sections + +* Wed Nov 21 2012 Erik van Pienbroek - 2.23.51.0.5-1 +- Update to 2.23.51.0.5 release + +* Mon Oct 15 2012 Jon Ciesla - 2.22.52.0.4-2 +- Provides: bundled(libiberty) + +* Wed Jul 18 2012 Erik van Pienbroek - 2.22.52.0.4-1 +- Update to 2.22.52.0.4 release + +* Sat Jun 2 2012 Erik van Pienbroek - 2.22.52.0.3-1 +- Update to 2.22.52.0.3 release + +* Sun Apr 8 2012 Erik van Pienbroek - 2.22.52-4 +- Cleaned up unneeded %%global tags + +* Tue Mar 6 2012 Erik van Pienbroek - 2.22.52-3 +- Made the package compliant with the new MinGW packaging guidelines +- Added win64 support +- Added a mingw-binutils-generic package containing toolchain + utilities which can be used by both the win32 and win64 toolchains +- Enable the testsuite +- Package the license +- Fix source URL + +* Tue Mar 6 2012 Erik van Pienbroek - 2.22.52-2 +- Renamed the source package to mingw-binutils (RHBZ #673786) +- Use mingw macros without leading underscore + +* Sat Feb 25 2012 Erik van Pienbroek - 2.22.52-1 +- Update to 2.22.52 20120225 snapshot +- Bump the BR/R: mingw32-filesystem to >= 95 +- Rebuild using the i686-w64-mingw32 triplet +- Dropped some obsolete configure arguments +- Temporary provide mingw-strip, mingw-objdump and mingw-objcopy + in preparation for win32+win64 support + +* Tue Jan 10 2012 Erik van Pienbroek - 2.22-1 +- Update to 2.22 +- Dropped unneeded RPM tags +- Use parallel make + +* Tue May 10 2011 Kalev Lember - 2.21-2 +- Default to runtime pseudo reloc v2 now that mingw32-runtime 3.18 is in + +* Thu Mar 17 2011 Kalev Lember - 2.21-1 +- Update to 2.21 +- Added a patch to use runtime pseudo reloc v1 by default as the version of + mingw32-runtime we have does not support v2. +- Don't own the /usr/i686-pc-mingw32/bin/ directory + +* Tue Feb 08 2011 Fedora Release Engineering - 2.20.51.0.10-2 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_15_Mass_Rebuild + +* Tue Sep 7 2010 Richard W.M. Jones - 2.20.51.0.10-1 +- Synchronize with Fedora native version (2.20.51.0.10). +- Note however that we are not using any Fedora patches. + +* Thu May 13 2010 Kalev Lember - 2.20.1-1 +- Update to 2.20.1 + +* Wed Sep 16 2009 Kalev Lember - 2.19.51.0.14-1 +- Update to 2.19.51.0.14 + +* Sat Jul 25 2009 Fedora Release Engineering - 2.19.1-5 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_12_Mass_Rebuild + +* Tue Mar 10 2009 Richard W.M. Jones - 2.19.1-4 +- Switch to using upstream (GNU) binutils 2.19.1. It's exactly the + same as the MinGW version now. + +* Wed Feb 25 2009 Fedora Release Engineering - 2.19.1-3 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_11_Mass_Rebuild + +* Fri Feb 20 2009 Richard W.M. Jones - 2.19.1-2 +- Rebuild for mingw32-gcc 4.4 + +* Tue Feb 10 2009 Richard W.M. Jones - 2.19.1-1 +- New upstream version 2.19.1. + +* Mon Dec 15 2008 Richard W.M. Jones - 2.19-1 +- New upstream version 2.19. + +* Sat Nov 29 2008 Richard W.M. Jones - 2.18.50_20080109_2-10 +- Must runtime-require mingw32-filesystem. + +* Fri Nov 21 2008 Levente Farkas - 2.18.50_20080109_2-9 +- BR mingw32-filesystem >= 38 + +* Wed Sep 24 2008 Richard W.M. Jones - 2.18.50_20080109_2-8 +- Rename mingw -> mingw32. +- BR mingw32-filesystem >= 26. + +* Thu Sep 4 2008 Richard W.M. Jones - 2.18.50_20080109_2-7 +- Use mingw-filesystem. + +* Mon Jul 7 2008 Richard W.M. Jones - 2.18.50_20080109_2-5 +- Initial RPM release, largely based on earlier work from several sources.