diff --git a/.gitignore b/.gitignore index b59e8d9..859b46f 100644 --- a/.gitignore +++ b/.gitignore @@ -17,3 +17,5 @@ binutils-2.20.1.tar.bz2 /binutils-2.30.tar.bz2 /binutils-2.32.tar.bz2 /binutils-2.34.tar.bz2 +/binutils-2.36.1.tar.bz2 +/binutils-2.37.tar.xz diff --git a/binutils-2.27-aarch64-ifunc.patch b/binutils-2.27-aarch64-ifunc.patch new file mode 100644 index 0000000..17eb80d --- /dev/null +++ b/binutils-2.27-aarch64-ifunc.patch @@ -0,0 +1,11 @@ +diff -rupN --no-dereference binutils-2.37/bfd/elfnn-aarch64.c binutils-2.37-new/bfd/elfnn-aarch64.c +--- binutils-2.37/bfd/elfnn-aarch64.c 2021-07-08 13:37:19.000000000 +0200 ++++ binutils-2.37-new/bfd/elfnn-aarch64.c 2021-07-24 21:59:12.398868364 +0200 +@@ -5473,6 +5473,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/binutils-CVE-2019-1010204.patch b/binutils-CVE-2019-1010204.patch index 1843bb1..e3a7c80 100644 --- a/binutils-CVE-2019-1010204.patch +++ b/binutils-CVE-2019-1010204.patch @@ -1,7 +1,7 @@ -diff -rupN --no-dereference binutils-2.34/gold/fileread.cc binutils-2.34-new/gold/fileread.cc ---- binutils-2.34/gold/fileread.cc 2020-01-18 14:55:48.000000000 +0100 -+++ binutils-2.34-new/gold/fileread.cc 2020-12-18 02:57:23.485023881 +0100 -@@ -381,6 +381,12 @@ File_read::do_read(off_t start, section_ +diff -rupN --no-dereference binutils-2.37/gold/fileread.cc binutils-2.37-new/gold/fileread.cc +--- binutils-2.37/gold/fileread.cc 2021-07-08 13:37:20.000000000 +0200 ++++ binutils-2.37-new/gold/fileread.cc 2021-07-24 21:59:22.937765719 +0200 +@@ -385,6 +385,12 @@ File_read::do_read(off_t start, section_ ssize_t bytes; if (this->whole_file_view_ != NULL) { diff --git a/binutils-config.patch b/binutils-config.patch deleted file mode 100644 index 1d7651d..0000000 --- a/binutils-config.patch +++ /dev/null @@ -1,42 +0,0 @@ -diff -rupN --no-dereference binutils-2.34/config/intdiv0.m4 binutils-2.34-new/config/intdiv0.m4 ---- binutils-2.34/config/intdiv0.m4 2020-01-18 14:55:47.000000000 +0100 -+++ binutils-2.34-new/config/intdiv0.m4 2020-12-18 02:57:26.339013830 +0100 -@@ -31,10 +31,10 @@ sigfpe_handler (sig) int sig; - exit (sig != SIGFPE); - } - --int x = 1; --int y = 0; --int z; --int nan; -+volatile int x = 1; -+volatile int y = 0; -+volatile int z; -+volatile int nan; - - int main () - { -diff -rupN --no-dereference binutils-2.34/libiberty/aclocal.m4 binutils-2.34-new/libiberty/aclocal.m4 ---- binutils-2.34/libiberty/aclocal.m4 2020-01-18 14:55:48.000000000 +0100 -+++ binutils-2.34-new/libiberty/aclocal.m4 2020-12-18 02:57:26.339013830 +0100 -@@ -147,7 +147,7 @@ if test $ac_cv_os_cray = yes; then - fi - - AC_CACHE_CHECK(stack direction for C alloca, ac_cv_c_stack_direction, --[AC_TRY_RUN([find_stack_direction () -+[AC_TRY_RUN([__attribute__ ((noclone,noinline)) find_stack_direction () - { - static char *addr = 0; - auto char dummy; -diff -rupN --no-dereference binutils-2.34/libiberty/configure.ac binutils-2.34-new/libiberty/configure.ac ---- binutils-2.34/libiberty/configure.ac 2020-01-18 14:55:48.000000000 +0100 -+++ binutils-2.34-new/libiberty/configure.ac 2020-12-18 02:57:26.339013830 +0100 -@@ -661,7 +661,7 @@ if test -z "${setobjs}"; then - for v in $vars; do - AC_MSG_CHECKING([for $v]) - AC_CACHE_VAL(libiberty_cv_var_$v, -- [AC_LINK_IFELSE([AC_LANG_PROGRAM([[int *p;]],[[extern int $v []; p = $v;]])], -+ [AC_LINK_IFELSE([AC_LANG_PROGRAM([[__attribute__ ((used)) int *p;]],[[extern int $v []; p = $v;]])], - [eval "libiberty_cv_var_$v=yes"], - [eval "libiberty_cv_var_$v=no"])]) - if eval "test \"`echo '$libiberty_cv_var_'$v`\" = yes"; then diff --git a/binutils-do-not-link-with-static-libstdc++.patch b/binutils-do-not-link-with-static-libstdc++.patch index b910b1a..354992a 100644 --- a/binutils-do-not-link-with-static-libstdc++.patch +++ b/binutils-do-not-link-with-static-libstdc++.patch @@ -1,7 +1,7 @@ -diff -rupN --no-dereference binutils-2.34/configure binutils-2.34-new/configure ---- binutils-2.34/configure 2020-01-18 15:01:13.000000000 +0100 -+++ binutils-2.34-new/configure 2020-12-18 02:57:17.364045443 +0100 -@@ -5103,49 +5103,6 @@ if test -z "$LD"; then +diff -rupN --no-dereference binutils-2.37/configure binutils-2.37-new/configure +--- binutils-2.37/configure 2021-07-18 18:36:27.000000000 +0200 ++++ binutils-2.37-new/configure 2021-07-24 21:59:14.582847093 +0200 +@@ -5257,49 +5257,6 @@ if test -z "$LD"; then fi fi @@ -51,10 +51,10 @@ diff -rupN --no-dereference binutils-2.34/configure binutils-2.34-new/configure if test -n "$ac_tool_prefix"; then -diff -rupN --no-dereference binutils-2.34/configure.ac binutils-2.34-new/configure.ac ---- binutils-2.34/configure.ac 2020-02-01 13:02:56.000000000 +0100 -+++ binutils-2.34-new/configure.ac 2020-12-18 02:57:17.364045443 +0100 -@@ -1284,26 +1284,6 @@ if test -z "$LD"; then +diff -rupN --no-dereference binutils-2.37/configure.ac binutils-2.37-new/configure.ac +--- binutils-2.37/configure.ac 2021-07-18 18:48:58.000000000 +0200 ++++ binutils-2.37-new/configure.ac 2021-07-24 21:59:14.583847083 +0200 +@@ -1300,26 +1300,6 @@ if test -z "$LD"; then fi fi diff --git a/binutils-export-demangle.h.patch b/binutils-export-demangle.h.patch index ed87e96..ee635cb 100644 --- a/binutils-export-demangle.h.patch +++ b/binutils-export-demangle.h.patch @@ -1,33 +1,33 @@ -diff -rupN --no-dereference binutils-2.34/bfd/Makefile.am binutils-2.34-new/bfd/Makefile.am ---- binutils-2.34/bfd/Makefile.am 2020-12-18 02:57:13.290059799 +0100 -+++ binutils-2.34-new/bfd/Makefile.am 2020-12-18 02:57:13.293059789 +0100 +diff -rupN --no-dereference binutils-2.37/bfd/Makefile.am binutils-2.37-new/bfd/Makefile.am +--- binutils-2.37/bfd/Makefile.am 2021-07-24 21:59:01.980969825 +0200 ++++ binutils-2.37-new/bfd/Makefile.am 2021-07-24 21:59:01.986969767 +0200 @@ -33,7 +33,7 @@ bfdlibdir = @bfdlibdir@ bfdincludedir = @bfdincludedir@ bfdlib_LTLIBRARIES = libbfd.la bfdinclude_HEADERS = $(BFD_H) $(INCDIR)/ansidecl.h $(INCDIR)/symcat.h \ -- bfd_stdint.h $(INCDIR)/diagnostics.h $(INCDIR)/bfdlink.h -+ bfd_stdint.h $(INCDIR)/diagnostics.h $(INCDIR)/bfdlink.h $(INCDIR)/demangle.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.34/bfd/Makefile.in binutils-2.34-new/bfd/Makefile.in ---- binutils-2.34/bfd/Makefile.in 2020-12-18 02:57:13.290059799 +0100 -+++ binutils-2.34-new/bfd/Makefile.in 2020-12-18 02:57:13.294059785 +0100 +diff -rupN --no-dereference binutils-2.37/bfd/Makefile.in binutils-2.37-new/bfd/Makefile.in +--- binutils-2.37/bfd/Makefile.in 2021-07-24 21:59:01.980969825 +0200 ++++ binutils-2.37-new/bfd/Makefile.in 2021-07-24 21:59:01.987969757 +0200 @@ -249,7 +249,7 @@ am__can_run_installinfo = \ esac am__bfdinclude_HEADERS_DIST = $(INCDIR)/plugin-api.h bfd.h \ - $(INCDIR)/ansidecl.h $(INCDIR)/symcat.h bfd_stdint.h \ + $(INCDIR)/ansidecl.h $(INCDIR)/symcat.h \ - $(INCDIR)/diagnostics.h $(INCDIR)/bfdlink.h + $(INCDIR)/diagnostics.h $(INCDIR)/bfdlink.h $(INCDIR)/demangle.h HEADERS = $(bfdinclude_HEADERS) RECURSIVE_CLEAN_TARGETS = mostlyclean-recursive clean-recursive \ distclean-recursive maintainer-clean-recursive -@@ -468,7 +468,7 @@ libbfd_la_LDFLAGS = $(am__append_1) -rel +@@ -469,7 +469,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@ bfd_stdint.h $(INCDIR)/diagnostics.h \ -+@INSTALL_LIBBFD_TRUE@ bfd_stdint.h $(INCDIR)/diagnostics.h $(INCDIR)/demangle.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/binutils-2.29-filename-in-error-messages.patch b/binutils-filename-in-error-messages.patch similarity index 53% rename from binutils-2.29-filename-in-error-messages.patch rename to binutils-filename-in-error-messages.patch index 011108d..a06480b 100644 --- a/binutils-2.29-filename-in-error-messages.patch +++ b/binutils-filename-in-error-messages.patch @@ -1,12 +1,10 @@ -diff -rupN --no-dereference binutils-2.34/binutils/readelf.c binutils-2.34-new/binutils/readelf.c ---- binutils-2.34/binutils/readelf.c 2020-01-18 14:55:47.000000000 +0100 -+++ binutils-2.34-new/binutils/readelf.c 2020-12-18 02:57:15.341052571 +0100 -@@ -20350,75 +20350,85 @@ process_file (char * file_name) - Filedata * filedata = NULL; +diff -rupN --no-dereference binutils-2.37/binutils/readelf.c binutils-2.37-new/binutils/readelf.c +--- binutils-2.37/binutils/readelf.c 2021-07-08 13:37:19.000000000 +0200 ++++ binutils-2.37-new/binutils/readelf.c 2021-07-24 21:59:05.781932809 +0200 +@@ -21873,45 +21873,52 @@ process_file (char * file_name) struct stat statbuf; char armag[SARMAG]; -- bfd_boolean ret = TRUE; -+ bfd_boolean ret = FALSE; + bool ret = true; + char * name; + char * saved_program_name; + @@ -26,7 +24,7 @@ diff -rupN --no-dereference binutils-2.34/binutils/readelf.c binutils-2.34-new/b else - error (_("Could not locate '%s'. System error message: %s\n"), - file_name, strerror (errno)); -- return FALSE; +- return false; + error (_("Could not locate file. System error message: %s\n"), + strerror (errno)); + goto done; @@ -35,7 +33,7 @@ diff -rupN --no-dereference binutils-2.34/binutils/readelf.c binutils-2.34-new/b if (! S_ISREG (statbuf.st_mode)) { - error (_("'%s' is not an ordinary file\n"), file_name); -- return FALSE; +- return false; + error (_("Not an ordinary file\n")); + goto done; } @@ -44,7 +42,7 @@ diff -rupN --no-dereference binutils-2.34/binutils/readelf.c binutils-2.34-new/b if (filedata == NULL) { error (_("Out of memory allocating file data structure\n")); -- return FALSE; +- return false; + goto done; } @@ -54,7 +52,7 @@ diff -rupN --no-dereference binutils-2.34/binutils/readelf.c binutils-2.34-new/b { - error (_("Input file '%s' is not readable.\n"), file_name); - free (filedata); -- return FALSE; +- return false; + error (_("Not readable\n")); + goto done; } @@ -64,62 +62,63 @@ diff -rupN --no-dereference binutils-2.34/binutils/readelf.c binutils-2.34-new/b - error (_("%s: Failed to read file's magic number\n"), file_name); - fclose (filedata->handle); - free (filedata); -- return FALSE; -- } -- -- filedata->file_size = (bfd_size_type) statbuf.st_size; -- -- if (memcmp (armag, ARMAG, SARMAG) == 0) -- { -- if (! process_archive (filedata, FALSE)) -- ret = FALSE; -- } -- else if (memcmp (armag, ARMAGT, SARMAG) == 0) -- { -- if ( ! process_archive (filedata, TRUE)) -- ret = FALSE; +- return false; + error (_("Failed to read file's magic number\n")); ++ goto done; + } + + filedata->file_size = (bfd_size_type) statbuf.st_size; +@@ -21919,33 +21926,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) + if (do_archive_index && !check_all) - error (_("File %s is not an archive so its index cannot be displayed.\n"), - file_name); -+ filedata->file_size = (bfd_size_type) statbuf.st_size; ++ error (_("Not an archive so its index cannot be displayed.\n")); + + rewind (filedata->handle); + filedata->archive_file_size = filedata->archive_file_offset = 0; -- rewind (filedata->handle); -- archive_file_size = archive_file_offset = 0; -- - if (! process_object (filedata)) -- ret = FALSE; -+ if (memcmp (armag, ARMAG, SARMAG) == 0) -+ { -+ if (process_archive (filedata, FALSE)) -+ ret = TRUE; -+ } -+ else if (memcmp (armag, ARMAGT, SARMAG) == 0) -+ { -+ if (process_archive (filedata, TRUE)) -+ ret = TRUE; -+ } -+ else -+ { -+ if (do_archive_index) -+ error (_("Not an archive so its index cannot be displayed.\n")); -+ -+ rewind (filedata->handle); -+ archive_file_size = archive_file_offset = 0; -+ -+ if (process_object (filedata)) -+ ret = TRUE; -+ } +- ret = false; ++ if (process_object (filedata)) ++ ret = true; } - fclose (filedata->handle); +- fclose (filedata->handle); +- free (filedata->section_headers); +- free (filedata->program_headers); +- free (filedata->string_table); +- free (filedata->dump.dump_sects); +- free (filedata); + done: - free (filedata); ++ 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; - return ret; - } + free (ba_cache.strtab); + ba_cache.strtab = NULL; diff --git a/binutils-fix-testsuite-failures.patch b/binutils-fix-testsuite-failures.patch index 6dcd3c9..af32305 100644 --- a/binutils-fix-testsuite-failures.patch +++ b/binutils-fix-testsuite-failures.patch @@ -1,6 +1,21 @@ -diff -rupN --no-dereference binutils-2.34/ld/testsuite/ld-plugin/plugin-10.d binutils-2.34-new/ld/testsuite/ld-plugin/plugin-10.d ---- binutils-2.34/ld/testsuite/ld-plugin/plugin-10.d 2020-01-18 14:55:48.000000000 +0100 -+++ binutils-2.34-new/ld/testsuite/ld-plugin/plugin-10.d 2020-12-18 02:57:20.370034853 +0100 +diff -rupN --no-dereference binutils-2.37/ld/testsuite/ld-elfvers/vers24.rd binutils-2.37-new/ld/testsuite/ld-elfvers/vers24.rd +--- binutils-2.37/ld/testsuite/ld-elfvers/vers24.rd 2021-07-08 13:37:20.000000000 +0200 ++++ binutils-2.37-new/ld/testsuite/ld-elfvers/vers24.rd 2021-07-24 21:59:18.647807502 +0200 +@@ -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.37/ld/testsuite/ld-plugin/plugin-10.d binutils-2.37-new/ld/testsuite/ld-plugin/plugin-10.d +--- binutils-2.37/ld/testsuite/ld-plugin/plugin-10.d 2021-07-08 13:37:20.000000000 +0200 ++++ binutils-2.37-new/ld/testsuite/ld-plugin/plugin-10.d 2021-07-24 21:59:18.648807492 +0200 @@ -32,7 +32,8 @@ hook called: claim_file tmpdir/func.o \[ hook called: claim_file tmpdir/libtext.a \[@.* not claimed #... @@ -11,9 +26,9 @@ diff -rupN --no-dereference binutils-2.34/ld/testsuite/ld-plugin/plugin-10.d bin +#... hook called: cleanup. #... -diff -rupN --no-dereference binutils-2.34/ld/testsuite/ld-plugin/plugin-11.d binutils-2.34-new/ld/testsuite/ld-plugin/plugin-11.d ---- binutils-2.34/ld/testsuite/ld-plugin/plugin-11.d 2020-01-18 14:55:48.000000000 +0100 -+++ binutils-2.34-new/ld/testsuite/ld-plugin/plugin-11.d 2020-12-18 02:57:20.371034849 +0100 +diff -rupN --no-dereference binutils-2.37/ld/testsuite/ld-plugin/plugin-11.d binutils-2.37-new/ld/testsuite/ld-plugin/plugin-11.d +--- binutils-2.37/ld/testsuite/ld-plugin/plugin-11.d 2021-07-08 13:37:20.000000000 +0200 ++++ binutils-2.37-new/ld/testsuite/ld-plugin/plugin-11.d 2021-07-24 21:59:18.648807492 +0200 @@ -35,8 +35,9 @@ hook called: claim_file tmpdir/func.o \[ hook called: claim_file tmpdir/libtext.a \[@.* CLAIMED #... @@ -26,18 +41,18 @@ diff -rupN --no-dereference binutils-2.34/ld/testsuite/ld-plugin/plugin-11.d bin +#... hook called: cleanup. #... -diff -rupN --no-dereference binutils-2.34/ld/testsuite/ld-plugin/plugin-13.d binutils-2.34-new/ld/testsuite/ld-plugin/plugin-13.d ---- binutils-2.34/ld/testsuite/ld-plugin/plugin-13.d 2020-01-18 14:55:48.000000000 +0100 -+++ binutils-2.34-new/ld/testsuite/ld-plugin/plugin-13.d 2020-12-18 02:57:20.371034849 +0100 +diff -rupN --no-dereference binutils-2.37/ld/testsuite/ld-plugin/plugin-13.d binutils-2.37-new/ld/testsuite/ld-plugin/plugin-13.d +--- binutils-2.37/ld/testsuite/ld-plugin/plugin-13.d 2021-07-08 13:37:20.000000000 +0200 ++++ binutils-2.37-new/ld/testsuite/ld-plugin/plugin-13.d 2021-07-24 21:59:18.648807492 +0200 @@ -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.34/ld/testsuite/ld-plugin/plugin-14.d binutils-2.34-new/ld/testsuite/ld-plugin/plugin-14.d ---- binutils-2.34/ld/testsuite/ld-plugin/plugin-14.d 2020-01-18 14:55:48.000000000 +0100 -+++ binutils-2.34-new/ld/testsuite/ld-plugin/plugin-14.d 2020-12-18 02:57:20.371034849 +0100 +diff -rupN --no-dereference binutils-2.37/ld/testsuite/ld-plugin/plugin-14.d binutils-2.37-new/ld/testsuite/ld-plugin/plugin-14.d +--- binutils-2.37/ld/testsuite/ld-plugin/plugin-14.d 2021-07-08 13:37:20.000000000 +0200 ++++ binutils-2.37-new/ld/testsuite/ld-plugin/plugin-14.d 2021-07-24 21:59:18.649807482 +0200 @@ -27,7 +27,6 @@ hook called: claim_file .*/ld/testsuite/ hook called: claim_file tmpdir/text.o \[@0/.* not claimed #... @@ -47,9 +62,9 @@ diff -rupN --no-dereference binutils-2.34/ld/testsuite/ld-plugin/plugin-14.d bin +#... hook called: cleanup. #... -diff -rupN --no-dereference binutils-2.34/ld/testsuite/ld-plugin/plugin-15.d binutils-2.34-new/ld/testsuite/ld-plugin/plugin-15.d ---- binutils-2.34/ld/testsuite/ld-plugin/plugin-15.d 2020-01-18 14:55:48.000000000 +0100 -+++ binutils-2.34-new/ld/testsuite/ld-plugin/plugin-15.d 2020-12-18 02:57:20.371034849 +0100 +diff -rupN --no-dereference binutils-2.37/ld/testsuite/ld-plugin/plugin-15.d binutils-2.37-new/ld/testsuite/ld-plugin/plugin-15.d +--- binutils-2.37/ld/testsuite/ld-plugin/plugin-15.d 2021-07-08 13:37:20.000000000 +0200 ++++ binutils-2.37-new/ld/testsuite/ld-plugin/plugin-15.d 2021-07-24 21:59:18.649807482 +0200 @@ -28,7 +28,6 @@ hook called: claim_file .*/ld/testsuite/ hook called: claim_file tmpdir/text.o \[@0/.* not claimed #... @@ -59,9 +74,9 @@ diff -rupN --no-dereference binutils-2.34/ld/testsuite/ld-plugin/plugin-15.d bin +#... hook called: cleanup. #... -diff -rupN --no-dereference binutils-2.34/ld/testsuite/ld-plugin/plugin-16.d binutils-2.34-new/ld/testsuite/ld-plugin/plugin-16.d ---- binutils-2.34/ld/testsuite/ld-plugin/plugin-16.d 2020-01-18 14:55:48.000000000 +0100 -+++ binutils-2.34-new/ld/testsuite/ld-plugin/plugin-16.d 2020-12-18 02:57:20.372034846 +0100 +diff -rupN --no-dereference binutils-2.37/ld/testsuite/ld-plugin/plugin-16.d binutils-2.37-new/ld/testsuite/ld-plugin/plugin-16.d +--- binutils-2.37/ld/testsuite/ld-plugin/plugin-16.d 2021-07-08 13:37:20.000000000 +0200 ++++ binutils-2.37-new/ld/testsuite/ld-plugin/plugin-16.d 2021-07-24 21:59:18.649807482 +0200 @@ -30,9 +30,8 @@ hook called: claim_file .*/ld/testsuite/ hook called: claim_file tmpdir/text.o \[@0/.* not claimed #... @@ -74,9 +89,9 @@ diff -rupN --no-dereference binutils-2.34/ld/testsuite/ld-plugin/plugin-16.d bin +#... hook called: cleanup. #... -diff -rupN --no-dereference binutils-2.34/ld/testsuite/ld-plugin/plugin-17.d binutils-2.34-new/ld/testsuite/ld-plugin/plugin-17.d ---- binutils-2.34/ld/testsuite/ld-plugin/plugin-17.d 2020-01-18 14:55:48.000000000 +0100 -+++ binutils-2.34-new/ld/testsuite/ld-plugin/plugin-17.d 2020-12-18 02:57:20.372034846 +0100 +diff -rupN --no-dereference binutils-2.37/ld/testsuite/ld-plugin/plugin-17.d binutils-2.37-new/ld/testsuite/ld-plugin/plugin-17.d +--- binutils-2.37/ld/testsuite/ld-plugin/plugin-17.d 2021-07-08 13:37:20.000000000 +0200 ++++ binutils-2.37-new/ld/testsuite/ld-plugin/plugin-17.d 2021-07-24 21:59:18.649807482 +0200 @@ -31,7 +31,8 @@ hook called: claim_file .*/ld/testsuite/ hook called: claim_file tmpdir/text.o \[@0/.* not claimed #... @@ -87,9 +102,9 @@ diff -rupN --no-dereference binutils-2.34/ld/testsuite/ld-plugin/plugin-17.d bin +#... hook called: cleanup. #... -diff -rupN --no-dereference binutils-2.34/ld/testsuite/ld-plugin/plugin-18.d binutils-2.34-new/ld/testsuite/ld-plugin/plugin-18.d ---- binutils-2.34/ld/testsuite/ld-plugin/plugin-18.d 2020-01-18 14:55:48.000000000 +0100 -+++ binutils-2.34-new/ld/testsuite/ld-plugin/plugin-18.d 2020-12-18 02:57:20.372034846 +0100 +diff -rupN --no-dereference binutils-2.37/ld/testsuite/ld-plugin/plugin-18.d binutils-2.37-new/ld/testsuite/ld-plugin/plugin-18.d +--- binutils-2.37/ld/testsuite/ld-plugin/plugin-18.d 2021-07-08 13:37:20.000000000 +0200 ++++ binutils-2.37-new/ld/testsuite/ld-plugin/plugin-18.d 2021-07-24 21:59:18.650807473 +0200 @@ -32,7 +32,8 @@ hook called: claim_file .*/ld/testsuite/ hook called: claim_file tmpdir/libtext.a \[@.* not claimed #... @@ -100,9 +115,9 @@ diff -rupN --no-dereference binutils-2.34/ld/testsuite/ld-plugin/plugin-18.d bin +#... hook called: cleanup. #... -diff -rupN --no-dereference binutils-2.34/ld/testsuite/ld-plugin/plugin-19.d binutils-2.34-new/ld/testsuite/ld-plugin/plugin-19.d ---- binutils-2.34/ld/testsuite/ld-plugin/plugin-19.d 2020-01-18 14:55:48.000000000 +0100 -+++ binutils-2.34-new/ld/testsuite/ld-plugin/plugin-19.d 2020-12-18 02:57:20.372034846 +0100 +diff -rupN --no-dereference binutils-2.37/ld/testsuite/ld-plugin/plugin-19.d binutils-2.37-new/ld/testsuite/ld-plugin/plugin-19.d +--- binutils-2.37/ld/testsuite/ld-plugin/plugin-19.d 2021-07-08 13:37:20.000000000 +0200 ++++ binutils-2.37-new/ld/testsuite/ld-plugin/plugin-19.d 2021-07-24 21:59:18.650807473 +0200 @@ -35,8 +35,9 @@ hook called: claim_file .*/ld/testsuite/ hook called: claim_file tmpdir/libtext.a \[@.* CLAIMED #... @@ -115,9 +130,9 @@ diff -rupN --no-dereference binutils-2.34/ld/testsuite/ld-plugin/plugin-19.d bin +#... hook called: cleanup. #... -diff -rupN --no-dereference binutils-2.34/ld/testsuite/ld-plugin/plugin-20.d binutils-2.34-new/ld/testsuite/ld-plugin/plugin-20.d ---- binutils-2.34/ld/testsuite/ld-plugin/plugin-20.d 2020-01-18 14:55:48.000000000 +0100 -+++ binutils-2.34-new/ld/testsuite/ld-plugin/plugin-20.d 2020-12-18 02:57:20.372034846 +0100 +diff -rupN --no-dereference binutils-2.37/ld/testsuite/ld-plugin/plugin-20.d binutils-2.37-new/ld/testsuite/ld-plugin/plugin-20.d +--- binutils-2.37/ld/testsuite/ld-plugin/plugin-20.d 2021-07-08 13:37:20.000000000 +0200 ++++ binutils-2.37-new/ld/testsuite/ld-plugin/plugin-20.d 2021-07-24 21:59:18.650807473 +0200 @@ -2,6 +2,5 @@ hook called: all symbols read. Input: func.c \(tmpdir/libfunc.a\) Sym: '_?func' Resolution: LDPR_PREVAILING_DEF.* @@ -126,9 +141,9 @@ diff -rupN --no-dereference binutils-2.34/ld/testsuite/ld-plugin/plugin-20.d bin -.*main.c.*: undefined reference to `\.?func' +#... hook called: cleanup. -diff -rupN --no-dereference binutils-2.34/ld/testsuite/ld-plugin/plugin-21.d binutils-2.34-new/ld/testsuite/ld-plugin/plugin-21.d ---- binutils-2.34/ld/testsuite/ld-plugin/plugin-21.d 2020-01-18 14:55:48.000000000 +0100 -+++ binutils-2.34-new/ld/testsuite/ld-plugin/plugin-21.d 2020-12-18 02:57:20.372034846 +0100 +diff -rupN --no-dereference binutils-2.37/ld/testsuite/ld-plugin/plugin-21.d binutils-2.37-new/ld/testsuite/ld-plugin/plugin-21.d +--- binutils-2.37/ld/testsuite/ld-plugin/plugin-21.d 2021-07-08 13:37:20.000000000 +0200 ++++ binutils-2.37-new/ld/testsuite/ld-plugin/plugin-21.d 2021-07-24 21:59:18.650807473 +0200 @@ -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.* @@ -137,9 +152,9 @@ diff -rupN --no-dereference binutils-2.34/ld/testsuite/ld-plugin/plugin-21.d bin -.*main.c.*: undefined reference to `\.?func' +#... hook called: cleanup. -diff -rupN --no-dereference binutils-2.34/ld/testsuite/ld-plugin/plugin-22.d binutils-2.34-new/ld/testsuite/ld-plugin/plugin-22.d ---- binutils-2.34/ld/testsuite/ld-plugin/plugin-22.d 2020-01-18 14:55:48.000000000 +0100 -+++ binutils-2.34-new/ld/testsuite/ld-plugin/plugin-22.d 2020-12-18 02:57:20.373034842 +0100 +diff -rupN --no-dereference binutils-2.37/ld/testsuite/ld-plugin/plugin-22.d binutils-2.37-new/ld/testsuite/ld-plugin/plugin-22.d +--- binutils-2.37/ld/testsuite/ld-plugin/plugin-22.d 2021-07-08 13:37:20.000000000 +0200 ++++ binutils-2.37-new/ld/testsuite/ld-plugin/plugin-22.d 2021-07-24 21:59:18.650807473 +0200 @@ -2,6 +2,5 @@ Claimed: tmpdir/libfunc.a \[@.* hook called: all symbols read. Sym: '_?func' Resolution: LDPR_PREVAILING_DEF.* @@ -148,9 +163,9 @@ diff -rupN --no-dereference binutils-2.34/ld/testsuite/ld-plugin/plugin-22.d bin -.*main.c.*: undefined reference to `\.?func' +#... hook called: cleanup. -diff -rupN --no-dereference binutils-2.34/ld/testsuite/ld-plugin/plugin-23.d binutils-2.34-new/ld/testsuite/ld-plugin/plugin-23.d ---- binutils-2.34/ld/testsuite/ld-plugin/plugin-23.d 2020-01-18 14:55:48.000000000 +0100 -+++ binutils-2.34-new/ld/testsuite/ld-plugin/plugin-23.d 2020-12-18 02:57:20.373034842 +0100 +diff -rupN --no-dereference binutils-2.37/ld/testsuite/ld-plugin/plugin-23.d binutils-2.37-new/ld/testsuite/ld-plugin/plugin-23.d +--- binutils-2.37/ld/testsuite/ld-plugin/plugin-23.d 2021-07-08 13:37:20.000000000 +0200 ++++ binutils-2.37-new/ld/testsuite/ld-plugin/plugin-23.d 2021-07-24 21:59:18.651807463 +0200 @@ -2,6 +2,5 @@ Claimed: .*/ld/testsuite/ld-plugin/func. hook called: all symbols read. Sym: '_?func' Resolution: LDPR_PREVAILING_DEF.* @@ -159,47 +174,47 @@ diff -rupN --no-dereference binutils-2.34/ld/testsuite/ld-plugin/plugin-23.d bin -.*main.c.*: undefined reference to `\.?func' +#... hook called: cleanup. -diff -rupN --no-dereference binutils-2.34/ld/testsuite/ld-plugin/plugin-24.d binutils-2.34-new/ld/testsuite/ld-plugin/plugin-24.d ---- binutils-2.34/ld/testsuite/ld-plugin/plugin-24.d 2020-01-18 14:55:48.000000000 +0100 -+++ binutils-2.34-new/ld/testsuite/ld-plugin/plugin-24.d 2020-12-18 02:57:20.373034842 +0100 +diff -rupN --no-dereference binutils-2.37/ld/testsuite/ld-plugin/plugin-24.d binutils-2.37-new/ld/testsuite/ld-plugin/plugin-24.d +--- binutils-2.37/ld/testsuite/ld-plugin/plugin-24.d 2021-07-08 13:37:20.000000000 +0200 ++++ binutils-2.37-new/ld/testsuite/ld-plugin/plugin-24.d 2021-07-24 21:59:18.651807463 +0200 @@ -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.34/ld/testsuite/ld-plugin/plugin-25.d binutils-2.34-new/ld/testsuite/ld-plugin/plugin-25.d ---- binutils-2.34/ld/testsuite/ld-plugin/plugin-25.d 2020-01-18 14:55:48.000000000 +0100 -+++ binutils-2.34-new/ld/testsuite/ld-plugin/plugin-25.d 2020-12-18 02:57:20.373034842 +0100 +diff -rupN --no-dereference binutils-2.37/ld/testsuite/ld-plugin/plugin-25.d binutils-2.37-new/ld/testsuite/ld-plugin/plugin-25.d +--- binutils-2.37/ld/testsuite/ld-plugin/plugin-25.d 2021-07-08 13:37:20.000000000 +0200 ++++ binutils-2.37-new/ld/testsuite/ld-plugin/plugin-25.d 2021-07-24 21:59:18.651807463 +0200 @@ -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.34/ld/testsuite/ld-plugin/plugin-28.d binutils-2.34-new/ld/testsuite/ld-plugin/plugin-28.d ---- binutils-2.34/ld/testsuite/ld-plugin/plugin-28.d 2020-01-18 14:55:48.000000000 +0100 -+++ binutils-2.34-new/ld/testsuite/ld-plugin/plugin-28.d 2020-12-18 02:57:20.373034842 +0100 +diff -rupN --no-dereference binutils-2.37/ld/testsuite/ld-plugin/plugin-28.d binutils-2.37-new/ld/testsuite/ld-plugin/plugin-28.d +--- binutils-2.37/ld/testsuite/ld-plugin/plugin-28.d 2021-07-08 13:37:20.000000000 +0200 ++++ binutils-2.37-new/ld/testsuite/ld-plugin/plugin-28.d 2021-07-24 21:59:18.651807463 +0200 @@ -1 +1,2 @@ .*: error: Error +#... -diff -rupN --no-dereference binutils-2.34/ld/testsuite/ld-plugin/plugin-29.d binutils-2.34-new/ld/testsuite/ld-plugin/plugin-29.d ---- binutils-2.34/ld/testsuite/ld-plugin/plugin-29.d 2020-01-18 14:55:48.000000000 +0100 -+++ binutils-2.34-new/ld/testsuite/ld-plugin/plugin-29.d 2020-12-18 02:57:20.373034842 +0100 +diff -rupN --no-dereference binutils-2.37/ld/testsuite/ld-plugin/plugin-29.d binutils-2.37-new/ld/testsuite/ld-plugin/plugin-29.d +--- binutils-2.37/ld/testsuite/ld-plugin/plugin-29.d 2021-07-08 13:37:20.000000000 +0200 ++++ binutils-2.37-new/ld/testsuite/ld-plugin/plugin-29.d 2021-07-24 21:59:18.652807453 +0200 @@ -1 +1,2 @@ .*: warning: Warning +#... -diff -rupN --no-dereference binutils-2.34/ld/testsuite/ld-plugin/plugin-30.d binutils-2.34-new/ld/testsuite/ld-plugin/plugin-30.d ---- binutils-2.34/ld/testsuite/ld-plugin/plugin-30.d 2020-01-18 14:55:48.000000000 +0100 -+++ binutils-2.34-new/ld/testsuite/ld-plugin/plugin-30.d 2020-12-18 02:57:20.373034842 +0100 +diff -rupN --no-dereference binutils-2.37/ld/testsuite/ld-plugin/plugin-30.d binutils-2.37-new/ld/testsuite/ld-plugin/plugin-30.d +--- binutils-2.37/ld/testsuite/ld-plugin/plugin-30.d 2021-07-08 13:37:20.000000000 +0200 ++++ binutils-2.37-new/ld/testsuite/ld-plugin/plugin-30.d 2021-07-24 21:59:18.652807453 +0200 @@ -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.34/ld/testsuite/ld-plugin/plugin-6.d binutils-2.34-new/ld/testsuite/ld-plugin/plugin-6.d ---- binutils-2.34/ld/testsuite/ld-plugin/plugin-6.d 2020-01-18 14:55:48.000000000 +0100 -+++ binutils-2.34-new/ld/testsuite/ld-plugin/plugin-6.d 2020-12-18 02:57:20.374034839 +0100 +diff -rupN --no-dereference binutils-2.37/ld/testsuite/ld-plugin/plugin-6.d binutils-2.37-new/ld/testsuite/ld-plugin/plugin-6.d +--- binutils-2.37/ld/testsuite/ld-plugin/plugin-6.d 2021-07-08 13:37:20.000000000 +0200 ++++ binutils-2.37-new/ld/testsuite/ld-plugin/plugin-6.d 2021-07-24 21:59:18.652807453 +0200 @@ -27,7 +27,6 @@ hook called: claim_file tmpdir/func.o \[ hook called: claim_file tmpdir/text.o \[@0/.* not claimed #... @@ -209,9 +224,9 @@ diff -rupN --no-dereference binutils-2.34/ld/testsuite/ld-plugin/plugin-6.d binu +#... hook called: cleanup. #... -diff -rupN --no-dereference binutils-2.34/ld/testsuite/ld-plugin/plugin-7.d binutils-2.34-new/ld/testsuite/ld-plugin/plugin-7.d ---- binutils-2.34/ld/testsuite/ld-plugin/plugin-7.d 2020-01-18 14:55:48.000000000 +0100 -+++ binutils-2.34-new/ld/testsuite/ld-plugin/plugin-7.d 2020-12-18 02:57:20.374034839 +0100 +diff -rupN --no-dereference binutils-2.37/ld/testsuite/ld-plugin/plugin-7.d binutils-2.37-new/ld/testsuite/ld-plugin/plugin-7.d +--- binutils-2.37/ld/testsuite/ld-plugin/plugin-7.d 2021-07-08 13:37:20.000000000 +0200 ++++ binutils-2.37-new/ld/testsuite/ld-plugin/plugin-7.d 2021-07-24 21:59:18.652807453 +0200 @@ -28,7 +28,6 @@ hook called: claim_file tmpdir/func.o \[ hook called: claim_file tmpdir/text.o \[@0/.* not claimed #... @@ -221,9 +236,9 @@ diff -rupN --no-dereference binutils-2.34/ld/testsuite/ld-plugin/plugin-7.d binu +#... hook called: cleanup. #... -diff -rupN --no-dereference binutils-2.34/ld/testsuite/ld-plugin/plugin-8.d binutils-2.34-new/ld/testsuite/ld-plugin/plugin-8.d ---- binutils-2.34/ld/testsuite/ld-plugin/plugin-8.d 2020-01-18 14:55:48.000000000 +0100 -+++ binutils-2.34-new/ld/testsuite/ld-plugin/plugin-8.d 2020-12-18 02:57:20.374034839 +0100 +diff -rupN --no-dereference binutils-2.37/ld/testsuite/ld-plugin/plugin-8.d binutils-2.37-new/ld/testsuite/ld-plugin/plugin-8.d +--- binutils-2.37/ld/testsuite/ld-plugin/plugin-8.d 2021-07-08 13:37:20.000000000 +0200 ++++ binutils-2.37-new/ld/testsuite/ld-plugin/plugin-8.d 2021-07-24 21:59:18.653807444 +0200 @@ -30,9 +30,8 @@ hook called: claim_file tmpdir/func.o \[ hook called: claim_file tmpdir/text.o \[@0/.* not claimed #... @@ -236,9 +251,9 @@ diff -rupN --no-dereference binutils-2.34/ld/testsuite/ld-plugin/plugin-8.d binu +#... hook called: cleanup. #... -diff -rupN --no-dereference binutils-2.34/ld/testsuite/ld-plugin/plugin-9.d binutils-2.34-new/ld/testsuite/ld-plugin/plugin-9.d ---- binutils-2.34/ld/testsuite/ld-plugin/plugin-9.d 2020-01-18 14:55:48.000000000 +0100 -+++ binutils-2.34-new/ld/testsuite/ld-plugin/plugin-9.d 2020-12-18 02:57:20.374034839 +0100 +diff -rupN --no-dereference binutils-2.37/ld/testsuite/ld-plugin/plugin-9.d binutils-2.37-new/ld/testsuite/ld-plugin/plugin-9.d +--- binutils-2.37/ld/testsuite/ld-plugin/plugin-9.d 2021-07-08 13:37:20.000000000 +0200 ++++ binutils-2.37-new/ld/testsuite/ld-plugin/plugin-9.d 2021-07-24 21:59:18.653807444 +0200 @@ -31,7 +31,8 @@ hook called: claim_file tmpdir/func.o \[ hook called: claim_file tmpdir/text.o \[@0/.* not claimed #... @@ -249,9 +264,25 @@ diff -rupN --no-dereference binutils-2.34/ld/testsuite/ld-plugin/plugin-9.d binu +#... hook called: cleanup. #... -diff -rupN --no-dereference binutils-2.34/ld/testsuite/ld-plugin/pr20070.d binutils-2.34-new/ld/testsuite/ld-plugin/pr20070.d ---- binutils-2.34/ld/testsuite/ld-plugin/pr20070.d 2020-01-18 14:55:48.000000000 +0100 -+++ binutils-2.34-new/ld/testsuite/ld-plugin/pr20070.d 2020-12-18 02:57:20.374034839 +0100 +diff -rupN --no-dereference binutils-2.37/ld/testsuite/ld-plugin/plugin.exp binutils-2.37-new/ld/testsuite/ld-plugin/plugin.exp +--- binutils-2.37/ld/testsuite/ld-plugin/plugin.exp 2021-07-08 13:37:20.000000000 +0200 ++++ binutils-2.37-new/ld/testsuite/ld-plugin/plugin.exp 2021-07-24 21:59:18.653807444 +0200 +@@ -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.37/ld/testsuite/ld-plugin/pr20070.d binutils-2.37-new/ld/testsuite/ld-plugin/pr20070.d +--- binutils-2.37/ld/testsuite/ld-plugin/pr20070.d 2021-07-08 13:37:20.000000000 +0200 ++++ binutils-2.37-new/ld/testsuite/ld-plugin/pr20070.d 2021-07-24 21:59:18.653807444 +0200 @@ -5,5 +5,6 @@ Sym: 'weakdef' Resolution: LDPR_PREVAILI Sym: 'undef' Resolution: LDPR_UNDEF Sym: 'weakundef' Resolution: LDPR_UNDEF @@ -259,9 +290,9 @@ diff -rupN --no-dereference binutils-2.34/ld/testsuite/ld-plugin/pr20070.d binut +#... hook called: cleanup. #... -diff -rupN --no-dereference binutils-2.34/ld/testsuite/ld-srec/srec.exp binutils-2.34-new/ld/testsuite/ld-srec/srec.exp ---- binutils-2.34/ld/testsuite/ld-srec/srec.exp 2020-01-18 14:55:48.000000000 +0100 -+++ binutils-2.34-new/ld/testsuite/ld-srec/srec.exp 2020-12-18 02:57:20.374034839 +0100 +diff -rupN --no-dereference binutils-2.37/ld/testsuite/ld-srec/srec.exp binutils-2.37-new/ld/testsuite/ld-srec/srec.exp +--- binutils-2.37/ld/testsuite/ld-srec/srec.exp 2021-07-08 13:37:20.000000000 +0200 ++++ binutils-2.37-new/ld/testsuite/ld-srec/srec.exp 2021-07-24 21:59:18.654807434 +0200 @@ -21,6 +21,8 @@ # Get the offset from an S-record line to the start of the data. @@ -271,32 +302,3 @@ diff -rupN --no-dereference binutils-2.34/ld/testsuite/ld-srec/srec.exp binutils proc srec_off { l } { if [string match "S1*" $l] { return 8 -diff -rupN --no-dereference binutils-2.34/ld/testsuite/ld-x86-64/x86-64.exp binutils-2.34-new/ld/testsuite/ld-x86-64/x86-64.exp ---- binutils-2.34/ld/testsuite/ld-x86-64/x86-64.exp 2020-01-18 14:55:48.000000000 +0100 -+++ binutils-2.34-new/ld/testsuite/ld-x86-64/x86-64.exp 2020-12-18 02:57:20.374034839 +0100 -@@ -1322,25 +1322,6 @@ if { [isnative] && [check_compiler_avail - "$NOPIE_CFLAGS" \ - ] \ - ] -- } else { -- run_cc_link_tests [list \ -- [list \ -- "Build pr22001-1b" \ -- "$NOPIE_LDFLAGS -Wl,-z,nocopyreloc,--no-as-needed tmpdir/pr22001-1.so" \ -- "$NOPIE_CFLAGS -Wa,-mx86-used-note=yes" \ -- { pr22001-1c.c } \ -- {{error_output "pr22001-1b.err"}} \ -- "pr22001-1b" \ -- ] \ -- [list \ -- "Build pr21997-1b" \ -- "$NOPIE_LDFLAGS -Wl,--no-as-needed tmpdir/pr21997-1.so" \ -- "$NOPIE_CFLAGS -Wa,-mx86-used-note=yes" \ -- { pr21997-1c.c } \ -- {{error_output "pr21997-1b.err"}} \ -- "pr21997-1b" \ -- ] \ -- ] - } - - run_ld_link_exec_tests [list \ diff --git a/binutils-gcc-10-fixes.patch b/binutils-gcc-10-fixes.patch new file mode 100644 index 0000000..4233279 --- /dev/null +++ b/binutils-gcc-10-fixes.patch @@ -0,0 +1,180 @@ +diff -rup binutils.orig/gold/gdb-index.cc binutils-2.34.0/gold/gdb-index.cc +--- binutils.orig/gold/gdb-index.cc 2020-07-24 09:12:29.241306445 +0100 ++++ binutils-2.34.0/gold/gdb-index.cc 2020-07-24 09:15:48.332095898 +0100 +@@ -817,7 +817,7 @@ Gdb_index_info_reader::get_qualified_nam + void + Gdb_index_info_reader::record_cu_ranges(Dwarf_die* die) + { +- unsigned int shndx; ++ unsigned int shndx = 0; + unsigned int shndx2; + + off_t ranges_offset = die->ref_attribute(elfcpp::DW_AT_ranges, &shndx); +diff -rup binutils.orig/gold/layout.cc binutils-2.34.0/gold/layout.cc +--- binutils.orig/gold/layout.cc 2020-07-24 09:12:29.243306433 +0100 ++++ binutils-2.34.0/gold/layout.cc 2020-07-24 09:15:11.464320064 +0100 +@@ -1986,7 +1986,7 @@ Layout::attach_allocated_section_to_segm + seg_flags |= os->extra_segment_flags(); + + // Check for --section-start. +- uint64_t addr; ++ uint64_t addr = 0; + bool is_address_set = parameters->options().section_start(os->name(), &addr); + + // In general the only thing we really care about for PT_LOAD +diff -rup binutils.orig/binutils/dlltool.c binutils-2.34.0/binutils/dlltool.c +--- binutils.orig/binutils/dlltool.c 2020-07-24 09:12:28.974308069 +0100 ++++ binutils-2.34.0/binutils/dlltool.c 2020-07-24 12:09:37.527121295 +0100 +@@ -1305,7 +1305,7 @@ run (const char *what, char *args) + int pid, wait_status; + int i; + const char **argv; +- char *errmsg_fmt, *errmsg_arg; ++ char *errmsg_fmt = "", *errmsg_arg = ""; + char *temp_base = choose_temp_base (); + + inform (_("run: %s %s"), what, args); +diff -rup binutils.orig/gas/config/tc-arm.c binutils-2.34.0/gas/config/tc-arm.c +--- binutils.orig/gas/config/tc-arm.c 2020-07-24 09:12:32.368287432 +0100 ++++ binutils-2.34.0/gas/config/tc-arm.c 2020-07-24 12:14:19.842360634 +0100 +@@ -28416,9 +28416,12 @@ md_apply_fix (fixS * fixP, + perform relaxation. */ + if (value == -2) + { +- newval = md_chars_to_number (buf, THUMB_SIZE); +- newval = 0xbf00; /* NOP encoding T1 */ +- md_number_to_chars (buf, newval, THUMB_SIZE); ++ if (fixP->fx_done || !seg->use_rela_p) ++ { ++ newval = md_chars_to_number (buf, THUMB_SIZE); ++ newval = 0xbf00; /* NOP encoding T1 */ ++ md_number_to_chars (buf, newval, THUMB_SIZE); ++ } + } + else + { +@@ -28631,17 +28634,14 @@ md_apply_fix (fixS * fixP, + case BFD_RELOC_ARM_GOTFUNCDESC: + case BFD_RELOC_ARM_GOTOFFFUNCDESC: + case BFD_RELOC_ARM_FUNCDESC: +- if (arm_fdpic) +- { +- if (fixP->fx_done || !seg->use_rela_p) +- md_number_to_chars (buf, 0, 4); +- } +- else ++ if (!arm_fdpic) + { + as_bad_where (fixP->fx_file, fixP->fx_line, + _("Relocation supported only in FDPIC mode")); +- } +- break; ++ break; ++ } ++ value = 0; ++ /* Fall through. */ + #endif + + case BFD_RELOC_RVA: +diff -rup binutils.orig/gas/config/tc-arm.c binutils-2.34.0/gas/config/tc-arm.c +--- binutils.orig/gas/config/tc-arm.c 2020-07-24 12:16:02.099719884 +0100 ++++ binutils-2.34.0/gas/config/tc-arm.c 2020-07-24 12:34:17.690858328 +0100 +@@ -28641,7 +28641,7 @@ md_apply_fix (fixS * fixP, + break; + } + value = 0; +- /* Fall through. */ ++ goto fred; + #endif + + case BFD_RELOC_RVA: +@@ -28653,6 +28653,7 @@ md_apply_fix (fixS * fixP, + #ifdef TE_PE + case BFD_RELOC_32_SECREL: + #endif ++ fred: + if (fixP->fx_done || !seg->use_rela_p) + #ifdef TE_WINCE + /* For WinCE we only do this for pcrel fixups. */ +diff -rup binutils.orig/gas/config/tc-arm.c binutils-2.34.0/gas/config/tc-arm.c +--- binutils.orig/gas/config/tc-arm.c 2020-07-24 13:28:26.926553452 +0100 ++++ binutils-2.34.0/gas/config/tc-arm.c 2020-07-24 13:31:57.835215763 +0100 +@@ -28416,12 +28416,8 @@ md_apply_fix (fixS * fixP, + perform relaxation. */ + if (value == -2) + { +- if (fixP->fx_done || !seg->use_rela_p) +- { +- newval = md_chars_to_number (buf, THUMB_SIZE); +- newval = 0xbf00; /* NOP encoding T1 */ +- md_number_to_chars (buf, newval, THUMB_SIZE); +- } ++ newval = 0xbf00; /* NOP encoding T1 */ ++ goto jim; + } + else + { +@@ -28432,6 +28428,7 @@ md_apply_fix (fixS * fixP, + { + newval = md_chars_to_number (buf, THUMB_SIZE); + newval |= ((value & 0x3e) << 2) | ((value & 0x40) << 3); ++ jim: + md_number_to_chars (buf, newval, THUMB_SIZE); + } + } +diff -rup binutils.orig/binutils/mclex.c binutils-2.34.0/binutils/mclex.c +--- binutils.orig/binutils/mclex.c 2020-07-24 13:28:26.297557441 +0100 ++++ binutils-2.34.0/binutils/mclex.c 2020-07-24 14:46:53.587940149 +0100 +@@ -207,7 +207,7 @@ enum_severity (int e) + static void + mc_add_keyword_ascii (const char *sz, int rid, const char *grp, rc_uint_type nv, const char *sv) + { +- unichar *usz, *usv = NULL; ++ unichar *usz = NULL, *usv = NULL; + rc_uint_type usz_len; + + unicode_from_codepage (&usz_len, &usz, sz, CP_ACP); +diff -rup binutils.orig/binutils/windmc.c binutils-2.34.0/binutils/windmc.c +--- binutils.orig/binutils/windmc.c 2020-07-24 13:28:26.279557556 +0100 ++++ binutils-2.34.0/binutils/windmc.c 2020-07-24 14:48:05.460477478 +0100 +@@ -338,7 +338,7 @@ mc_add_node_lang (mc_node *root, const m + static char * + convert_unicode_to_ACP (const unichar *usz) + { +- char *s; ++ char *s = NULL; + rc_uint_type l; + + if (! usz) +@@ -607,10 +607,10 @@ mc_generate_bin_item (mc_node_lang *n, r + else + { + rc_uint_type txt_len, l; +- char *cvt_txt; ++ char *cvt_txt = NULL; + + codepage_from_unicode( &l, n->message, &cvt_txt, n->lang->lang_info.wincp); +- if (! cvt_txt) ++ if (cvt_txt == NULL) + fatal ("Failed to convert message to language codepage.\n"); + txt_len = strlen (cvt_txt); + if (mcset_automatic_null_termination && txt_len > 0) +@@ -1107,7 +1107,7 @@ main (int argc, char **argv) + + /* Load the input file and do code page transformations to UTF16. */ + { +- unichar *u; ++ unichar *u = NULL; + rc_uint_type ul; + char *buff; + bfd_size_type flen; +--- binutils.orig/binutils/srconv.c 2020-07-24 15:37:25.847459208 +0100 ++++ binutils-2.34.0/binutils/srconv.c 2020-07-24 15:39:12.853773423 +0100 +@@ -316,6 +316,7 @@ wr_hd (struct coff_ofile *p) + struct IT_hd hd; + + hd.spare1 = 0; ++ hd.spare2 = 0; + if (bfd_get_file_flags (abfd) & EXEC_P) + hd.mt = MTYPE_ABS_LM; + else diff --git a/binutils-gdb.git-014cc7f849e8209623fc99264814bce7b3b6faf2.patch b/binutils-gdb.git-014cc7f849e8209623fc99264814bce7b3b6faf2.patch deleted file mode 100644 index 5f59a7d..0000000 --- a/binutils-gdb.git-014cc7f849e8209623fc99264814bce7b3b6faf2.patch +++ /dev/null @@ -1,368 +0,0 @@ -From 014cc7f849e8209623fc99264814bce7b3b6faf2 Mon Sep 17 00:00:00 2001 -From: Siddhesh Poyarekar -Date: Mon, 7 Dec 2020 20:48:33 +0530 -Subject: [PATCH] binutils: Make smart_rename safe too - -smart_rename is capable of handling symlinks by copying and it also -tries to preserve ownership and permissions of files when they're -overwritten during the rename. This is useful in objcopy where the -file properties need to be preserved. - -However because smart_rename does this using file names, it leaves a -race window between renames and permission fixes. This change removes -this race window by using file descriptors from the original BFDs that -were used to manipulate these files wherever possible. - -The file that is to be renamed is also passed as a file descriptor so -that we use fchown/fchmod on the file descriptor, thus making sure -that we only modify the file we have opened to write. Further, in -case the file is to be overwritten (as is the case in ar or objcopy), -the permissions that need to be restored are taken from the file -descriptor that was opened for input so that integrity of the file -status is maintained all the way through to the rename. - -binutils/ - - * rename.c - * ar.c - (write_archive) [!defined (_WIN32) || defined (__CYGWIN32__)]: - Initialize TARGET_STAT and OFD to pass to SMART_RENAME. - * arsup.c - (ar_save) [defined (_WIN32) || defined (__CYGWIN32__)]: - Likewise. - * bucomm.h (smart_rename): Add new arguments to declaration. - * objcopy.c - (strip_main)[defined (_WIN32) || defined (__CYGWIN32__)]: - Initialize COPYFD and pass to SMART_RENAME. - (copy_main) [defined (_WIN32) || defined (__CYGWIN32__)]: - Likewise. - * rename.c (try_preserve_permissions): New function. - (smart_rename): Use it and add new arguments. ---- - binutils/ChangeLog | 18 ++++++++ - binutils/ar.c | 12 +++++- - binutils/arsup.c | 14 ++++++- - binutils/bucomm.h | 3 +- - binutils/objcopy.c | 42 +++++++++++++++---- - binutils/rename.c | 101 +++++++++++++++++++++++++++++++-------------- - 6 files changed, 148 insertions(+), 42 deletions(-) - -diff --git a/binutils/ar.c b/binutils/ar.c -index 225324208bd..6598dd9012c 100644 ---- a/binutils/ar.c -+++ b/binutils/ar.c -@@ -1254,6 +1254,8 @@ write_archive (bfd *iarch) - char *old_name, *new_name; - bfd *contents_head = iarch->archive_next; - int ofd = -1; -+ struct stat target_stat; -+ bfd_boolean skip_stat = FALSE; - - old_name = (char *) xmalloc (strlen (bfd_get_filename (iarch)) + 1); - strcpy (old_name, bfd_get_filename (iarch)); -@@ -1299,6 +1301,14 @@ write_archive (bfd *iarch) - if (!bfd_set_archive_head (obfd, contents_head)) - bfd_fatal (old_name); - -+#if !defined (_WIN32) || defined (__CYGWIN32__) -+ ofd = dup (ofd); -+ if (iarch == NULL || iarch->iostream == NULL) -+ skip_stat = TRUE; -+ else if (ofd == -1 || fstat (fileno (iarch->iostream), &target_stat) != 0) -+ bfd_fatal (old_name); -+#endif -+ - if (!bfd_close (obfd)) - bfd_fatal (old_name); - -@@ -1308,7 +1318,7 @@ write_archive (bfd *iarch) - /* We don't care if this fails; we might be creating the archive. */ - bfd_close (iarch); - -- if (smart_rename (new_name, old_name, 0) != 0) -+ if (smart_rename (new_name, old_name, ofd, skip_stat ? NULL : &target_stat, 0) != 0) - xexit (1); - free (old_name); - free (new_name); -diff --git a/binutils/arsup.c b/binutils/arsup.c -index a668f270f1a..8b4437ff417 100644 ---- a/binutils/arsup.c -+++ b/binutils/arsup.c -@@ -345,13 +345,25 @@ ar_save (void) - else - { - char *ofilename = xstrdup (bfd_get_filename (obfd)); -+ bfd_boolean skip_stat = FALSE; -+ struct stat target_stat; -+ int ofd = -1; - - if (deterministic > 0) - obfd->flags |= BFD_DETERMINISTIC_OUTPUT; - -+#if !defined (_WIN32) || defined (__CYGWIN32__) -+ /* It's OK to fail; at worst it will result in SMART_RENAME using a slow -+ copy fallback to write the output. */ -+ ofd = dup (fileno (obfd->iostream)); -+ if (lstat (real_name, &target_stat) != 0) -+ skip_stat = TRUE; -+#endif -+ - bfd_close (obfd); - -- smart_rename (ofilename, real_name, 0); -+ smart_rename (ofilename, real_name, ofd, -+ skip_stat ? NULL : &target_stat, 0); - obfd = 0; - free (ofilename); - } -diff --git a/binutils/bucomm.h b/binutils/bucomm.h -index afb8e09c2fd..9613b922d5d 100644 ---- a/binutils/bucomm.h -+++ b/binutils/bucomm.h -@@ -71,7 +71,8 @@ extern void print_version (const char *); - /* In rename.c. */ - extern void set_times (const char *, const struct stat *); - --extern int smart_rename (const char *, const char *, int); -+extern int smart_rename (const char *, const char *, int, struct stat *, int); -+ - - /* In libiberty. */ - void *xmalloc (size_t); -diff --git a/binutils/objcopy.c b/binutils/objcopy.c -index b6cf6ea4baa..04ba95ec140 100644 ---- a/binutils/objcopy.c -+++ b/binutils/objcopy.c -@@ -4815,6 +4815,7 @@ strip_main (int argc, char *argv[]) - struct stat statbuf; - char *tmpname; - int tmpfd = -1; -+ int copyfd = -1; - - if (get_file_size (argv[i]) < 1) - { -@@ -4828,7 +4829,12 @@ strip_main (int argc, char *argv[]) - else - tmpname = output_file; - -- if (tmpname == NULL) -+ if (tmpname == NULL -+#if !defined (_WIN32) || defined (__CYGWIN32__) -+ /* Retain a copy of TMPFD since we will need it for SMART_RENAME. */ -+ || (tmpfd >= 0 && (copyfd = dup (tmpfd)) == -1) -+#endif -+ ) - { - bfd_nonfatal_message (argv[i], NULL, NULL, - _("could not create temporary file to hold stripped copy")); -@@ -4846,12 +4852,18 @@ strip_main (int argc, char *argv[]) - if (output_file != tmpname) - status = (smart_rename (tmpname, - output_file ? output_file : argv[i], -- preserve_dates) != 0); -+ copyfd, &statbuf, preserve_dates) != 0); - if (status == 0) - status = hold_status; - } - else -- unlink_if_ordinary (tmpname); -+ { -+#if !defined (_WIN32) || defined (__CYGWIN32__) -+ if (copyfd >= 0) -+ close (copyfd); -+#endif -+ unlink_if_ordinary (tmpname); -+ } - if (output_file != tmpname) - free (tmpname); - } -@@ -5059,6 +5071,7 @@ copy_main (int argc, char *argv[]) - bfd_boolean use_globalize = FALSE; - bfd_boolean use_keep_global = FALSE; - int c, tmpfd = -1; -+ int copyfd = -1; - struct stat statbuf; - const bfd_arch_info_type *input_arch = NULL; - -@@ -5903,9 +5916,16 @@ copy_main (int argc, char *argv[]) - else - tmpname = output_filename; - -- if (tmpname == NULL) -- fatal (_("warning: could not create temporary file whilst copying '%s', (error: %s)"), -- input_filename, strerror (errno)); -+ if (tmpname == NULL -+#if !defined (_WIN32) || defined (__CYGWIN32__) -+ /* Retain a copy of TMPFD since we will need it for SMART_RENAME. */ -+ || (tmpfd >= 0 && (copyfd = dup (tmpfd)) == -1) -+#endif -+ ) -+ { -+ fatal (_("warning: could not create temporary file whilst copying '%s', (error: %s)"), -+ input_filename, strerror (errno)); -+ } - - copy_file (input_filename, tmpname, tmpfd, &statbuf, input_target, - output_target, input_arch); -@@ -5914,11 +5934,17 @@ copy_main (int argc, char *argv[]) - if (preserve_dates) - set_times (tmpname, &statbuf); - if (tmpname != output_filename) -- status = (smart_rename (tmpname, input_filename, -+ status = (smart_rename (tmpname, input_filename, copyfd, &statbuf, - preserve_dates) != 0); - } - else -- unlink_if_ordinary (tmpname); -+ { -+#if !defined (_WIN32) || defined (__CYGWIN32__) -+ if (copyfd >= 0) -+ close (copyfd); -+#endif -+ unlink_if_ordinary (tmpname); -+ } - - if (tmpname != output_filename) - free (tmpname); -diff --git a/binutils/rename.c b/binutils/rename.c -index bf3b68d0462..6b9165ea1c9 100644 ---- a/binutils/rename.c -+++ b/binutils/rename.c -@@ -131,17 +131,55 @@ set_times (const char *destination, const struct stat *statbuf) - #endif - #endif - --/* Rename FROM to TO, copying if TO is a link. -- Return 0 if ok, -1 if error. */ -+#if !defined (_WIN32) || defined (__CYGWIN32__) -+/* Try to preserve the permission bits and ownership of an existing file when -+ rename overwrites it. FD is the file being renamed and TARGET_STAT has the -+ status of the file that was overwritten. */ -+static void -+try_preserve_permissions (int fd, struct stat *target_stat) -+{ -+ struct stat from_stat; -+ int ret = 0; -+ -+ if (fstat (fd, &from_stat) != 0) -+ return; -+ -+ int from_mode = from_stat.st_mode & 0777; -+ int to_mode = target_stat->st_mode & 0777; -+ -+ /* Fix up permissions before we potentially lose ownership with fchown. -+ Clear the setxid bits because in case the fchown below fails then we don't -+ want to end up with a sxid file owned by the invoking user. If the user -+ hasn't changed or if fchown succeeded, we add back the sxid bits at the -+ end. */ -+ if (from_mode != to_mode) -+ fchmod (fd, to_mode); -+ -+ /* Fix up ownership, this will clear the setxid bits. */ -+ if (from_stat.st_uid != target_stat->st_uid -+ || from_stat.st_gid != target_stat->st_gid) -+ ret = fchown (fd, target_stat->st_uid, target_stat->st_gid); -+ -+ /* Fix up the sxid bits if either the fchown wasn't needed or it -+ succeeded. */ -+ if (ret == 0) -+ fchmod (fd, target_stat->st_mode & 07777); -+} -+#endif -+ -+/* Rename FROM to TO, copying if TO is either a link or is not a regular file. -+ FD is an open file descriptor pointing to FROM that we can use to safely fix -+ up permissions of the file after renaming. TARGET_STAT has the file status -+ that is used to fix up permissions and timestamps after rename. Return 0 if -+ ok, -1 if error and FD is closed before returning. */ - - int --smart_rename (const char *from, const char *to, int preserve_dates ATTRIBUTE_UNUSED) -+smart_rename (const char *from, const char *to, int fd ATTRIBUTE_UNUSED, -+ struct stat *target_stat ATTRIBUTE_UNUSED, -+ int preserve_dates ATTRIBUTE_UNUSED) - { -- bfd_boolean exists; -- struct stat s; - int ret = 0; -- -- exists = lstat (to, &s) == 0; -+ bfd_boolean exists = target_stat != NULL; - - #if defined (_WIN32) && !defined (__CYGWIN32__) - /* Win32, unlike unix, will not erase `to' in `rename(from, to)' but -@@ -158,36 +196,35 @@ smart_rename (const char *from, const char *to, int preserve_dates ATTRIBUTE_UNU - unlink (from); - } - #else -- /* Use rename only if TO is not a symbolic link and has -- only one hard link, and we have permission to write to it. */ -+ /* Avoid a full copy and use rename if we can fix up permissions of the -+ file after renaming, i.e.: -+ -+ - TO is not a symbolic link -+ - TO is a regular file with only one hard link -+ - We have permission to write to TO -+ - FD is available to safely fix up permissions to be the same as the file -+ we overwrote with the rename. -+ -+ Note though that the actual file on disk that TARGET_STAT describes may -+ have changed and we're only trying to preserve the status we know about. -+ At no point do we try to interact with the new file changes, so there can -+ only be two outcomes, i.e. either the external file change survives -+ without knowledge of our change (if it happens after the rename syscall) -+ or our rename and permissions fixup survive without any knowledge of the -+ external change. */ - if (! exists -- || (!S_ISLNK (s.st_mode) -- && S_ISREG (s.st_mode) -- && (s.st_mode & S_IWUSR) -- && s.st_nlink == 1) -+ || (fd >= 0 -+ && !S_ISLNK (target_stat->st_mode) -+ && S_ISREG (target_stat->st_mode) -+ && (target_stat->st_mode & S_IWUSR) -+ && target_stat->st_nlink == 1) - ) - { - ret = rename (from, to); - if (ret == 0) - { - if (exists) -- { -- /* Try to preserve the permission bits and ownership of -- TO. First get the mode right except for the setuid -- bit. Then change the ownership. Then fix the setuid -- bit. We do the chmod before the chown because if the -- chown succeeds, and we are a normal user, we won't be -- able to do the chmod afterward. We don't bother to -- fix the setuid bit first because that might introduce -- a fleeting security problem, and because the chown -- will clear the setuid bit anyhow. We only fix the -- setuid bit if the chown succeeds, because we don't -- want to introduce an unexpected setuid file owned by -- the user running objcopy. */ -- chmod (to, s.st_mode & 0777); -- if (chown (to, s.st_uid, s.st_gid) >= 0) -- chmod (to, s.st_mode & 07777); -- } -+ try_preserve_permissions (fd, target_stat); - } - else - { -@@ -203,9 +240,11 @@ smart_rename (const char *from, const char *to, int preserve_dates ATTRIBUTE_UNU - non_fatal (_("unable to copy file '%s'; reason: %s"), to, strerror (errno)); - - if (preserve_dates) -- set_times (to, &s); -+ set_times (to, target_stat); - unlink (from); - } -+ if (fd >= 0) -+ close (fd); - #endif /* _WIN32 && !__CYGWIN32__ */ - - return ret; --- -2.27.0 - diff --git a/binutils-gdb.git-1a1c3b4cc17687091cff5a368bd6f13742bcfdf8.patch b/binutils-gdb.git-1a1c3b4cc17687091cff5a368bd6f13742bcfdf8.patch deleted file mode 100644 index 2b86ca9..0000000 --- a/binutils-gdb.git-1a1c3b4cc17687091cff5a368bd6f13742bcfdf8.patch +++ /dev/null @@ -1,96 +0,0 @@ -From 1a1c3b4cc17687091cff5a368bd6f13742bcfdf8 Mon Sep 17 00:00:00 2001 -From: Siddhesh Poyarekar -Date: Mon, 7 Dec 2020 20:48:28 +0530 -Subject: [PATCH] objcopy: Get input file stat after BFD open - -Get file state from the descriptor opened by copy_file for the input -BFD. This ensures continuity in the view of the input file through -the descriptor. At the moment it is only to preserve timestamps -recorded at the point that we opened the file for input but in the -next patch this state will also be used to preserve ownership and -permissions wherever applicable. - -binutils/ - - * objcopy.c (copy_file): New argument IN_STAT. Return stat of - ibfd through it. - (strip_main): Remove redundant stat calls. adjust copy_file - calls. - (copy_main): Likewise. ---- - binutils/ChangeLog | 9 +++++++++ - binutils/objcopy.c | 23 +++++++---------------- - 2 files changed, 16 insertions(+), 16 deletions(-) - -diff --git a/binutils/objcopy.c b/binutils/objcopy.c -index 2eb083c3769..b6cf6ea4baa 100644 ---- a/binutils/objcopy.c -+++ b/binutils/objcopy.c -@@ -3729,8 +3729,8 @@ set_long_section_mode (bfd *output_bfd, bfd *input_bfd, enum long_section_name_h - - static void - copy_file (const char *input_filename, const char *output_filename, int ofd, -- const char *input_target, const char *output_target, -- const bfd_arch_info_type *input_arch) -+ struct stat *in_stat, const char *input_target, -+ const char *output_target, const bfd_arch_info_type *input_arch) - { - bfd *ibfd; - char **obj_matching; -@@ -3749,7 +3749,7 @@ copy_file (const char *input_filename, const char *output_filename, int ofd, - /* To allow us to do "strip *" without dying on the first - non-object file, failures are nonfatal. */ - ibfd = bfd_openr (input_filename, input_target); -- if (ibfd == NULL) -+ if (ibfd == NULL || fstat (fileno (ibfd->iostream), in_stat) != 0) - { - bfd_nonfatal_message (input_filename, NULL, NULL, NULL); - status = 1; -@@ -4822,11 +4822,6 @@ strip_main (int argc, char *argv[]) - continue; - } - -- if (preserve_dates) -- /* No need to check the return value of stat(). -- It has already been checked in get_file_size(). */ -- stat (argv[i], &statbuf); -- - if (output_file == NULL - || filename_cmp (argv[i], output_file) == 0) - tmpname = make_tempname (argv[i], &tmpfd); -@@ -4842,7 +4837,8 @@ strip_main (int argc, char *argv[]) - } - - status = 0; -- copy_file (argv[i], tmpname, tmpfd, input_target, output_target, NULL); -+ copy_file (argv[i], tmpname, tmpfd, &statbuf, input_target, -+ output_target, NULL); - if (status == 0) - { - if (preserve_dates) -@@ -5899,11 +5895,6 @@ copy_main (int argc, char *argv[]) - convert_efi_target (efi); - } - -- if (preserve_dates) -- if (stat (input_filename, & statbuf) < 0) -- fatal (_("warning: could not locate '%s'. System error message: %s"), -- input_filename, strerror (errno)); -- - /* If there is no destination file, or the source and destination files - are the same, then create a temp and rename the result into the input. */ - if (output_filename == NULL -@@ -5916,8 +5907,8 @@ copy_main (int argc, char *argv[]) - fatal (_("warning: could not create temporary file whilst copying '%s', (error: %s)"), - input_filename, strerror (errno)); - -- copy_file (input_filename, tmpname, tmpfd, input_target, output_target, -- input_arch); -+ copy_file (input_filename, tmpname, tmpfd, &statbuf, input_target, -+ output_target, input_arch); - if (status == 0) - { - if (preserve_dates) --- -2.27.0 - diff --git a/binutils-gdb.git-365f5fb6d0f0da83817431a275e99e6f6babbe04.patch b/binutils-gdb.git-365f5fb6d0f0da83817431a275e99e6f6babbe04.patch deleted file mode 100644 index 40e4b39..0000000 --- a/binutils-gdb.git-365f5fb6d0f0da83817431a275e99e6f6babbe04.patch +++ /dev/null @@ -1,287 +0,0 @@ -From 365f5fb6d0f0da83817431a275e99e6f6babbe04 Mon Sep 17 00:00:00 2001 -From: Siddhesh Poyarekar -Date: Mon, 7 Dec 2020 20:48:23 +0530 -Subject: [PATCH] binutils: Use file descriptors from make_tempname - -The purpose of creating a temporary file securely using mkstemp is -defeated if it is closed in make_tempname and reopened later for use; -it is as good as using mktemp. Get the file descriptor instead and -then use it to create the BFD object. - -bfd/ - - * opncls.c (bfd_fdopenw): New function. - * bfd-in2.h: Regenerate. - -binutils/ - - * bucomm.c (make_tempname): Add argument to return file - descriptor. - * bucomm.h (make_tempname): Likewise. - * ar.c: Include libbfd.h. - (write_archive): Adjust for change in make_tempname. Call - bfd_fdopenw instead of bfd_openw. - * objcopy.c: Include libbfd.h. - (copy_file): New argument OFD. Use bfd_fdopenw instead of - bfd_openw. - (strip_main): Adjust for change in make_tempname and - copy_file. - (copy_main): Likewise. ---- - bfd/ChangeLog | 6 ++++++ - bfd/bfd-in2.h | 2 ++ - bfd/opncls.c | 33 +++++++++++++++++++++++++++++++++ - binutils/ChangeLog | 17 +++++++++++++++++ - binutils/ar.c | 11 ++++++++--- - binutils/bucomm.c | 4 ++-- - binutils/bucomm.h | 2 +- - binutils/objcopy.c | 30 ++++++++++++++++++++++-------- - 8 files changed, 91 insertions(+), 14 deletions(-) - -diff --git a/bfd/bfd-in2.h b/bfd/bfd-in2.h -index 935ba535b54..48e3d9b6647 100644 ---- a/bfd/bfd-in2.h -+++ b/bfd/bfd-in2.h -@@ -588,6 +588,8 @@ bfd *bfd_openr (const char *filename, const char *target); - - bfd *bfd_fdopenr (const char *filename, const char *target, int fd); - -+bfd *bfd_fdopenw (const char *filename, const char *target, int fd); -+ - bfd *bfd_openstreamr (const char * filename, const char * target, - void * stream); - -diff --git a/bfd/opncls.c b/bfd/opncls.c -index c2a1d2fa4df..f7696b658ca 100644 ---- a/bfd/opncls.c -+++ b/bfd/opncls.c -@@ -393,6 +393,39 @@ bfd_fdopenr (const char *filename, const char *target, int fd) - return bfd_fopen (filename, target, mode, fd); - } - -+/* -+FUNCTION -+ bfd_fdopenw -+ -+SYNOPSIS -+ bfd *bfd_fdopenw (const char *filename, const char *target, int fd); -+ -+DESCRIPTION -+ <> is exactly like <> with the exception that -+ the resulting BFD is suitable for output. -+*/ -+ -+bfd * -+bfd_fdopenw (const char *filename, const char *target, int fd) -+{ -+ bfd *out = bfd_fdopenr (filename, target, fd); -+ -+ if (out != NULL) -+ { -+ if (!bfd_write_p (out)) -+ { -+ close (fd); -+ _bfd_delete_bfd (out); -+ out = NULL; -+ bfd_set_error (bfd_error_invalid_operation); -+ } -+ else -+ out->direction = write_direction; -+ } -+ -+ return out; -+} -+ - /* - FUNCTION - bfd_openstreamr -diff --git a/binutils/ar.c b/binutils/ar.c -index 7d279d6722a..225324208bd 100644 ---- a/binutils/ar.c -+++ b/binutils/ar.c -@@ -25,6 +25,7 @@ - - #include "sysdep.h" - #include "bfd.h" -+#include "libbfd.h" - #include "libiberty.h" - #include "progress.h" - #include "getopt.h" -@@ -1252,20 +1253,24 @@ write_archive (bfd *iarch) - bfd *obfd; - char *old_name, *new_name; - bfd *contents_head = iarch->archive_next; -+ int ofd = -1; - - old_name = (char *) xmalloc (strlen (bfd_get_filename (iarch)) + 1); - strcpy (old_name, bfd_get_filename (iarch)); -- new_name = make_tempname (old_name); -+ new_name = make_tempname (old_name, &ofd); - - if (new_name == NULL) - bfd_fatal (_("could not create temporary file whilst writing archive")); - - output_filename = new_name; - -- obfd = bfd_openw (new_name, bfd_get_target (iarch)); -+ obfd = bfd_fdopenw (new_name, bfd_get_target (iarch), ofd); - - if (obfd == NULL) -- bfd_fatal (old_name); -+ { -+ close (ofd); -+ bfd_fatal (old_name); -+ } - - output_bfd = obfd; - -diff --git a/binutils/bucomm.c b/binutils/bucomm.c -index 9e6a02843e6..53244201f89 100644 ---- a/binutils/bucomm.c -+++ b/binutils/bucomm.c -@@ -532,7 +532,7 @@ template_in_dir (const char *path) - as FILENAME. */ - - char * --make_tempname (const char *filename) -+make_tempname (const char *filename, int *ofd) - { - char *tmpname = template_in_dir (filename); - int fd; -@@ -550,7 +550,7 @@ make_tempname (const char *filename) - free (tmpname); - return NULL; - } -- close (fd); -+ *ofd = fd; - return tmpname; - } - -diff --git a/binutils/bucomm.h b/binutils/bucomm.h -index d8318343f78..afb8e09c2fd 100644 ---- a/binutils/bucomm.h -+++ b/binutils/bucomm.h -@@ -51,7 +51,7 @@ int display_info (void); - - void print_arelt_descr (FILE *, bfd *, bfd_boolean, bfd_boolean); - --char *make_tempname (const char *); -+char *make_tempname (const char *, int *); - char *make_tempdir (const char *); - - bfd_vma parse_vma (const char *, const char *); -diff --git a/binutils/objcopy.c b/binutils/objcopy.c -index ca35df03b66..2eb083c3769 100644 ---- a/binutils/objcopy.c -+++ b/binutils/objcopy.c -@@ -20,6 +20,7 @@ - - #include "sysdep.h" - #include "bfd.h" -+#include "libbfd.h" - #include "progress.h" - #include "getopt.h" - #include "libiberty.h" -@@ -3727,7 +3728,7 @@ set_long_section_mode (bfd *output_bfd, bfd *input_bfd, enum long_section_name_h - /* The top-level control. */ - - static void --copy_file (const char *input_filename, const char *output_filename, -+copy_file (const char *input_filename, const char *output_filename, int ofd, - const char *input_target, const char *output_target, - const bfd_arch_info_type *input_arch) - { -@@ -3802,9 +3803,14 @@ copy_file (const char *input_filename, const char *output_filename, - else - force_output_target = TRUE; - -- obfd = bfd_openw (output_filename, output_target); -+ if (ofd >= 0) -+ obfd = bfd_fdopenw (output_filename, output_target, ofd); -+ else -+ obfd = bfd_openw (output_filename, output_target); -+ - if (obfd == NULL) - { -+ close (ofd); - bfd_nonfatal_message (output_filename, NULL, NULL, NULL); - status = 1; - return; -@@ -3832,13 +3838,19 @@ copy_file (const char *input_filename, const char *output_filename, - if (output_target == NULL) - output_target = bfd_get_target (ibfd); - -- obfd = bfd_openw (output_filename, output_target); -+ if (ofd >= 0) -+ obfd = bfd_fdopenw (output_filename, output_target, ofd); -+ else -+ obfd = bfd_openw (output_filename, output_target); -+ - if (obfd == NULL) - { -+ close (ofd); - bfd_nonfatal_message (output_filename, NULL, NULL, NULL); - status = 1; - return; - } -+ - /* This is a no-op on non-Coff targets. */ - set_long_section_mode (obfd, ibfd, long_section_names); - -@@ -4802,6 +4814,7 @@ strip_main (int argc, char *argv[]) - int hold_status = status; - struct stat statbuf; - char *tmpname; -+ int tmpfd = -1; - - if (get_file_size (argv[i]) < 1) - { -@@ -4816,7 +4829,7 @@ strip_main (int argc, char *argv[]) - - if (output_file == NULL - || filename_cmp (argv[i], output_file) == 0) -- tmpname = make_tempname (argv[i]); -+ tmpname = make_tempname (argv[i], &tmpfd); - else - tmpname = output_file; - -@@ -4829,7 +4842,7 @@ strip_main (int argc, char *argv[]) - } - - status = 0; -- copy_file (argv[i], tmpname, input_target, output_target, NULL); -+ copy_file (argv[i], tmpname, tmpfd, input_target, output_target, NULL); - if (status == 0) - { - if (preserve_dates) -@@ -5049,7 +5062,7 @@ copy_main (int argc, char *argv[]) - bfd_boolean formats_info = FALSE; - bfd_boolean use_globalize = FALSE; - bfd_boolean use_keep_global = FALSE; -- int c; -+ int c, tmpfd = -1; - struct stat statbuf; - const bfd_arch_info_type *input_arch = NULL; - -@@ -5895,7 +5908,7 @@ copy_main (int argc, char *argv[]) - are the same, then create a temp and rename the result into the input. */ - if (output_filename == NULL - || filename_cmp (input_filename, output_filename) == 0) -- tmpname = make_tempname (input_filename); -+ tmpname = make_tempname (input_filename, &tmpfd); - else - tmpname = output_filename; - -@@ -5903,7 +5916,8 @@ copy_main (int argc, char *argv[]) - fatal (_("warning: could not create temporary file whilst copying '%s', (error: %s)"), - input_filename, strerror (errno)); - -- copy_file (input_filename, tmpname, input_target, output_target, input_arch); -+ copy_file (input_filename, tmpname, tmpfd, input_target, output_target, -+ input_arch); - if (status == 0) - { - if (preserve_dates) --- -2.27.0 - diff --git a/binutils-gdb.git-6184480d7ce1bcd57669a62867efc68418d0de7c.patch b/binutils-gdb.git-6184480d7ce1bcd57669a62867efc68418d0de7c.patch deleted file mode 100644 index 87f66e3..0000000 --- a/binutils-gdb.git-6184480d7ce1bcd57669a62867efc68418d0de7c.patch +++ /dev/null @@ -1,163 +0,0 @@ -diff -ur binutils-2.34.old/binutils/ar.c binutils-2.34.new/binutils/ar.c ---- binutils-2.34.old/binutils/ar.c 2021-04-26 17:02:01.517211609 +0100 -+++ binutils-2.34.new/binutils/ar.c 2021-04-26 17:03:25.895213701 +0100 -@@ -25,7 +25,6 @@ - - #include "sysdep.h" - #include "bfd.h" --#include "libbfd.h" - #include "libiberty.h" - #include "progress.h" - #include "getopt.h" -@@ -1198,10 +1197,8 @@ - bfd *contents_head = iarch->archive_next; - int ofd = -1; - struct stat target_stat; -- bfd_boolean skip_stat = FALSE; - -- old_name = (char *) xmalloc (strlen (bfd_get_filename (iarch)) + 1); -- strcpy (old_name, bfd_get_filename (iarch)); -+ old_name = xstrdup (bfd_get_filename (iarch)); - new_name = make_tempname (old_name, &ofd); - - if (new_name == NULL) -@@ -1246,11 +1243,9 @@ - - #if !defined (_WIN32) || defined (__CYGWIN32__) - ofd = dup (ofd); -- if (iarch == NULL || iarch->iostream == NULL) -- skip_stat = TRUE; -- else if (ofd == -1 || fstat (fileno (iarch->iostream), &target_stat) != 0) -- bfd_fatal (old_name); - #endif -+ if (ofd == -1 || bfd_stat (iarch, &target_stat) != 0) -+ bfd_fatal (old_name); - - if (!bfd_close (obfd)) - bfd_fatal (old_name); -@@ -1261,7 +1256,7 @@ - /* We don't care if this fails; we might be creating the archive. */ - bfd_close (iarch); - -- if (smart_rename (new_name, old_name, ofd, skip_stat ? NULL : &target_stat, 0) != 0) -+ if (smart_rename (new_name, old_name, ofd, &target_stat, 0) != 0) - xexit (1); - free (old_name); - free (new_name); -diff -ur binutils-2.34.old/binutils/arsup.c binutils-2.34.new/binutils/arsup.c ---- binutils-2.34.old/binutils/arsup.c 2021-04-26 17:02:01.517211609 +0100 -+++ binutils-2.34.new/binutils/arsup.c 2021-04-26 17:04:43.271215620 +0100 -@@ -42,6 +42,8 @@ - - static bfd *obfd; - static char *real_name; -+static char *temp_name; -+static int real_ofd; - static FILE *outfile; - - static void -@@ -149,27 +151,24 @@ - void - ar_open (char *name, int t) - { -- char *tname; -- const char *bname = lbasename (name); -- real_name = name; -- -- /* Prepend tmp- to the beginning, to avoid file-name clashes after -- truncation on filesystems with limited namespaces (DOS). */ -- if (asprintf (&tname, "%.*stmp-%s", (int) (bname - name), name, bname) == -1) -+ real_name = xstrdup (name); -+ temp_name = make_tempname (real_name, &real_ofd); -+ -+ if (temp_name == NULL) - { -- fprintf (stderr, _("%s: Can't allocate memory for temp name (%s)\n"), -+ fprintf (stderr, _("%s: Can't open temporary file (%s)\n"), - program_name, strerror(errno)); - maybequit (); - return; - } - -- obfd = bfd_openw (tname, NULL); -+ obfd = bfd_fdopenw (temp_name, NULL, real_ofd); - - if (!obfd) - { - fprintf (stderr, - _("%s: Can't open output archive %s\n"), -- program_name, tname); -+ program_name, temp_name); - - maybequit (); - } -@@ -344,10 +343,9 @@ - } - else - { -- char *ofilename = xstrdup (bfd_get_filename (obfd)); - bfd_boolean skip_stat = FALSE; - struct stat target_stat; -- int ofd = -1; -+ int ofd = real_ofd; - - if (deterministic > 0) - obfd->flags |= BFD_DETERMINISTIC_OUTPUT; -@@ -355,17 +353,32 @@ - #if !defined (_WIN32) || defined (__CYGWIN32__) - /* It's OK to fail; at worst it will result in SMART_RENAME using a slow - copy fallback to write the output. */ -- ofd = dup (fileno (obfd->iostream)); -- if (lstat (real_name, &target_stat) != 0) -- skip_stat = TRUE; -+ ofd = dup (ofd); - #endif - - bfd_close (obfd); - -- smart_rename (ofilename, real_name, ofd, -+ if (lstat (real_name, &target_stat) != 0) -+ { -+ /* The temp file created in ar_open has mode 0600 as per mkstemp. -+ Create the real empty output file here so smart_rename will -+ update the mode according to the process umask. */ -+ obfd = bfd_openw (real_name, NULL); -+ if (obfd == NULL -+ || bfd_stat (obfd, &target_stat) != 0) -+ skip_stat = TRUE; -+ if (obfd != NULL) -+ { -+ bfd_set_format (obfd, bfd_archive); -+ bfd_close (obfd); -+ } -+ } -+ -+ smart_rename (temp_name, real_name, ofd, - skip_stat ? NULL : &target_stat, 0); - obfd = 0; -- free (ofilename); -+ free (temp_name); -+ free (real_name); - } - } - -diff -ur binutils-2.34.old/binutils/objcopy.c binutils-2.34.new/binutils/objcopy.c ---- binutils-2.34.old/binutils/objcopy.c 2021-04-26 17:02:01.517211609 +0100 -+++ binutils-2.34.new/binutils/objcopy.c 2021-04-26 17:05:17.876216478 +0100 -@@ -20,7 +20,6 @@ - - #include "sysdep.h" - #include "bfd.h" --#include "libbfd.h" - #include "progress.h" - #include "getopt.h" - #include "libiberty.h" -@@ -3704,7 +3703,7 @@ - /* To allow us to do "strip *" without dying on the first - non-object file, failures are nonfatal. */ - ibfd = bfd_openr (input_filename, input_target); -- if (ibfd == NULL || fstat (fileno (ibfd->iostream), in_stat) != 0) -+ if (ibfd == NULL || bfd_stat (ibfd, in_stat) != 0) - { - bfd_nonfatal_message (input_filename, NULL, NULL, NULL); - status = 1; diff --git a/binutils-gold-i386-gnu-property-notes.patch b/binutils-gold-i386-gnu-property-notes.patch new file mode 100644 index 0000000..88955b4 --- /dev/null +++ b/binutils-gold-i386-gnu-property-notes.patch @@ -0,0 +1,192 @@ +diff -rupN --no-dereference binutils-2.37/gold/i386.cc binutils-2.37-new/gold/i386.cc +--- binutils-2.37/gold/i386.cc 2021-07-08 13:37:20.000000000 +0200 ++++ binutils-2.37-new/gold/i386.cc 2021-07-24 21:59:31.051686692 +0200 +@@ -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/binutils-gold-ignore-discarded-note-relocs.patch b/binutils-gold-ignore-discarded-note-relocs.patch deleted file mode 100644 index ab2bc7c..0000000 --- a/binutils-gold-ignore-discarded-note-relocs.patch +++ /dev/null @@ -1,11 +0,0 @@ -diff -rupN --no-dereference binutils-2.34/gold/target-reloc.h binutils-2.34-new/gold/target-reloc.h ---- binutils-2.34/gold/target-reloc.h 2020-01-18 14:55:48.000000000 +0100 -+++ binutils-2.34-new/gold/target-reloc.h 2020-12-18 02:57:18.369041902 +0100 -@@ -136,6 +136,7 @@ class Default_comdat_behavior - if (Layout::is_debug_info_section(name)) - return CB_PRETEND; - if (strcmp(name, ".eh_frame") == 0 -+ || strncmp(name, ".gnu.build.attributes", 21) == 0 // FIXME: We should really be checking the section type for ST_NOTE... - || strcmp(name, ".gcc_except_table") == 0) - return CB_IGNORE; - return CB_ERROR; diff --git a/binutils-gold-mismatched-section-flags.patch b/binutils-gold-mismatched-section-flags.patch index 8496561..b61a90d 100644 --- a/binutils-gold-mismatched-section-flags.patch +++ b/binutils-gold-mismatched-section-flags.patch @@ -1,6 +1,6 @@ -diff -rupN --no-dereference binutils-2.34/gold/layout.cc binutils-2.34-new/gold/layout.cc ---- binutils-2.34/gold/layout.cc 2020-01-18 14:55:48.000000000 +0100 -+++ binutils-2.34-new/gold/layout.cc 2020-12-18 02:57:21.401031221 +0100 +diff -rupN --no-dereference binutils-2.37/gold/layout.cc binutils-2.37-new/gold/layout.cc +--- binutils-2.37/gold/layout.cc 2021-07-08 13:37:20.000000000 +0200 ++++ binutils-2.37-new/gold/layout.cc 2021-07-24 21:59:20.710787409 +0200 @@ -869,6 +869,7 @@ Layout::get_output_section(const char* n && (same_name->flags() & elfcpp::SHF_TLS) == 0) os = same_name; @@ -17,20 +17,3 @@ diff -rupN --no-dereference binutils-2.34/gold/layout.cc binutils-2.34-new/gold/ } if (os == NULL) -diff -rupN --no-dereference binutils-2.34/gold/object.cc binutils-2.34-new/gold/object.cc ---- binutils-2.34/gold/object.cc 2020-01-18 14:55:48.000000000 +0100 -+++ binutils-2.34-new/gold/object.cc 2020-12-18 02:57:21.402031218 +0100 -@@ -1656,6 +1656,13 @@ Sized_relobj_file::do_ - omit[i] = true; - } - -+ // Skip empty sections without flags. -+ if (!(shdr.get_sh_flags() & ~elfcpp::SHF_GROUP) -+ && !shdr.get_sh_size()) -+ { -+ omit[i] = true; -+ } -+ - bool discard = omit[i]; - if (!discard) - { diff --git a/binutils-gold-warn-unsupported.patch b/binutils-gold-warn-unsupported.patch new file mode 100644 index 0000000..e5e4d9e --- /dev/null +++ b/binutils-gold-warn-unsupported.patch @@ -0,0 +1,67 @@ +diff -rupN --no-dereference binutils-2.37/bfd/config.bfd binutils-2.37-new/bfd/config.bfd +--- binutils-2.37/bfd/config.bfd 2021-07-08 13:37:19.000000000 +0200 ++++ binutils-2.37-new/bfd/config.bfd 2021-07-24 21:59:24.914746464 +0200 +@@ -465,7 +465,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 +@@ -1421,7 +1421,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.37/gold/configure binutils-2.37-new/gold/configure +--- binutils-2.37/gold/configure 2021-07-18 18:40:53.000000000 +0200 ++++ binutils-2.37-new/gold/configure 2021-07-24 21:59:24.917746435 +0200 +@@ -5184,7 +5184,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.37/gold/configure.ac binutils-2.37-new/gold/configure.ac +--- binutils-2.37/gold/configure.ac 2021-07-08 13:37:20.000000000 +0200 ++++ binutils-2.37-new/gold/configure.ac 2021-07-24 21:59:24.918746425 +0200 +@@ -181,7 +181,7 @@ for targ in $target $canon_targets; do + . ${srcdir}/configure.tgt + + if test "$targ_obj" = "UNKNOWN"; then +- AC_MSG_ERROR("unsupported target $targ") ++ AC_MSG_WARN("unsupported target $targ") + else + targetobjs="$targetobjs ${targ_obj}.\$(OBJEXT)" + if test "$targ_extra_obj" != ""; then +diff -rupN --no-dereference binutils-2.37/ld/configure.tgt binutils-2.37-new/ld/configure.tgt +--- binutils-2.37/ld/configure.tgt 2021-07-08 13:37:20.000000000 +0200 ++++ binutils-2.37-new/ld/configure.tgt 2021-07-24 21:59:24.919746416 +0200 +@@ -215,7 +215,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 + ;; +@@ -1025,7 +1025,7 @@ z8k-*-coff) targ_emul=z8002 + targ_extra_ofiles= + ;; + *) +- echo 2>&1 "*** ld does not support target ${targ}" ++ echo 2>&1 "*** ld does not support target '${targ}' NO REALLY" + echo 2>&1 "*** see ld/configure.tgt for supported targets" + exit 1 + diff --git a/binutils-2.22.52.0.4-no-config-h-check.patch b/binutils-no-config-h-check.patch similarity index 55% rename from binutils-2.22.52.0.4-no-config-h-check.patch rename to binutils-no-config-h-check.patch index e1d6ed4..9a7bf1e 100644 --- a/binutils-2.22.52.0.4-no-config-h-check.patch +++ b/binutils-no-config-h-check.patch @@ -1,6 +1,6 @@ -diff -rupN --no-dereference binutils-2.34/bfd/bfd-in2.h binutils-2.34-new/bfd/bfd-in2.h ---- binutils-2.34/bfd/bfd-in2.h 2020-01-18 14:55:47.000000000 +0100 -+++ binutils-2.34-new/bfd/bfd-in2.h 2020-12-18 02:57:14.328056141 +0100 +diff -rupN --no-dereference binutils-2.37/bfd/bfd-in2.h binutils-2.37-new/bfd/bfd-in2.h +--- binutils-2.37/bfd/bfd-in2.h 2021-07-08 13:37:19.000000000 +0200 ++++ binutils-2.37-new/bfd/bfd-in2.h 2021-07-24 21:59:03.850951615 +0200 @@ -30,11 +30,6 @@ #ifndef __BFD_H_SEEN__ #define __BFD_H_SEEN__ @@ -13,9 +13,9 @@ diff -rupN --no-dereference binutils-2.34/bfd/bfd-in2.h binutils-2.34-new/bfd/bf #ifdef __cplusplus extern "C" { #endif -diff -rupN --no-dereference binutils-2.34/bfd/bfd-in.h binutils-2.34-new/bfd/bfd-in.h ---- binutils-2.34/bfd/bfd-in.h 2020-01-18 14:55:47.000000000 +0100 -+++ binutils-2.34-new/bfd/bfd-in.h 2020-12-18 02:57:14.329056138 +0100 +diff -rupN --no-dereference binutils-2.37/bfd/bfd-in.h binutils-2.37-new/bfd/bfd-in.h +--- binutils-2.37/bfd/bfd-in.h 2021-07-08 13:37:19.000000000 +0200 ++++ binutils-2.37-new/bfd/bfd-in.h 2021-07-24 21:59:03.851951606 +0200 @@ -23,11 +23,6 @@ #ifndef __BFD_H_SEEN__ #define __BFD_H_SEEN__ diff --git a/binutils-readelf-compression-header-size.patch b/binutils-readelf-compression-header-size.patch deleted file mode 100644 index 6ad24a1..0000000 --- a/binutils-readelf-compression-header-size.patch +++ /dev/null @@ -1,126 +0,0 @@ -diff -rupN --no-dereference binutils-2.34/binutils/readelf.c binutils-2.34-new/binutils/readelf.c ---- binutils-2.34/binutils/readelf.c 2020-12-18 02:57:17.359045461 +0100 -+++ binutils-2.34-new/binutils/readelf.c 2020-12-18 02:57:22.432027590 +0100 -@@ -6714,15 +6714,18 @@ process_section_headers (Filedata * file - { - Elf_Internal_Chdr chdr; - -- (void) get_compression_header (&chdr, buf, sizeof (buf)); -- -- if (chdr.ch_type == ELFCOMPRESS_ZLIB) -- printf (" ZLIB, "); -+ if (get_compression_header (&chdr, buf, sizeof (buf)) == 0) -+ printf (_(" []\n")); - else -- printf (_(" [: 0x%x], "), -- chdr.ch_type); -- print_vma (chdr.ch_size, LONG_HEX); -- printf (", %lu\n", (unsigned long) chdr.ch_addralign); -+ { -+ if (chdr.ch_type == ELFCOMPRESS_ZLIB) -+ printf (" ZLIB, "); -+ else -+ printf (_(" [: 0x%x], "), -+ chdr.ch_type); -+ print_vma (chdr.ch_size, LONG_HEX); -+ printf (", %lu\n", (unsigned long) chdr.ch_addralign); -+ } - } - } - } -@@ -13679,11 +13682,16 @@ dump_section_as_strings (Elf_Internal_Sh - = get_compression_header (& chdr, (unsigned char *) start, - num_bytes); - -+ if (compression_header_size == 0) -+ /* An error message will have already been generated -+ by get_compression_header. */ -+ goto error_out; -+ - if (chdr.ch_type != ELFCOMPRESS_ZLIB) - { - warn (_("section '%s' has unsupported compress type: %d\n"), - printable_section_name (filedata, section), chdr.ch_type); -- return FALSE; -+ goto error_out; - } - uncompressed_size = chdr.ch_size; - start += compression_header_size; -@@ -13715,7 +13723,7 @@ dump_section_as_strings (Elf_Internal_Sh - { - error (_("Unable to decompress section %s\n"), - printable_section_name (filedata, section)); -- return FALSE; -+ goto error_out; - } - } - else -@@ -13785,6 +13793,10 @@ dump_section_as_strings (Elf_Internal_Sh - - putchar ('\n'); - return TRUE; -+ -+ error_out: -+ free (real_start); -+ return FALSE; - } - - static bfd_boolean -@@ -13797,7 +13809,7 @@ dump_section_as_bytes (Elf_Internal_Shdr - bfd_size_type section_size; - bfd_vma addr; - unsigned char * data; -- unsigned char * real_start; -+ unsigned char * real_start = NULL; - unsigned char * start; - - real_start = start = (unsigned char *) get_section_contents (section, filedata); -@@ -13820,11 +13832,16 @@ dump_section_as_bytes (Elf_Internal_Shdr - unsigned int compression_header_size - = get_compression_header (& chdr, start, section_size); - -+ if (compression_header_size == 0) -+ /* An error message will have already been generated -+ by get_compression_header. */ -+ goto error_out; -+ - if (chdr.ch_type != ELFCOMPRESS_ZLIB) - { - warn (_("section '%s' has unsupported compress type: %d\n"), - printable_section_name (filedata, section), chdr.ch_type); -- return FALSE; -+ goto error_out; - } - uncompressed_size = chdr.ch_size; - start += compression_header_size; -@@ -13859,7 +13876,7 @@ dump_section_as_bytes (Elf_Internal_Shdr - error (_("Unable to decompress section %s\n"), - printable_section_name (filedata, section)); - /* FIXME: Print the section anyway ? */ -- return FALSE; -+ goto error_out; - } - } - else -@@ -13939,6 +13956,10 @@ dump_section_as_bytes (Elf_Internal_Shdr - - putchar ('\n'); - return TRUE; -+ -+ error_out: -+ free (real_start); -+ return FALSE; - } - - static ctf_sect_t * -@@ -14149,6 +14170,10 @@ load_specific_debug_section (enum dwarf_ - } - - compression_header_size = get_compression_header (&chdr, start, size); -+ if (compression_header_size == 0) -+ /* An error message will have already been generated -+ by get_compression_header. */ -+ return FALSE; - - if (chdr.ch_type != ELFCOMPRESS_ZLIB) - { diff --git a/binutils-readelf-other-sym-info.patch b/binutils-readelf-other-sym-info.patch index ef9f6ea..df2e324 100644 --- a/binutils-readelf-other-sym-info.patch +++ b/binutils-readelf-other-sym-info.patch @@ -1,25 +1,25 @@ -diff -rupN --no-dereference binutils-2.34/binutils/readelf.c binutils-2.34-new/binutils/readelf.c ---- binutils-2.34/binutils/readelf.c 2020-12-18 02:57:16.348049023 +0100 -+++ binutils-2.34-new/binutils/readelf.c 2020-12-18 02:57:16.353049005 +0100 -@@ -11496,12 +11496,14 @@ print_dynamic_symbol (Filedata * filedat +diff -rupN --no-dereference binutils-2.37/binutils/readelf.c binutils-2.37-new/binutils/readelf.c +--- binutils-2.37/binutils/readelf.c 2021-07-24 21:59:08.033910876 +0200 ++++ binutils-2.37-new/binutils/readelf.c 2021-07-24 21:59:10.159890170 +0200 +@@ -12616,11 +12616,13 @@ print_dynamic_symbol (Filedata *filedata unsigned int vis = ELF_ST_VISIBILITY (psym->st_other); - printf (" %-7s", get_symbol_visibility (vis)); + 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. */ + 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)); - printf (" %3.3s ", get_symbol_index_type (filedata, psym->st_shndx)); -@@ -11509,6 +11511,15 @@ print_dynamic_symbol (Filedata * filedat - print_symbol (25, GET_DYNAMIC_NAME (psym->st_name)); - else - printf (_(" "), psym->st_name); +@@ -12670,7 +12672,17 @@ print_dynamic_symbol (Filedata *filedata + version_string); + } + +- putchar ('\n'); +#if 1 + { + unsigned int vis = ELF_ST_VISIBILITY (psym->st_other); @@ -29,36 +29,8 @@ diff -rupN --no-dereference binutils-2.34/binutils/readelf.c binutils-2.34-new/b + printf (" \t[%s]", get_symbol_other (filedata, psym->st_other ^ vis)); + } +#endif - putchar ('\n'); - } ++ ++ putchar ('\n'); -@@ -12043,11 +12054,13 @@ process_symbol_table (Filedata * filedat - 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)); - print_symbol (25, psym->st_name < strtab_size -@@ -12066,7 +12079,15 @@ process_symbol_table (Filedata * filedat - printf (sym_info == symbol_hidden ? "@%s" : "@@%s", - version_string); - } -+#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 + if (ELF_ST_BIND (psym->st_info) == STB_LOCAL + && section != NULL diff --git a/binutils-revert-PLT-elision.patch b/binutils-revert-PLT-elision.patch new file mode 100644 index 0000000..b6d62e2 --- /dev/null +++ b/binutils-revert-PLT-elision.patch @@ -0,0 +1,245 @@ +diff -rupN --no-dereference binutils-2.37/bfd/elfxx-x86.c binutils-2.37-new/bfd/elfxx-x86.c +--- binutils-2.37/bfd/elfxx-x86.c 2021-07-08 13:37:19.000000000 +0200 ++++ binutils-2.37-new/bfd/elfxx-x86.c 2021-07-24 21:59:08.085910370 +0200 +@@ -107,7 +107,7 @@ elf_x86_allocate_dynrelocs (struct elf_l + plt_entry_size = htab->plt.plt_entry_size; + + resolved_to_zero = UNDEFINED_WEAK_RESOLVED_TO_ZERO (info, eh); +- ++#if 0 + /* We can't use the GOT PLT if pointer equality is needed since + finish_dynamic_symbol won't clear symbol value and the dynamic + linker won't update the GOT slot. We will get into an infinite +@@ -125,7 +125,7 @@ elf_x86_allocate_dynrelocs (struct elf_l + /* Use the GOT PLT. */ + eh->plt_got.refcount = 1; + } +- ++#endif + /* Since STT_GNU_IFUNC symbol must go through PLT, we handle it + here if it is defined and referenced in a non-shared object. */ + if (h->type == STT_GNU_IFUNC +diff -rupN --no-dereference binutils-2.37/ld/testsuite/ld-i386/pltgot-1.d binutils-2.37-new/ld/testsuite/ld-i386/pltgot-1.d +--- binutils-2.37/ld/testsuite/ld-i386/pltgot-1.d 2021-07-08 13:37:20.000000000 +0200 ++++ binutils-2.37-new/ld/testsuite/ld-i386/pltgot-1.d 2021-07-24 21:59:08.086910360 +0200 +@@ -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.37/ld/testsuite/ld-i386/pltgot-2.d binutils-2.37-new/ld/testsuite/ld-i386/pltgot-2.d +--- binutils-2.37/ld/testsuite/ld-i386/pltgot-2.d 2021-07-08 13:37:20.000000000 +0200 ++++ binutils-2.37-new/ld/testsuite/ld-i386/pltgot-2.d 2021-07-24 21:59:08.086910360 +0200 +@@ -3,7 +3,6 @@ + #readelf: -d --wide + #as: --32 + +-#failif + #... + +0x[0-9a-f]+ +\(PLTREL.* + #... +diff -rupN --no-dereference binutils-2.37/ld/testsuite/ld-i386/pr19636-2d.d binutils-2.37-new/ld/testsuite/ld-i386/pr19636-2d.d +--- binutils-2.37/ld/testsuite/ld-i386/pr19636-2d.d 2021-07-08 13:37:20.000000000 +0200 ++++ binutils-2.37-new/ld/testsuite/ld-i386/pr19636-2d.d 2021-07-24 21:59:08.086910360 +0200 +@@ -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.37/ld/testsuite/ld-i386/pr19636-2e.d binutils-2.37-new/ld/testsuite/ld-i386/pr19636-2e.d +--- binutils-2.37/ld/testsuite/ld-i386/pr19636-2e.d 2021-07-08 13:37:20.000000000 +0200 ++++ binutils-2.37-new/ld/testsuite/ld-i386/pr19636-2e.d 2021-07-24 21:59:08.086910360 +0200 +@@ -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.37/ld/testsuite/ld-i386/pr20830.d binutils-2.37-new/ld/testsuite/ld-i386/pr20830.d +--- binutils-2.37/ld/testsuite/ld-i386/pr20830.d 2021-07-08 13:37:20.000000000 +0200 ++++ binutils-2.37-new/ld/testsuite/ld-i386/pr20830.d 2021-07-24 21:59:08.087910350 +0200 +@@ -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.37/ld/testsuite/ld-x86-64/pltgot-1.d binutils-2.37-new/ld/testsuite/ld-x86-64/pltgot-1.d +--- binutils-2.37/ld/testsuite/ld-x86-64/pltgot-1.d 2021-07-08 13:37:20.000000000 +0200 ++++ binutils-2.37-new/ld/testsuite/ld-x86-64/pltgot-1.d 2021-07-24 21:59:08.087910350 +0200 +@@ -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.37/ld/testsuite/ld-x86-64/pltgot-2.d binutils-2.37-new/ld/testsuite/ld-x86-64/pltgot-2.d +--- binutils-2.37/ld/testsuite/ld-x86-64/pltgot-2.d 2021-07-08 13:37:20.000000000 +0200 ++++ binutils-2.37-new/ld/testsuite/ld-x86-64/pltgot-2.d 2021-07-24 21:59:08.087910350 +0200 +@@ -3,7 +3,6 @@ + #readelf: -d --wide + #as: --64 + +-#failif + #... + +0x[0-9a-f]+ +\(PLTREL.* + #... +diff -rupN --no-dereference binutils-2.37/ld/testsuite/ld-x86-64/plt-main.rd binutils-2.37-new/ld/testsuite/ld-x86-64/plt-main.rd +--- binutils-2.37/ld/testsuite/ld-x86-64/plt-main.rd 2021-07-08 13:37:20.000000000 +0200 ++++ binutils-2.37-new/ld/testsuite/ld-x86-64/plt-main.rd 2021-07-24 21:59:08.087910350 +0200 +@@ -1,4 +1,3 @@ +-#failif + #... + [0-9a-f ]+R_X86_64_JUMP_SLOT +0+ +bar \+ 0 + #... +diff -rupN --no-dereference binutils-2.37/ld/testsuite/ld-x86-64/pr20830a.d binutils-2.37-new/ld/testsuite/ld-x86-64/pr20830a.d +--- binutils-2.37/ld/testsuite/ld-x86-64/pr20830a.d 2021-07-08 13:37:20.000000000 +0200 ++++ binutils-2.37-new/ld/testsuite/ld-x86-64/pr20830a.d 2021-07-24 21:59:08.088910340 +0200 +@@ -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.37/ld/testsuite/ld-x86-64/pr20830a-now.d binutils-2.37-new/ld/testsuite/ld-x86-64/pr20830a-now.d +--- binutils-2.37/ld/testsuite/ld-x86-64/pr20830a-now.d 2021-07-08 13:37:20.000000000 +0200 ++++ binutils-2.37-new/ld/testsuite/ld-x86-64/pr20830a-now.d 2021-07-24 21:59:08.088910340 +0200 +@@ -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.37/ld/testsuite/ld-x86-64/pr20830b.d binutils-2.37-new/ld/testsuite/ld-x86-64/pr20830b.d +--- binutils-2.37/ld/testsuite/ld-x86-64/pr20830b.d 2021-07-08 13:37:20.000000000 +0200 ++++ binutils-2.37-new/ld/testsuite/ld-x86-64/pr20830b.d 2021-07-24 21:59:08.088910340 +0200 +@@ -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.37/ld/testsuite/ld-x86-64/pr20830b-now.d binutils-2.37-new/ld/testsuite/ld-x86-64/pr20830b-now.d +--- binutils-2.37/ld/testsuite/ld-x86-64/pr20830b-now.d 2021-07-08 13:37:20.000000000 +0200 ++++ binutils-2.37-new/ld/testsuite/ld-x86-64/pr20830b-now.d 2021-07-24 21:59:08.088910340 +0200 +@@ -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.37/ld/testsuite/ld-x86-64/pr21038a.d binutils-2.37-new/ld/testsuite/ld-x86-64/pr21038a.d +--- binutils-2.37/ld/testsuite/ld-x86-64/pr21038a.d 2021-07-08 13:37:20.000000000 +0200 ++++ binutils-2.37-new/ld/testsuite/ld-x86-64/pr21038a.d 2021-07-24 21:59:08.089910331 +0200 +@@ -19,7 +19,8 @@ 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 + DW_CFA_nop +diff -rupN --no-dereference binutils-2.37/ld/testsuite/ld-x86-64/pr21038a-now.d binutils-2.37-new/ld/testsuite/ld-x86-64/pr21038a-now.d +--- binutils-2.37/ld/testsuite/ld-x86-64/pr21038a-now.d 2021-07-08 13:37:20.000000000 +0200 ++++ binutils-2.37-new/ld/testsuite/ld-x86-64/pr21038a-now.d 2021-07-24 21:59:08.089910331 +0200 +@@ -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 0000000000000014 0000001c FDE cie=00000000 pc=00000000000001c8..00000000000001d4 + DW_CFA_nop + DW_CFA_nop +diff -rupN --no-dereference binutils-2.37/ld/testsuite/ld-x86-64/pr21038b.d binutils-2.37-new/ld/testsuite/ld-x86-64/pr21038b.d +--- binutils-2.37/ld/testsuite/ld-x86-64/pr21038b.d 2021-07-08 13:37:20.000000000 +0200 ++++ binutils-2.37-new/ld/testsuite/ld-x86-64/pr21038b.d 2021-07-24 21:59:08.089910331 +0200 +@@ -19,6 +19,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=00000000000001d8..00000000000001dd + DW_CFA_nop +diff -rupN --no-dereference binutils-2.37/ld/testsuite/ld-x86-64/pr21038b-now.d binutils-2.37-new/ld/testsuite/ld-x86-64/pr21038b-now.d +--- binutils-2.37/ld/testsuite/ld-x86-64/pr21038b-now.d 2021-07-08 13:37:20.000000000 +0200 ++++ binutils-2.37-new/ld/testsuite/ld-x86-64/pr21038b-now.d 2021-07-24 21:59:08.089910331 +0200 +@@ -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 0000000000000014 0000001c FDE cie=00000000 pc=00000000000001d8..00000000000001dd + DW_CFA_nop + DW_CFA_nop +diff -rupN --no-dereference binutils-2.37/ld/testsuite/ld-x86-64/pr21038c.d binutils-2.37-new/ld/testsuite/ld-x86-64/pr21038c.d +--- binutils-2.37/ld/testsuite/ld-x86-64/pr21038c.d 2021-07-08 13:37:20.000000000 +0200 ++++ binutils-2.37-new/ld/testsuite/ld-x86-64/pr21038c.d 2021-07-24 21:59:08.089910331 +0200 +@@ -19,7 +19,8 @@ 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=0000000000000220..0000000000000231 + DW_CFA_nop + DW_CFA_nop +diff -rupN --no-dereference binutils-2.37/ld/testsuite/ld-x86-64/pr21038c-now.d binutils-2.37-new/ld/testsuite/ld-x86-64/pr21038c-now.d +--- binutils-2.37/ld/testsuite/ld-x86-64/pr21038c-now.d 2021-07-08 13:37:20.000000000 +0200 ++++ binutils-2.37-new/ld/testsuite/ld-x86-64/pr21038c-now.d 2021-07-24 21:59:08.090910321 +0200 +@@ -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 0000000000000014 0000001c FDE cie=00000000 pc=0000000000000220..0000000000000231 + DW_CFA_nop + DW_CFA_nop +diff -rupN --no-dereference binutils-2.37/ld/testsuite/ld-x86-64/tlspic2.rd binutils-2.37-new/ld/testsuite/ld-x86-64/tlspic2.rd +--- binutils-2.37/ld/testsuite/ld-x86-64/tlspic2.rd 2021-07-08 13:37:20.000000000 +0200 ++++ binutils-2.37-new/ld/testsuite/ld-x86-64/tlspic2.rd 2021-07-24 21:59:08.090910321 +0200 +@@ -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/binutils-special-sections-in-groups.patch b/binutils-special-sections-in-groups.patch index a90203a..9ecb455 100644 --- a/binutils-special-sections-in-groups.patch +++ b/binutils-special-sections-in-groups.patch @@ -1,7 +1,7 @@ -diff -rupN --no-dereference binutils-2.34/bfd/elf.c binutils-2.34-new/bfd/elf.c ---- binutils-2.34/bfd/elf.c 2020-01-30 08:15:56.000000000 +0100 -+++ binutils-2.34-new/bfd/elf.c 2020-12-18 02:57:19.376038355 +0100 -@@ -838,7 +838,13 @@ setup_group (bfd *abfd, Elf_Internal_Shd +diff -rupN --no-dereference binutils-2.37/bfd/elf.c binutils-2.37-new/bfd/elf.c +--- binutils-2.37/bfd/elf.c 2021-07-08 13:37:19.000000000 +0200 ++++ binutils-2.37-new/bfd/elf.c 2021-07-24 21:59:16.679826669 +0200 +@@ -824,7 +824,13 @@ setup_group (bfd *abfd, Elf_Internal_Shd } } @@ -16,7 +16,7 @@ diff -rupN --no-dereference binutils-2.34/bfd/elf.c binutils-2.34-new/bfd/elf.c { /* xgettext:c-format */ _bfd_error_handler (_("%pB: no group info for section '%pA'"), -@@ -944,7 +950,8 @@ _bfd_elf_setup_sections (bfd *abfd) +@@ -927,7 +933,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 diff --git a/binutils-testsuite-fixes.patch b/binutils-testsuite-fixes.patch new file mode 100644 index 0000000..15cb2c7 --- /dev/null +++ b/binutils-testsuite-fixes.patch @@ -0,0 +1,865 @@ +diff -rupN --no-dereference binutils-2.37/gold/main.cc binutils-2.37-new/gold/main.cc +--- binutils-2.37/gold/main.cc 2021-07-08 13:37:20.000000000 +0200 ++++ binutils-2.37-new/gold/main.cc 2021-07-24 21:59:28.964707019 +0200 +@@ -290,16 +290,6 @@ main(int argc, char** argv) + elapsed.sys / 1000, (elapsed.sys % 1000) * 1000, + elapsed.wall / 1000, (elapsed.wall % 1000) * 1000); + +-#if defined(HAVE_MALLINFO2) +- struct mallinfo2 m = mallinfo2(); +- fprintf(stderr, _("%s: total space allocated by malloc: %lld bytes\n"), +- program_name, static_cast(m.arena)); +-#elif defined(HAVE_MALLINFO) +- struct mallinfo m = mallinfo(); +- fprintf(stderr, _("%s: total space allocated by malloc: %lld bytes\n"), +- program_name, static_cast(m.arena)); +-#endif +- + File_read::print_stats(); + Archive::print_stats(); + Lib_group::print_stats(); +diff -rupN --no-dereference binutils-2.37/ld/testsuite/ld-aarch64/tls-relax-gdesc-le-now.d binutils-2.37-new/ld/testsuite/ld-aarch64/tls-relax-gdesc-le-now.d +--- binutils-2.37/ld/testsuite/ld-aarch64/tls-relax-gdesc-le-now.d 2021-07-08 13:37:20.000000000 +0200 ++++ binutils-2.37-new/ld/testsuite/ld-aarch64/tls-relax-gdesc-le-now.d 2021-07-24 21:59:28.964707019 +0200 +@@ -11,7 +11,7 @@ + 0x.+ \(PLTRELSZ\) \s+.+ \(bytes\) + 0x.+ \(PLTREL\) \s+RELA + 0x.+ \(JMPREL\) \s+0x.+ +- 0x.+ \(BIND_NOW\) \s+ ++ 0x.+ \(FLAGS\) \s+BIND_NOW + 0x.+ \(FLAGS_1\) \s+ Flags: NOW + 0x.+ \(NULL\) \s+ 0x0 + +diff -rupN --no-dereference binutils-2.37/ld/testsuite/ld-aarch64/variant_pcs-now.d binutils-2.37-new/ld/testsuite/ld-aarch64/variant_pcs-now.d +--- binutils-2.37/ld/testsuite/ld-aarch64/variant_pcs-now.d 2021-07-08 13:37:20.000000000 +0200 ++++ binutils-2.37-new/ld/testsuite/ld-aarch64/variant_pcs-now.d 2021-07-24 21:59:28.965707009 +0200 +@@ -23,10 +23,10 @@ Symbol table '\.dynsym' contains 7 entri + Num: Value Size Type Bind Vis Ndx Name + 0: 0000000000000000 0 NOTYPE LOCAL DEFAULT UND + 1: 0000000000000000 0 NOTYPE GLOBAL DEFAULT UND f_base_global_default_undef +- 2: 0000000000000000 0 NOTYPE GLOBAL DEFAULT \[VARIANT_PCS\] UND f_spec_global_default_undef +- 3: 0000000000008000 0 IFUNC GLOBAL DEFAULT \[VARIANT_PCS\] 1 f_spec_global_default_ifunc ++ 2: 0000000000000000 0 NOTYPE GLOBAL DEFAULT[ ]+UND f_spec_global_default_undef[ ]+\[VARIANT_PCS\] ++ 3: 0000000000008000 0 IFUNC GLOBAL DEFAULT[ ]+1 f_spec_global_default_ifunc[ ]+\[VARIANT_PCS\] + 4: 0000000000008000 0 NOTYPE GLOBAL DEFAULT 1 f_base_global_default_def +- 5: 0000000000008000 0 NOTYPE GLOBAL DEFAULT \[VARIANT_PCS\] 1 f_spec_global_default_def ++ 5: 0000000000008000 0 NOTYPE GLOBAL DEFAULT[ ]+1 f_spec_global_default_def[ ]+\[VARIANT_PCS\] + 6: 0000000000008000 0 IFUNC GLOBAL DEFAULT 1 f_base_global_default_ifunc + + Symbol table '\.symtab' contains 35 entries: +@@ -41,28 +41,28 @@ Symbol table '\.symtab' contains 35 entr + 7: 00000000000111c8 0 SECTION LOCAL DEFAULT 7.* + 8: 0000000000011270 0 SECTION LOCAL DEFAULT 8.* + 9: 0000000000000000 0 FILE LOCAL DEFAULT ABS .*variant_pcs-1\.o +- 10: 0000000000008000 0 NOTYPE LOCAL DEFAULT \[VARIANT_PCS\] 1 f_spec_local +- 11: 0000000000008000 0 IFUNC LOCAL DEFAULT \[VARIANT_PCS\] 1 f_spec_local_ifunc ++ 10: 0000000000008000 0 NOTYPE LOCAL DEFAULT .* ++ 11: 0000000000008000 0 IFUNC LOCAL DEFAULT .* + 12: 0000000000008000 0 IFUNC LOCAL DEFAULT 1 f_base_local_ifunc + 13: 0000000000008000 0 NOTYPE LOCAL DEFAULT 1 f_base_local + 14: 0000000000008000 0 NOTYPE LOCAL DEFAULT 1 \$x + 15: 0000000000000000 0 FILE LOCAL DEFAULT ABS .*variant_pcs-2\.o +- 16: 0000000000008038 0 NOTYPE LOCAL DEFAULT \[VARIANT_PCS\] 1 f_spec_local2 +- 17: 0000000000008038 0 IFUNC LOCAL DEFAULT \[VARIANT_PCS\] 1 f_spec_local2_ifunc ++ 16: 0000000000008038 0 NOTYPE LOCAL DEFAULT .* ++ 17: 0000000000008038 0 IFUNC LOCAL DEFAULT .* + 18: 0000000000008038 0 IFUNC LOCAL DEFAULT 1 f_base_local2_ifunc + 19: 0000000000008038 0 NOTYPE LOCAL DEFAULT 1 f_base_local2 + 20: 0000000000008038 0 NOTYPE LOCAL DEFAULT 1 \$x + 21: 0000000000000000 0 FILE LOCAL DEFAULT ABS + 22: 0000000000009080 0 OBJECT LOCAL DEFAULT ABS _DYNAMIC +- 23: 0000000000008000 0 NOTYPE LOCAL DEFAULT \[VARIANT_PCS\] 1 f_spec_global_hidden_def ++ 23: 0000000000008000 0 NOTYPE LOCAL DEFAULT .* + 24: 0000000000008000 0 IFUNC LOCAL DEFAULT 1 f_base_global_hidden_ifunc + 25: 0000000000008000 0 NOTYPE LOCAL DEFAULT 1 f_base_global_hidden_def + 26: 0000000000009000 0 OBJECT LOCAL DEFAULT ABS _GLOBAL_OFFSET_TABLE_ +- 27: 0000000000008000 0 IFUNC LOCAL DEFAULT \[VARIANT_PCS\] 1 f_spec_global_hidden_ifunc ++ 27: 0000000000008000 0 IFUNC LOCAL DEFAULT .* + 28: 0000000000008070 0 NOTYPE LOCAL DEFAULT 2 \$x + 29: 0000000000000000 0 NOTYPE GLOBAL DEFAULT UND f_base_global_default_undef +- 30: 0000000000000000 0 NOTYPE GLOBAL DEFAULT \[VARIANT_PCS\] UND f_spec_global_default_undef +- 31: 0000000000008000 0 IFUNC GLOBAL DEFAULT \[VARIANT_PCS\] 1 f_spec_global_default_ifunc ++ 30: 0000000000000000 0 NOTYPE GLOBAL DEFAULT .* ++ 31: 0000000000008000 0 IFUNC GLOBAL DEFAULT .* + 32: 0000000000008000 0 NOTYPE GLOBAL DEFAULT 1 f_base_global_default_def +- 33: 0000000000008000 0 NOTYPE GLOBAL DEFAULT \[VARIANT_PCS\] 1 f_spec_global_default_def ++ 33: 0000000000008000 0 NOTYPE GLOBAL DEFAULT .* + 34: 0000000000008000 0 IFUNC GLOBAL DEFAULT 1 f_base_global_default_ifunc +diff -rupN --no-dereference binutils-2.37/ld/testsuite/ld-aarch64/variant_pcs-r.d binutils-2.37-new/ld/testsuite/ld-aarch64/variant_pcs-r.d +--- binutils-2.37/ld/testsuite/ld-aarch64/variant_pcs-r.d 2021-07-08 13:37:20.000000000 +0200 ++++ binutils-2.37-new/ld/testsuite/ld-aarch64/variant_pcs-r.d 2021-07-24 21:59:28.965707009 +0200 +@@ -37,24 +37,24 @@ Symbol table '\.symtab' contains 26 entr + 2: 0000000000000000 0 SECTION LOCAL DEFAULT 3.* + 3: 0000000000000000 0 SECTION LOCAL DEFAULT 4.* + 4: 0000000000000000 0 FILE LOCAL DEFAULT ABS .*variant_pcs-1\.o +- 5: 0000000000000000 0 NOTYPE LOCAL DEFAULT \[VARIANT_PCS\] 1 f_spec_local +- 6: 0000000000000000 0 IFUNC LOCAL DEFAULT \[VARIANT_PCS\] 1 f_spec_local_ifunc ++ 5: 0000000000000000 0 NOTYPE LOCAL DEFAULT .* ++ 6: 0000000000000000 0 IFUNC LOCAL DEFAULT .* + 7: 0000000000000000 0 IFUNC LOCAL DEFAULT 1 f_base_local_ifunc + 8: 0000000000000000 0 NOTYPE LOCAL DEFAULT 1 f_base_local + 9: 0000000000000000 0 NOTYPE LOCAL DEFAULT 1 \$x + 10: 0000000000000000 0 FILE LOCAL DEFAULT ABS .*variant_pcs-2\.o +- 11: 0000000000000038 0 NOTYPE LOCAL DEFAULT \[VARIANT_PCS\] 1 f_spec_local2 +- 12: 0000000000000038 0 IFUNC LOCAL DEFAULT \[VARIANT_PCS\] 1 f_spec_local2_ifunc ++ 11: 0000000000000038 0 NOTYPE LOCAL DEFAULT .* ++ 12: 0000000000000038 0 IFUNC LOCAL DEFAULT .* + 13: 0000000000000038 0 IFUNC LOCAL DEFAULT 1 f_base_local2_ifunc + 14: 0000000000000038 0 NOTYPE LOCAL DEFAULT 1 f_base_local2 + 15: 0000000000000038 0 NOTYPE LOCAL DEFAULT 1 \$x + 16: 0000000000000000 0 NOTYPE GLOBAL DEFAULT UND f_base_global_default_undef +- 17: 0000000000000000 0 NOTYPE GLOBAL DEFAULT \[VARIANT_PCS\] UND f_spec_global_default_undef +- 18: 0000000000000000 0 NOTYPE GLOBAL HIDDEN \[VARIANT_PCS\] 1 f_spec_global_hidden_def ++ 17: 0000000000000000 0 NOTYPE GLOBAL DEFAULT .* ++ 18: 0000000000000000 0 NOTYPE GLOBAL HIDDEN .* + 19: 0000000000000000 0 IFUNC GLOBAL HIDDEN 1 f_base_global_hidden_ifunc +- 20: 0000000000000000 0 IFUNC GLOBAL DEFAULT \[VARIANT_PCS\] 1 f_spec_global_default_ifunc ++ 20: 0000000000000000 0 IFUNC GLOBAL DEFAULT .* + 21: 0000000000000000 0 NOTYPE GLOBAL HIDDEN 1 f_base_global_hidden_def +- 22: 0000000000000000 0 IFUNC GLOBAL HIDDEN \[VARIANT_PCS\] 1 f_spec_global_hidden_ifunc ++ 22: 0000000000000000 0 IFUNC GLOBAL HIDDEN .* + 23: 0000000000000000 0 NOTYPE GLOBAL DEFAULT 1 f_base_global_default_def +- 24: 0000000000000000 0 NOTYPE GLOBAL DEFAULT \[VARIANT_PCS\] 1 f_spec_global_default_def ++ 24: 0000000000000000 0 NOTYPE GLOBAL DEFAULT .* + 25: 0000000000000000 0 IFUNC GLOBAL DEFAULT 1 f_base_global_default_ifunc +diff -rupN --no-dereference binutils-2.37/ld/testsuite/ld-aarch64/variant_pcs-shared.d binutils-2.37-new/ld/testsuite/ld-aarch64/variant_pcs-shared.d +--- binutils-2.37/ld/testsuite/ld-aarch64/variant_pcs-shared.d 2021-07-08 13:37:20.000000000 +0200 ++++ binutils-2.37-new/ld/testsuite/ld-aarch64/variant_pcs-shared.d 2021-07-24 21:59:28.978706882 +0200 +@@ -23,10 +23,10 @@ Symbol table '\.dynsym' contains 7 entri + Num: Value Size Type Bind Vis Ndx Name + 0: 0000000000000000 0 NOTYPE LOCAL DEFAULT UND + 1: 0000000000000000 0 NOTYPE GLOBAL DEFAULT UND f_base_global_default_undef +- 2: 0000000000000000 0 NOTYPE GLOBAL DEFAULT \[VARIANT_PCS\] UND f_spec_global_default_undef +- 3: 0000000000008000 0 IFUNC GLOBAL DEFAULT \[VARIANT_PCS\] 1 f_spec_global_default_ifunc ++ 2: 0000000000000000 0 NOTYPE GLOBAL DEFAULT[ ]+UND f_spec_global_default_undef[ ]+\[VARIANT_PCS\] ++ 3: 0000000000008000 0 IFUNC GLOBAL DEFAULT[ ]+1 f_spec_global_default_ifunc[ ]+\[VARIANT_PCS\] + 4: 0000000000008000 0 NOTYPE GLOBAL DEFAULT 1 f_base_global_default_def +- 5: 0000000000008000 0 NOTYPE GLOBAL DEFAULT \[VARIANT_PCS\] 1 f_spec_global_default_def ++ 5: 0000000000008000 0 NOTYPE GLOBAL DEFAULT[ ]+1 f_spec_global_default_def[ ]+\[VARIANT_PCS\] + 6: 0000000000008000 0 IFUNC GLOBAL DEFAULT 1 f_base_global_default_ifunc + + Symbol table '\.symtab' contains 35 entries: +@@ -41,28 +41,28 @@ Symbol table '\.symtab' contains 35 entr + 7: 00000000000111c8 0 SECTION LOCAL DEFAULT 7.* + 8: 0000000000011270 0 SECTION LOCAL DEFAULT 8.* + 9: 0000000000000000 0 FILE LOCAL DEFAULT ABS .*variant_pcs-1\.o +- 10: 0000000000008000 0 NOTYPE LOCAL DEFAULT \[VARIANT_PCS\] 1 f_spec_local +- 11: 0000000000008000 0 IFUNC LOCAL DEFAULT \[VARIANT_PCS\] 1 f_spec_local_ifunc ++ 10: 0000000000008000 0 NOTYPE LOCAL DEFAULT .* ++ 11: 0000000000008000 0 IFUNC LOCAL DEFAULT .* + 12: 0000000000008000 0 IFUNC LOCAL DEFAULT 1 f_base_local_ifunc + 13: 0000000000008000 0 NOTYPE LOCAL DEFAULT 1 f_base_local + 14: 0000000000008000 0 NOTYPE LOCAL DEFAULT 1 \$x + 15: 0000000000000000 0 FILE LOCAL DEFAULT ABS .*variant_pcs-2\.o +- 16: 0000000000008038 0 NOTYPE LOCAL DEFAULT \[VARIANT_PCS\] 1 f_spec_local2 +- 17: 0000000000008038 0 IFUNC LOCAL DEFAULT \[VARIANT_PCS\] 1 f_spec_local2_ifunc ++ 16: 0000000000008038 0 NOTYPE LOCAL DEFAULT .* ++ 17: 0000000000008038 0 IFUNC LOCAL DEFAULT .* + 18: 0000000000008038 0 IFUNC LOCAL DEFAULT 1 f_base_local2_ifunc + 19: 0000000000008038 0 NOTYPE LOCAL DEFAULT 1 f_base_local2 + 20: 0000000000008038 0 NOTYPE LOCAL DEFAULT 1 \$x + 21: 0000000000000000 0 FILE LOCAL DEFAULT ABS + 22: 0000000000009080 0 OBJECT LOCAL DEFAULT ABS _DYNAMIC +- 23: 0000000000008000 0 NOTYPE LOCAL DEFAULT \[VARIANT_PCS\] 1 f_spec_global_hidden_def ++ 23: 0000000000008000 0 NOTYPE LOCAL DEFAULT .* + 24: 0000000000008000 0 IFUNC LOCAL DEFAULT 1 f_base_global_hidden_ifunc + 25: 0000000000008000 0 NOTYPE LOCAL DEFAULT 1 f_base_global_hidden_def + 26: 0000000000009000 0 OBJECT LOCAL DEFAULT ABS _GLOBAL_OFFSET_TABLE_ +- 27: 0000000000008000 0 IFUNC LOCAL DEFAULT \[VARIANT_PCS\] 1 f_spec_global_hidden_ifunc ++ 27: 0000000000008000 0 IFUNC LOCAL DEFAULT .* + 28: 0000000000008070 0 NOTYPE LOCAL DEFAULT 2 \$x + 29: 0000000000000000 0 NOTYPE GLOBAL DEFAULT UND f_base_global_default_undef +- 30: 0000000000000000 0 NOTYPE GLOBAL DEFAULT \[VARIANT_PCS\] UND f_spec_global_default_undef +- 31: 0000000000008000 0 IFUNC GLOBAL DEFAULT \[VARIANT_PCS\] 1 f_spec_global_default_ifunc ++ 30: 0000000000000000 0 NOTYPE GLOBAL DEFAULT .* ++ 31: 0000000000008000 0 IFUNC GLOBAL DEFAULT .* + 32: 0000000000008000 0 NOTYPE GLOBAL DEFAULT 1 f_base_global_default_def +- 33: 0000000000008000 0 NOTYPE GLOBAL DEFAULT \[VARIANT_PCS\] 1 f_spec_global_default_def ++ 33: 0000000000008000 0 NOTYPE GLOBAL DEFAULT .* + 34: 0000000000008000 0 IFUNC GLOBAL DEFAULT 1 f_base_global_default_ifunc +diff -rupN --no-dereference binutils-2.37/ld/testsuite/ld-elf/compress.exp binutils-2.37-new/ld/testsuite/ld-elf/compress.exp +--- binutils-2.37/ld/testsuite/ld-elf/compress.exp 2021-07-08 13:37:20.000000000 +0200 ++++ binutils-2.37-new/ld/testsuite/ld-elf/compress.exp 2021-07-24 21:59:28.978706882 +0200 +@@ -167,8 +167,8 @@ if { [regexp_diff tmpdir/$test.out $srcd + + set test_name "Link with zlib compressed debug output 1" + set test normal +-send_log "$READELF -w tmpdir/$test > tmpdir/$test.out\n" +-set got [remote_exec host [concat sh -c [list "$READELF -w tmpdir/$test > tmpdir/$test.out"]] "" "/dev/null"] ++send_log "$READELF -wi tmpdir/$test > tmpdir/$test.out\n" ++set got [remote_exec host [concat sh -c [list "$READELF -wi tmpdir/$test > tmpdir/$test.out"]] "" "/dev/null"] + if { [lindex $got 0] != 0 || ![string match "" [lindex $got 1]] } then { + send_log "$got\n" + fail "$test_name" +@@ -176,8 +176,8 @@ if { [lindex $got 0] != 0 || ![string ma + + set test_name "Link with zlib compressed debug output 2" + set test zlibnormal +-send_log "$READELF -w tmpdir/$test | sed -e \"s/.zdebug_/.debug_/\" > tmpdir/$test.out\n" +-set got [remote_exec host [concat sh -c [list "$READELF -w tmpdir/$test | sed -e \"s/.zdebug_/.debug_/\" > tmpdir/$test.out"]] "" "/dev/null"] ++send_log "$READELF -wi tmpdir/$test | sed -e \"s/.zdebug_/.debug_/\" > tmpdir/$test.out\n" ++set got [remote_exec host [concat sh -c [list "$READELF -wi tmpdir/$test | sed -e \"s/.zdebug_/.debug_/\" > tmpdir/$test.out"]] "" "/dev/null"] + if { [lindex $got 0] != 0 || ![string match "" [lindex $got 1]] } then { + send_log "$got\n" + fail "$test_name" +@@ -203,8 +203,8 @@ if { [regexp_diff tmpdir/$test.out $srcd + + set test_name "Link with zlib-gnu compressed debug output 1" + set test gnunormal +-send_log "$READELF -w tmpdir/$test | sed -e \"s/.zdebug_/.debug_/\" > tmpdir/$test.out\n" +-set got [remote_exec host [concat sh -c [list "$READELF -w tmpdir/$test | sed -e \"s/.zdebug_/.debug_/\" > tmpdir/$test.out"]] "" "/dev/null"] ++send_log "$READELF -wi tmpdir/$test | sed -e \"s/.zdebug_/.debug_/\" > tmpdir/$test.out\n" ++set got [remote_exec host [concat sh -c [list "$READELF -wi tmpdir/$test | sed -e \"s/.zdebug_/.debug_/\" > tmpdir/$test.out"]] "" "/dev/null"] + if { [lindex $got 0] != 0 || ![string match "" [lindex $got 1]] } then { + send_log "$got\n" + fail "$test_name" +@@ -230,8 +230,8 @@ if { [regexp_diff tmpdir/$test.out $srcd + + set test gabinormal + set test_name "Link with zlib-gabi compressed debug output 1" +-send_log "$READELF -w tmpdir/$test > tmpdir/$test.out\n" +-set got [remote_exec host [concat sh -c [list "$READELF -w tmpdir/$test > tmpdir/$test.out"]] "" "/dev/null"] ++send_log "$READELF -wi tmpdir/$test > tmpdir/$test.out\n" ++set got [remote_exec host [concat sh -c [list "$READELF -wi tmpdir/$test > tmpdir/$test.out"]] "" "/dev/null"] + if { [lindex $got 0] != 0 || ![string match "" [lindex $got 1]] } then { + send_log "$got\n" + fail "$test_name" +diff -rupN --no-dereference binutils-2.37/ld/testsuite/ld-elf/pr26580-3.out binutils-2.37-new/ld/testsuite/ld-elf/pr26580-3.out +--- binutils-2.37/ld/testsuite/ld-elf/pr26580-3.out 2021-07-08 13:37:20.000000000 +0200 ++++ binutils-2.37-new/ld/testsuite/ld-elf/pr26580-3.out 2021-07-24 21:59:28.979706873 +0200 +@@ -1,2 +1,2 @@ + library not loaded +-alignment 1 ++alignment . +diff -rupN --no-dereference binutils-2.37/ld/testsuite/ld-elf/shared.exp binutils-2.37-new/ld/testsuite/ld-elf/shared.exp +--- binutils-2.37/ld/testsuite/ld-elf/shared.exp 2021-07-08 13:37:20.000000000 +0200 ++++ binutils-2.37-new/ld/testsuite/ld-elf/shared.exp 2021-07-24 21:59:28.979706873 +0200 +@@ -1536,18 +1536,6 @@ if { [istarget *-*-linux*] + "pr22393-2-static" \ + "pass.out" \ + ] \ +- [list \ +- "Run pr21964-4" \ +- "" \ +- "" \ +- {pr21964-4.c} \ +- "pr21964-4" \ +- "pass.out" \ +- "" \ +- "" \ +- "" \ +- "-ldl" \ +- ] \ + ] + } + +@@ -1629,6 +1617,7 @@ if [istarget "sparc*-*-*"] { + if { ([istarget "*-*-linux*"] + || [istarget "*-*-nacl*"] + || [istarget "*-*-gnu*"]) ++ && ![istarget "aarch64*-*-*"] && ![istarget "arm*-*-*"] + && ![istarget "mips*-*-*"] } { + run_ld_link_tests [list \ + [list \ +diff -rupN --no-dereference binutils-2.37/ld/testsuite/ld-elf/tls.exp binutils-2.37-new/ld/testsuite/ld-elf/tls.exp +--- binutils-2.37/ld/testsuite/ld-elf/tls.exp 2021-07-08 13:37:20.000000000 +0200 ++++ binutils-2.37-new/ld/testsuite/ld-elf/tls.exp 2021-07-24 21:59:28.979706873 +0200 +@@ -32,6 +32,9 @@ if { !([istarget *-*-linux*] + if { ![check_compiler_available] } { + return + } ++if { [istarget s390x*-*-*] } { ++ return ++} + + # This target requires extra GAS options when building PIC/PIE code. + set AFLAGS_PIC "" +diff -rupN --no-dereference binutils-2.37/ld/testsuite/ld-elfvsb/elfvsb.exp binutils-2.37-new/ld/testsuite/ld-elfvsb/elfvsb.exp +--- binutils-2.37/ld/testsuite/ld-elfvsb/elfvsb.exp 2021-07-08 13:37:20.000000000 +0200 ++++ binutils-2.37-new/ld/testsuite/ld-elfvsb/elfvsb.exp 2021-07-24 21:59:28.980706863 +0200 +@@ -94,6 +94,10 @@ if { [istarget *-*-linux*] + } + } + ++if { [istarget i686*-*-*] } { ++ set support_protected "no" ++} ++ + # The test procedure. + proc visibility_test { visibility progname testname main sh1 sh2 dat args } { + global CC +diff -rupN --no-dereference binutils-2.37/ld/testsuite/ld-gc/pr13683.d binutils-2.37-new/ld/testsuite/ld-gc/pr13683.d +--- binutils-2.37/ld/testsuite/ld-gc/pr13683.d 2021-07-08 13:37:20.000000000 +0200 ++++ binutils-2.37-new/ld/testsuite/ld-gc/pr13683.d 2021-07-24 21:59:28.980706863 +0200 +@@ -2,7 +2,7 @@ + #source: dummy.s + #ld: --gc-sections -e main --defsym foo=foo2 tmpdir/pr13683.o + #nm: --format=bsd +-#xfail: iq2000-*-* lm32-*-* epiphany-*-* mips64vr-*-* frv-*-* m32c-*-* rl78-*-* rx-*-* sh-*-* powerpc*-*-eabivle msp430-*-* ++#xfail: iq2000-*-* lm32-*-* epiphany-*-* mips64vr-*-* frv-*-* m32c-*-* rl78-*-* rx-*-* sh-*-* powerpc*-*-eabivle msp430-*-* aarch64*-*-* arm*-*-* + + # Note - look for both "foo" and "foo2" being defined, non-zero function symbols + +diff -rupN --no-dereference binutils-2.37/ld/testsuite/ld-gc/pr19161.d binutils-2.37-new/ld/testsuite/ld-gc/pr19161.d +--- binutils-2.37/ld/testsuite/ld-gc/pr19161.d 2021-07-08 13:37:20.000000000 +0200 ++++ binutils-2.37-new/ld/testsuite/ld-gc/pr19161.d 2021-07-24 21:59:28.980706863 +0200 +@@ -2,7 +2,7 @@ + #source: dummy.s + #ld: --gc-sections -e main tmpdir/pr19161-1.o tmpdir/pr19161-2.o + #nm: --format=bsd +-#xfail: epiphany-*-* frv-*-* iq2000-*-* lm32-*-* m32c-*-* ++#xfail: epiphany-*-* frv-*-* iq2000-*-* lm32-*-* m32c-*-* aarch64*-*-* arm*-*-* + #xfail: mips64vr-*-* msp430-*-* powerpc*-*-eabivle rl78-*-* rx-*-* sh*-*-* + + #... +diff -rupN --no-dereference binutils-2.37/ld/testsuite/ld-i386/i386.exp binutils-2.37-new/ld/testsuite/ld-i386/i386.exp +--- binutils-2.37/ld/testsuite/ld-i386/i386.exp 2021-07-08 13:37:20.000000000 +0200 ++++ binutils-2.37-new/ld/testsuite/ld-i386/i386.exp 2021-07-24 21:59:28.981706853 +0200 +@@ -1057,15 +1057,6 @@ if { [isnative] + "pr18900.out" \ + ] \ + [list \ +- "Run pr19031" \ +- "$NOPIE_LDFLAGS tmpdir/pr19031.so" \ +- "-Wa,-mx86-used-note=yes" \ +- { pr19031b.S pr19031c.c } \ +- "pr19031" \ +- "pr19031.out" \ +- "$NOPIE_CFLAGS" \ +- ] \ +- [list \ + "Run got1" \ + "$NOPIE_LDFLAGS tmpdir/got1d.so" \ + "-Wa,-mx86-used-note=yes" \ +@@ -1117,7 +1108,9 @@ if { [isnative] + ] \ + ] + +- undefined_weak "$NOPIE_CFLAGS" "$NOPIE_LDFLAGS" ++ if { ! [istarget i686*-*-*] } { ++ undefined_weak "$NOPIE_CFLAGS" "$NOPIE_LDFLAGS" ++ } + undefined_weak "-fPIE" "$NOPIE_LDFLAGS" + undefined_weak "-fPIE" "-pie" + undefined_weak "-fPIE" "-z nodynamic-undefined-weak $NOPIE_LDFLAGS" +@@ -1181,7 +1174,7 @@ if { [isnative] + ] \ + ] + +- if { [istarget "i?86-*-linux*"] } { ++ if { [istarget "i?86-*-linux*"] && ! [istarget i686*-*-*] } { + run_cc_link_tests [list \ + [list \ + "Build pr21168.so with -z ibtplt" \ +diff -rupN --no-dereference binutils-2.37/ld/testsuite/ld-i386/plt-main.rd binutils-2.37-new/ld/testsuite/ld-i386/plt-main.rd +--- binutils-2.37/ld/testsuite/ld-i386/plt-main.rd 2021-07-08 13:37:20.000000000 +0200 ++++ binutils-2.37-new/ld/testsuite/ld-i386/plt-main.rd 2021-07-24 21:59:28.981706853 +0200 +@@ -1,4 +1 @@ +-#failif +-#... +-[0-9a-f ]+R_386_JUMP_SLOT +0+ +bar + #... +diff -rupN --no-dereference binutils-2.37/ld/testsuite/ld-i386/plt-pie-ibt.dd binutils-2.37-new/ld/testsuite/ld-i386/plt-pie-ibt.dd +--- binutils-2.37/ld/testsuite/ld-i386/plt-pie-ibt.dd 2021-07-08 13:37:20.000000000 +0200 ++++ binutils-2.37-new/ld/testsuite/ld-i386/plt-pie-ibt.dd 2021-07-24 21:59:28.981706853 +0200 +@@ -1,7 +1,2 @@ + #... +-Disassembly of section .plt.got: +- +-[a-f0-9]+ <[_a-z]+@plt>: +-[ ]*[a-f0-9]+: f3 0f 1e fb endbr32 +-[ ]*[a-f0-9]+: ff a3 .. .. .. .. jmp +\*\-0x[a-f0-9]+\(%ebx\) + #pass +diff -rupN --no-dereference binutils-2.37/ld/testsuite/ld-ifunc/ifunc.exp binutils-2.37-new/ld/testsuite/ld-ifunc/ifunc.exp +--- binutils-2.37/ld/testsuite/ld-ifunc/ifunc.exp 2021-07-08 13:37:20.000000000 +0200 ++++ binutils-2.37-new/ld/testsuite/ld-ifunc/ifunc.exp 2021-07-24 21:59:28.981706853 +0200 +@@ -39,6 +39,8 @@ if { ![is_elf_format] || ![supports_gnu_ + || [istarget nds32*-*-*] + || [istarget nios2-*-*] + || [istarget or1k-*-*] ++ || [istarget powerpc*-*-*] ++ || [istarget ppc*-*-*] + || [istarget score*-*-*] + || [istarget sh*-*-*] + || [istarget tic6x-*-*] +@@ -664,6 +666,11 @@ run_cc_link_tests [list \ + ] \ + ] + ++if { [isnative] ++ && !([istarget "powerpc-*-*"] ++ || [istarget "aarch64*-*-*"] || [istarget "arm*-*-*"] ++ || [istarget "sparc*-*-*"] ++ || [istarget "riscv*-*-*"]) } { + run_ld_link_exec_tests [list \ + [list \ + "Run pr18808" \ +@@ -714,6 +721,7 @@ run_ld_link_exec_tests [list \ + "pr18841.out" \ + ] \ + ] ++} + + # The pr23169 testcase is not valid. In general, you can't call ifunc + # resolvers in another binary unless you know what you're doing. In +diff -rupN --no-dereference binutils-2.37/ld/testsuite/ld-plugin/plugin-10.d binutils-2.37-new/ld/testsuite/ld-plugin/plugin-10.d +--- binutils-2.37/ld/testsuite/ld-plugin/plugin-10.d 2021-07-24 21:59:20.653787965 +0200 ++++ binutils-2.37-new/ld/testsuite/ld-plugin/plugin-10.d 2021-07-24 21:59:28.982706843 +0200 +@@ -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_DE.* + Sym: '_?func2' Resolution: LDPR_PREVAILING_DEF_IRONLY + #... + hook called: cleanup. +diff -rupN --no-dereference binutils-2.37/ld/testsuite/ld-plugin/plugin-11.d binutils-2.37-new/ld/testsuite/ld-plugin/plugin-11.d +--- binutils-2.37/ld/testsuite/ld-plugin/plugin-11.d 2021-07-24 21:59:20.653787965 +0200 ++++ binutils-2.37-new/ld/testsuite/ld-plugin/plugin-11.d 2021-07-24 21:59:28.982706843 +0200 +@@ -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_DE.* + Sym: '_?func2' Resolution: LDPR_PREVAILING_DEF_IRONLY +-Sym: '_?text' Resolution: LDPR_PREVAILING_DEF_IRONLY ++Sym: '_?text' Resolution: LDPR_PREVAILING_DE.* + #... + hook called: cleanup. + #... +diff -rupN --no-dereference binutils-2.37/ld/testsuite/ld-plugin/plugin-12.d binutils-2.37-new/ld/testsuite/ld-plugin/plugin-12.d +--- binutils-2.37/ld/testsuite/ld-plugin/plugin-12.d 2021-07-08 13:37:20.000000000 +0200 ++++ binutils-2.37-new/ld/testsuite/ld-plugin/plugin-12.d 2021-07-24 21:59:28.982706843 +0200 +@@ -1,6 +1,6 @@ + #... +-.*: symbol `func' definition: DEF, visibility: DEFAULT, resolution: PREVAILING_DEF +-.*: symbol `func1' definition: DEF, visibility: PROTECTED, resolution: PREVAILING_DEF_IRONLY +-.*: symbol `func2' definition: DEF, visibility: INTERNAL, resolution: PREVAILING_DEF_IRONLY +-.*: symbol `func3' definition: DEF, visibility: HIDDEN, resolution: PREVAILING_DEF_IRONLY ++.*: symbol `.*unc' definition: DEF, visibility: DEFAULT, resolution: PREVAILING_DE.* ++.*: symbol `.*unc1' definition: DEF, visibility: PROTECTED, resolution: PREVAILING_DEF_IRONLY ++.*: symbol `.*unc2' definition: DEF, visibility: INTERNAL, resolution: PREVAILING_DEF_IRONLY ++.*: symbol `.*unc3' definition: DEF, visibility: HIDDEN, resolution: PREVAILING_DEF_IRONLY + #pass +diff -rupN --no-dereference binutils-2.37/ld/testsuite/ld-plugin/plugin-16.d binutils-2.37-new/ld/testsuite/ld-plugin/plugin-16.d +--- binutils-2.37/ld/testsuite/ld-plugin/plugin-16.d 2021-07-24 21:59:20.654787955 +0200 ++++ binutils-2.37-new/ld/testsuite/ld-plugin/plugin-16.d 2021-07-24 21:59:28.982706843 +0200 +@@ -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_DE.* + Sym: '_?func2' Resolution: LDPR_PREVAILING_DEF_IRONLY + #... + hook called: cleanup. +diff -rupN --no-dereference binutils-2.37/ld/testsuite/ld-plugin/plugin-17.d binutils-2.37-new/ld/testsuite/ld-plugin/plugin-17.d +--- binutils-2.37/ld/testsuite/ld-plugin/plugin-17.d 2021-07-24 21:59:20.654787955 +0200 ++++ binutils-2.37-new/ld/testsuite/ld-plugin/plugin-17.d 2021-07-24 21:59:28.983706834 +0200 +@@ -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_DE.* + Sym: '_?func2' Resolution: LDPR_PREVAILING_DEF_IRONLY + #... + hook called: cleanup. +diff -rupN --no-dereference binutils-2.37/ld/testsuite/ld-plugin/plugin-18.d binutils-2.37-new/ld/testsuite/ld-plugin/plugin-18.d +--- binutils-2.37/ld/testsuite/ld-plugin/plugin-18.d 2021-07-24 21:59:20.654787955 +0200 ++++ binutils-2.37-new/ld/testsuite/ld-plugin/plugin-18.d 2021-07-24 21:59:28.983706834 +0200 +@@ -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_DE.* + Sym: '_?func2' Resolution: LDPR_PREVAILING_DEF_IRONLY + #... + hook called: cleanup. +diff -rupN --no-dereference binutils-2.37/ld/testsuite/ld-plugin/plugin-19.d binutils-2.37-new/ld/testsuite/ld-plugin/plugin-19.d +--- binutils-2.37/ld/testsuite/ld-plugin/plugin-19.d 2021-07-24 21:59:20.654787955 +0200 ++++ binutils-2.37-new/ld/testsuite/ld-plugin/plugin-19.d 2021-07-24 21:59:28.983706834 +0200 +@@ -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_DE.* + Sym: '_?func2' Resolution: LDPR_PREVAILING_DEF_IRONLY +-Sym: '_?text' Resolution: LDPR_PREVAILING_DEF_IRONLY ++Sym: '_?text' Resolution: LDPR_PREVAILING_DE.* + #... + hook called: cleanup. + #... +diff -rupN --no-dereference binutils-2.37/ld/testsuite/ld-plugin/plugin-8.d binutils-2.37-new/ld/testsuite/ld-plugin/plugin-8.d +--- binutils-2.37/ld/testsuite/ld-plugin/plugin-8.d 2021-07-24 21:59:20.657787926 +0200 ++++ binutils-2.37-new/ld/testsuite/ld-plugin/plugin-8.d 2021-07-24 21:59:28.983706834 +0200 +@@ -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_DE.* + Sym: '_?func2' Resolution: LDPR_PREVAILING_DEF_IRONLY + #... + hook called: cleanup. +diff -rupN --no-dereference binutils-2.37/ld/testsuite/ld-plugin/plugin-9.d binutils-2.37-new/ld/testsuite/ld-plugin/plugin-9.d +--- binutils-2.37/ld/testsuite/ld-plugin/plugin-9.d 2021-07-24 21:59:20.657787926 +0200 ++++ binutils-2.37-new/ld/testsuite/ld-plugin/plugin-9.d 2021-07-24 21:59:28.983706834 +0200 +@@ -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_DE.* + Sym: '_?func2' Resolution: LDPR_PREVAILING_DEF_IRONLY + #... + hook called: cleanup. +diff -rupN --no-dereference binutils-2.37/ld/testsuite/ld-plugin/plugin.exp binutils-2.37-new/ld/testsuite/ld-plugin/plugin.exp +--- binutils-2.37/ld/testsuite/ld-plugin/plugin.exp 2021-07-24 21:59:20.657787926 +0200 ++++ binutils-2.37-new/ld/testsuite/ld-plugin/plugin.exp 2021-07-24 21:59:28.984706824 +0200 +@@ -81,6 +81,7 @@ if { [istarget m681*-*-*] || [istarget m + # otherwise get FAILS due to _.frame + set CFLAGS "$CFLAGS -fomit-frame-pointer" + } ++ + # In order to define symbols in plugin options in the list of tests below, + # we need to know if the platform prepends an underscore to C symbols, + # which we find out by compiling the test objects now. If there is any +@@ -119,7 +120,7 @@ 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*] } { ++if { [istarget powerpc*-*-linux*] || [istarget x86_64*-*-linux*] || [istarget *-*-*] } { + set _ "" + } + +@@ -137,6 +138,9 @@ if [is_pecoff_format] { + #otherwise relocs overflow to symbols defined on the command line + append libs " --image-base=0x10000000" + } ++if { [istarget aarch64*-*-*] || [istarget arm*-*-*] } { ++ append libs " --defsym __aeabi_unwind_cpp_pr0=0" ++} + + set plugin_tests [list \ + [list "load plugin" "-plugin $plugin_path \ +@@ -304,6 +308,7 @@ if { !$can_compile || $failed_compile } + run_ld_link_tests $plugin_tests + + if { [is_elf_format] \ ++ && ! [istarget ppc64*-*-*] && ! [istarget powerpc*-*-*] + && [ld_compile "$CC $CFLAGS" $srcdir/$subdir/func1p.c tmpdir/func1p.o] \ + && [ld_compile "$CC $CFLAGS" $srcdir/$subdir/func2i.c tmpdir/func2i.o] \ + && [ld_compile "$CC $CFLAGS" $srcdir/$subdir/func3h.c tmpdir/func3h.o] } { +diff -rupN --no-dereference binutils-2.37/ld/testsuite/ld-powerpc/group1.sym binutils-2.37-new/ld/testsuite/ld-powerpc/group1.sym +--- binutils-2.37/ld/testsuite/ld-powerpc/group1.sym 2021-07-08 13:37:20.000000000 +0200 ++++ binutils-2.37-new/ld/testsuite/ld-powerpc/group1.sym 2021-07-24 21:59:28.984706824 +0200 +@@ -1,3 +1 @@ +-#... +-.* 8 FUNC +GLOBAL DEFAULT \[: 4\] +1 foo + #pass +diff -rupN --no-dereference binutils-2.37/ld/testsuite/ld-powerpc/group3.sym binutils-2.37-new/ld/testsuite/ld-powerpc/group3.sym +--- binutils-2.37/ld/testsuite/ld-powerpc/group3.sym 2021-07-08 13:37:20.000000000 +0200 ++++ binutils-2.37-new/ld/testsuite/ld-powerpc/group3.sym 2021-07-24 21:59:28.984706824 +0200 +@@ -1,3 +1 @@ +-#... +-.* 4 FUNC +GLOBAL DEFAULT \[: 1\] +1 foo + #pass +diff -rupN --no-dereference binutils-2.37/ld/testsuite/ld-powerpc/notoc3.d binutils-2.37-new/ld/testsuite/ld-powerpc/notoc3.d +--- binutils-2.37/ld/testsuite/ld-powerpc/notoc3.d 2021-07-08 13:37:20.000000000 +0200 ++++ binutils-2.37-new/ld/testsuite/ld-powerpc/notoc3.d 2021-07-24 21:59:28.984706824 +0200 +@@ -58,7 +58,7 @@ Disassembly of section \.text: + + .* : + .*: (02 10 40 3c|3c 40 10 02) lis r2,4098 +-.*: (00 90 42 38|38 42 90 00) addi r2,r2,-28672 ++.*:.* + .*: (.. .. ff 4b|4b ff .. ..) bl .* <.*\.long_branch\.f1> + .*: (18 00 41 e8|e8 41 00 18) ld r2,24\(r1\) + .*: (.. .. ff 4b|4b ff .. ..) bl .* +@@ -73,7 +73,7 @@ Disassembly of section \.text: + + .* : + .*: (02 10 40 3c|3c 40 10 02) lis r2,4098 +-.*: (00 90 42 38|38 42 90 00) addi r2,r2,-28672 ++.*:.* + .*: (.. .. ff 4b|4b ff .. ..) bl .* + .*: (00 00 00 60|60 00 00 00) nop + .*: (.. .. ff 4b|4b ff .. ..) bl .* <.*\.long_branch\.f1> +@@ -92,6 +92,6 @@ Disassembly of section \.text\.ext: + + 8000000000000000 : + 8000000000000000: (02 10 40 3c|3c 40 10 02) lis r2,4098 +-8000000000000004: (00 90 42 38|38 42 90 00) addi r2,r2,-28672 ++8000000000000004:.* + 8000000000000008: (00 00 00 60|60 00 00 00) nop + 800000000000000c: (20 00 80 4e|4e 80 00 20) blr +diff -rupN --no-dereference binutils-2.37/ld/testsuite/ld-powerpc/pr23937.d binutils-2.37-new/ld/testsuite/ld-powerpc/pr23937.d +--- binutils-2.37/ld/testsuite/ld-powerpc/pr23937.d 2021-07-08 13:37:20.000000000 +0200 ++++ binutils-2.37-new/ld/testsuite/ld-powerpc/pr23937.d 2021-07-24 21:59:28.985706814 +0200 +@@ -5,6 +5,4 @@ + + #... + .* R_PPC64_IRELATIVE +10000180 +-#... +-.*: 0+10000180 +20 IFUNC +LOCAL +DEFAULT .* magic + #pass +diff -rupN --no-dereference binutils-2.37/ld/testsuite/ld-powerpc/tlsexe32no.r binutils-2.37-new/ld/testsuite/ld-powerpc/tlsexe32no.r +--- binutils-2.37/ld/testsuite/ld-powerpc/tlsexe32no.r 2021-07-08 13:37:20.000000000 +0200 ++++ binutils-2.37-new/ld/testsuite/ld-powerpc/tlsexe32no.r 2021-07-24 21:59:28.985706814 +0200 +@@ -22,6 +22,7 @@ Section Headers: + +\[[ 0-9]+\] \.dynamic +DYNAMIC +[0-9a-f]+ [0-9a-f]+ [0-9a-f]+ 08 +WA +4 +0 +4 + +\[[ 0-9]+\] \.got +PROGBITS +[0-9a-f]+ [0-9a-f]+ 000038 04 +WA +0 +0 +4 + +\[[ 0-9]+\] \.plt +PROGBITS +[0-9a-f]+ [0-9a-f]+ 000004 00 +WA +0 +0 +4 ++#pass + +\[[ 0-9]+\] \.symtab +SYMTAB +.* + +\[[ 0-9]+\] \.strtab +STRTAB +.* + +\[[ 0-9]+\] \.shstrtab +STRTAB +.* +diff -rupN --no-dereference binutils-2.37/ld/testsuite/ld-powerpc/tlsexe32.r binutils-2.37-new/ld/testsuite/ld-powerpc/tlsexe32.r +--- binutils-2.37/ld/testsuite/ld-powerpc/tlsexe32.r 2021-07-08 13:37:20.000000000 +0200 ++++ binutils-2.37-new/ld/testsuite/ld-powerpc/tlsexe32.r 2021-07-24 21:59:28.986706805 +0200 +@@ -22,7 +22,8 @@ Section Headers: + +\[[ 0-9]+\] \.dynamic +DYNAMIC +[0-9a-f]+ [0-9a-f]+ [0-9a-f]+ 08 +WA +4 +0 +4 + +\[[ 0-9]+\] \.got +PROGBITS +[0-9a-f]+ [0-9a-f]+ 000018 04 +WA +0 +0 +4 + +\[[ 0-9]+\] \.plt +PROGBITS +[0-9a-f]+ [0-9a-f]+ 000004 00 +WA +0 +0 +4 +- +\[[ 0-9]+\] \.symtab +SYMTAB +.* ++#pass +++\[[ 0-9]+\] \.symtab +SYMTAB +.* + +\[[ 0-9]+\] \.strtab +STRTAB +.* + +\[[ 0-9]+\] \.shstrtab +STRTAB +.* + #... +diff -rupN --no-dereference binutils-2.37/ld/testsuite/ld-powerpc/tlsso32.r binutils-2.37-new/ld/testsuite/ld-powerpc/tlsso32.r +--- binutils-2.37/ld/testsuite/ld-powerpc/tlsso32.r 2021-07-08 13:37:20.000000000 +0200 ++++ binutils-2.37-new/ld/testsuite/ld-powerpc/tlsso32.r 2021-07-24 21:59:28.986706805 +0200 +@@ -20,6 +20,7 @@ Section Headers: + +\[[ 0-9]+\] \.dynamic +DYNAMIC .* 08 +WA +3 +0 +4 + +\[[ 0-9]+\] \.got +PROGBITS .* 0+40 04 +WA +0 +0 +4 + +\[[ 0-9]+\] \.plt +PROGBITS .* 0+4 00 +WA +0 +0 +4 ++#pass + +\[[ 0-9]+\] \.symtab +.* + +\[[ 0-9]+\] \.strtab +.* + +\[[ 0-9]+\] \.shstrtab +.* +diff -rupN --no-dereference binutils-2.37/ld/testsuite/ld-scripts/crossref.exp binutils-2.37-new/ld/testsuite/ld-scripts/crossref.exp +--- binutils-2.37/ld/testsuite/ld-scripts/crossref.exp 2021-07-08 13:37:20.000000000 +0200 ++++ binutils-2.37-new/ld/testsuite/ld-scripts/crossref.exp 2021-07-24 21:59:28.986706805 +0200 +@@ -147,6 +147,8 @@ set exec_output [prune_warnings $exec_ou + + regsub -all "(^|\n)($ld: warning: cannot find entry symbol\[^\n\]*\n?)" $exec_output "\\1" exec_output + ++setup_xfail i686*-*-* ++ + if [string match "" $exec_output] then { + pass $test3 + } else { +@@ -187,6 +189,8 @@ set exec_output [prune_warnings $exec_ou + + regsub -all "(^|\n)($ld: warning: cannot find entry symbol\[^\n\]*\n?)" $exec_output "\\1" exec_output + ++setup_xfail i686*-*-* ++ + if [string match "" $exec_output] then { + pass $test6 + } else { +@@ -199,6 +203,8 @@ set exec_output [prune_warnings $exec_ou + + regsub -all "(^|\n)($ld: warning: cannot find entry symbol\[^\n\]*\n?)" $exec_output "\\1" exec_output + ++setup_xfail i686*-*-* ++ + if [string match "" $exec_output] then { + fail $test7 + } else { +diff -rupN --no-dereference binutils-2.37/ld/testsuite/ld-shared/shared.exp binutils-2.37-new/ld/testsuite/ld-shared/shared.exp +--- binutils-2.37/ld/testsuite/ld-shared/shared.exp 2021-07-08 13:37:20.000000000 +0200 ++++ binutils-2.37-new/ld/testsuite/ld-shared/shared.exp 2021-07-24 21:59:28.987706795 +0200 +@@ -36,9 +36,6 @@ if { ![istarget hppa*64*-*-hpux*] \ + && ![istarget hppa*-*-linux*] \ + && ![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.37/ld/testsuite/ld-x86-64/x86-64.exp binutils-2.37-new/ld/testsuite/ld-x86-64/x86-64.exp +--- binutils-2.37/ld/testsuite/ld-x86-64/x86-64.exp 2021-07-08 13:37:20.000000000 +0200 ++++ binutils-2.37-new/ld/testsuite/ld-x86-64/x86-64.exp 2021-07-24 21:59:28.987706795 +0200 +@@ -1466,22 +1466,6 @@ if { [isnative] && [check_compiler_avail + } else { + run_cc_link_tests [list \ + [list \ +- "Build pr22001-1b" \ +- "$NOPIE_LDFLAGS -Wl,-z,nocopyreloc,--no-as-needed,-z,notext tmpdir/pr22001-1.so" \ +- "$NOPIE_CFLAGS -Wa,-mx86-used-note=yes" \ +- { pr22001-1c.c } \ +- {{error_output "pr22001-1b.err"}} \ +- "pr22001-1b" \ +- ] \ +- [list \ +- "Build pr21997-1b" \ +- "$NOPIE_LDFLAGS -Wl,--no-as-needed,-z,notext tmpdir/pr21997-1.so" \ +- "$NOPIE_CFLAGS -Wa,-mx86-used-note=yes" \ +- { pr21997-1c.c } \ +- {{error_output "pr21997-1b.err"}} \ +- "pr21997-1b" \ +- ] \ +- [list \ + "Build lam-u48.so" \ + "-shared -Wl,-z,lam-u48" \ + "" \ +@@ -1813,49 +1797,6 @@ if { [isnative] && [check_compiler_avail + if { [istarget "x86_64-*-linux*"] \ + && ![istarget "x86_64-*-linux*-gnux32"]} { + +- run_cc_link_tests [list \ +- [list \ +- "Build plt-main with -z bndplt" \ +- "tmpdir/plt-main1.o tmpdir/plt-main2.o tmpdir/plt-main3.o \ +- tmpdir/plt-main4.o tmpdir/libplt-lib.so -z bndplt \ +- -z noseparate-code -z max-page-size=0x200000" \ +- "-Wa,-mx86-used-note=yes $NOCF_PROTECTION_CFLAGS" \ +- { plt-main5.c } \ +- {{objdump {-drw} plt-main-bnd.dd}} \ +- "plt-main-bnd" \ +- ] \ +- [list \ +- "Build plt-main with PIE and -z bndplt" \ +- "tmpdir/plt-main1.o tmpdir/plt-main2.o tmpdir/plt-main3.o \ +- tmpdir/plt-main4.o tmpdir/libplt-lib.so -z bndplt -pie \ +- -z noseparate-code -z max-page-size=0x200000" \ +- "-fPIC -Wa,-mx86-used-note=yes $NOCF_PROTECTION_CFLAGS" \ +- { plt-main5.c } \ +- {{objdump {-drw} plt-main-bnd.dd}} \ +- "plt-main-pie-bnd" \ +- ] \ +- [list \ +- "Build plt-main with -z bndplt -z now" \ +- "tmpdir/plt-main1.o tmpdir/plt-main2.o tmpdir/plt-main3.o \ +- tmpdir/plt-main4.o tmpdir/libplt-lib.so -z bndplt -z now \ +- -z noseparate-code -z max-page-size=0x200000" \ +- "-Wa,-mx86-used-note=yes $NOCF_PROTECTION_CFLAGS" \ +- { plt-main5.c } \ +- {{readelf {-SW} plt-main-bnd-now.rd} {objdump {-drw} plt-main-bnd.dd}} \ +- "plt-main-bnd-now" \ +- ] \ +- [list \ +- "Build plt-main with PIE and -z bndplt -z now" \ +- "tmpdir/plt-main1.o tmpdir/plt-main2.o tmpdir/plt-main3.o \ +- tmpdir/plt-main4.o tmpdir/libplt-lib.so -z bndplt -z now -pie \ +- -z noseparate-code -z max-page-size=0x200000" \ +- "-fPIC -Wa,-mx86-used-note=yes $NOCF_PROTECTION_CFLAGS" \ +- { plt-main5.c } \ +- {{readelf {-SW} plt-main-bnd-now.rd} {objdump {-drw} plt-main-bnd.dd}} \ +- "plt-main-pie-bnd-now" \ +- ] \ +- ] +- + run_ld_link_exec_tests [list \ + [list \ + "Run plt-main with -z bndplt" \ +@@ -1940,66 +1881,6 @@ if { [isnative] && [check_compiler_avail + set pltdump {{objdump {-drw} plt-main-ibt.dd}} + set pltsecdump {{readelf {-SW} plt-main-ibt-now.rd} {objdump {-drw} plt-main-ibt.dd}} + } +- run_cc_link_tests [list \ +- [list \ +- "Build plt-main with -z ibtplt" \ +- "tmpdir/plt-main1.o tmpdir/plt-main2.o tmpdir/plt-main3.o \ +- tmpdir/plt-main4.o tmpdir/libplt-lib.so -z ibtplt \ +- -z noseparate-code -z max-page-size=0x200000" \ +- "-Wa,-mx86-used-note=yes" \ +- { plt-main5.c } \ +- $pltdump \ +- "plt-main-ibt" \ +- ] \ +- [list \ +- "Build plt-main with PIE and -z ibtplt" \ +- "tmpdir/plt-main1.o tmpdir/plt-main2.o tmpdir/plt-main3.o \ +- tmpdir/plt-main4.o tmpdir/libplt-lib.so -z ibtplt -pie \ +- -z noseparate-code -z max-page-size=0x200000" \ +- "-fPIC -Wa,-mx86-used-note=yes" \ +- { plt-main5.c } \ +- $pltdump \ +- "plt-main-pie-ibt" \ +- ] \ +- [list \ +- "Build plt-main with -z ibtplt -z now" \ +- "tmpdir/plt-main1.o tmpdir/plt-main2.o tmpdir/plt-main3.o \ +- tmpdir/plt-main4.o tmpdir/libplt-lib.so -z ibtplt -z now \ +- -z noseparate-code -z max-page-size=0x200000" \ +- "-Wa,-mx86-used-note=yes" \ +- { plt-main5.c } \ +- $pltsecdump \ +- "plt-main-ibt-now" \ +- ] \ +- [list \ +- "Build plt-main with PIE and -z ibtplt -z now" \ +- "tmpdir/plt-main1.o tmpdir/plt-main2.o tmpdir/plt-main3.o \ +- tmpdir/plt-main4.o tmpdir/libplt-lib.so -z ibtplt -z now -pie \ +- -z noseparate-code -z max-page-size=0x200000" \ +- "-fPIC -Wa,-mx86-used-note=yes" \ +- { plt-main5.c } \ +- $pltsecdump \ +- "plt-main-pie-ibt-now" \ +- ] \ +- [list \ +- "Build libibtplt-lib.so with -z ibtplt" \ +- "-shared -z ibtplt \ +- -z noseparate-code -z max-page-size=0x200000" \ +- "-fPIC -Wa,-mx86-used-note=yes" \ +- { plt-main1.c plt-main2.c plt-main3.c plt-main4.c} \ +- $pltdump \ +- "libibtplt-lib.so" \ +- ] \ +- [list \ +- "Build libibtplt--now-lib.so with -z ibtplt -z now" \ +- "-shared -z ibtplt -z now \ +- -z noseparate-code -z max-page-size=0x200000" \ +- "-fPIC -Wa,-mx86-used-note=yes" \ +- { plt-main1.c plt-main2.c plt-main3.c plt-main4.c} \ +- $pltdump \ +- "libibtplt-now-lib.so" \ +- ] \ +- ] + + run_ld_link_exec_tests [list \ + [list \ +@@ -2044,24 +1925,6 @@ if { [isnative] && [check_compiler_avail + "plt-main.out" \ + "-fPIC" \ + ] \ +- [list \ +- "Run plt-main with libibtplt-lib.so -z ibtplt" \ +- "-Wl,--no-as-needed,-z,ibtplt tmpdir/libibtplt-lib.so \ +- tmpdir/libplt-lib.so" \ +- "-Wa,-mx86-used-note=yes" \ +- { plt-main5.c } \ +- "plt-main-ibt-lib" \ +- "plt-main.out" \ +- ] \ +- [list \ +- "Run plt-main with libibtplt-lib.so -z ibtplt -z now" \ +- "-Wl,--no-as-needed,-z,ibtplt,-z,now \ +- tmpdir/libibtplt-now-lib.so tmpdir/libplt-lib.so" \ +- "-Wa,-mx86-used-note=yes" \ +- { plt-main5.c } \ +- "plt-main-ibt-now-lib" \ +- "plt-main.out" \ +- ] \ + ] + + if { [check_ifunc_attribute_available] } { +@@ -2088,7 +1951,6 @@ if { [isnative] && [check_compiler_avail + } + } + +- undefined_weak "$NOPIE_CFLAGS" "$NOPIE_LDFLAGS" + undefined_weak "-fPIE" "" + undefined_weak "-fPIE" "-pie" + undefined_weak "-fPIE" "-Wl,-z,nodynamic-undefined-weak" diff --git a/binutils-use-long-long.patch b/binutils-use-long-long.patch new file mode 100644 index 0000000..8ac8f85 --- /dev/null +++ b/binutils-use-long-long.patch @@ -0,0 +1,38 @@ +diff -rupN --no-dereference binutils-2.37/bfd/configure binutils-2.37-new/bfd/configure +--- binutils-2.37/bfd/configure 2021-07-18 18:36:53.000000000 +0200 ++++ binutils-2.37-new/bfd/configure 2021-07-24 21:59:26.907727053 +0200 +@@ -12751,11 +12751,13 @@ if test "x${ac_cv_sizeof_long}" = "x8"; + BFD_HOST_64BIT_LONG=1 + test -n "${HOST_64BIT_TYPE}" || HOST_64BIT_TYPE="long" + test -n "${HOST_U_64BIT_TYPE}" || HOST_U_64BIT_TYPE="unsigned long" +-elif test "x${ac_cv_sizeof_long_long}" = "x8"; then ++fi ++if test "x${ac_cv_sizeof_long_long}" = "x8"; then + BFD_HOST_64BIT_LONG_LONG=1 + test -n "${HOST_64BIT_TYPE}" || HOST_64BIT_TYPE="long long" + test -n "${HOST_U_64BIT_TYPE}" || HOST_U_64BIT_TYPE="unsigned long long" +- if test "x${ac_cv_sizeof_void_p}" = "x8"; then ++ if test "x${ac_cv_sizeof_void_p}" = "x8" \ ++ -a "x${ac_cv_sizeof_long}" != "x8"; then + BFD_HOSTPTR_T="unsigned long long" + fi + fi +diff -rupN --no-dereference binutils-2.37/bfd/configure.ac binutils-2.37-new/bfd/configure.ac +--- binutils-2.37/bfd/configure.ac 2021-07-08 13:37:19.000000000 +0200 ++++ binutils-2.37-new/bfd/configure.ac 2021-07-24 21:59:26.908727043 +0200 +@@ -230,11 +230,13 @@ if test "x${ac_cv_sizeof_long}" = "x8"; + BFD_HOST_64BIT_LONG=1 + test -n "${HOST_64BIT_TYPE}" || HOST_64BIT_TYPE="long" + test -n "${HOST_U_64BIT_TYPE}" || HOST_U_64BIT_TYPE="unsigned long" +-elif test "x${ac_cv_sizeof_long_long}" = "x8"; then ++fi ++if test "x${ac_cv_sizeof_long_long}" = "x8"; then + BFD_HOST_64BIT_LONG_LONG=1 + test -n "${HOST_64BIT_TYPE}" || HOST_64BIT_TYPE="long long" + test -n "${HOST_U_64BIT_TYPE}" || HOST_U_64BIT_TYPE="unsigned long long" +- if test "x${ac_cv_sizeof_void_p}" = "x8"; then ++ if test "x${ac_cv_sizeof_void_p}" = "x8" \ ++ -a "x${ac_cv_sizeof_long}" != "x8"; then + BFD_HOSTPTR_T="unsigned long long" + fi + fi diff --git a/binutils-2.25-version.patch b/binutils-version.patch similarity index 72% rename from binutils-2.25-version.patch rename to binutils-version.patch index c430d1d..5438e58 100644 --- a/binutils-2.25-version.patch +++ b/binutils-version.patch @@ -1,7 +1,7 @@ -diff -rupN --no-dereference binutils-2.34/bfd/Makefile.am binutils-2.34-new/bfd/Makefile.am ---- binutils-2.34/bfd/Makefile.am 2020-01-18 14:55:47.000000000 +0100 -+++ binutils-2.34-new/bfd/Makefile.am 2020-12-18 02:57:12.205063623 +0100 -@@ -967,8 +967,8 @@ DISTCLEANFILES = $(BUILD_CFILES) $(BUILD +diff -rupN --no-dereference binutils-2.37/bfd/Makefile.am binutils-2.37-new/bfd/Makefile.am +--- binutils-2.37/bfd/Makefile.am 2021-07-08 13:37:19.000000000 +0200 ++++ binutils-2.37-new/bfd/Makefile.am 2021-07-24 21:59:00.067988456 +0200 +@@ -942,8 +942,8 @@ DISTCLEANFILES = $(BUILD_CFILES) $(BUILD bfdver.h: $(srcdir)/version.h $(srcdir)/development.sh $(srcdir)/Makefile.in @echo "creating $@" @bfd_version=`echo "$(VERSION)" | $(SED) -e 's/\([^\.]*\)\.*\([^\.]*\)\.*\([^\.]*\)\.*\([^\.]*\)\.*\([^\.]*\).*/\1.00\2.00\3.00\4.00\5/' -e 's/\([^\.]*\)\..*\(..\)\..*\(..\)\..*\(..\)\..*\(..\)$$/\1\2\3\4\5/'` ;\ @@ -12,7 +12,7 @@ diff -rupN --no-dereference binutils-2.34/bfd/Makefile.am binutils-2.34-new/bfd/ bfd_version_package="\"$(PKGVERSION)\"" ;\ report_bugs_to="\"$(REPORT_BUGS_TO)\"" ;\ . $(srcdir)/development.sh ;\ -@@ -979,7 +979,7 @@ bfdver.h: $(srcdir)/version.h $(srcdir)/ +@@ -954,7 +954,7 @@ bfdver.h: $(srcdir)/version.h $(srcdir)/ fi ;\ $(SED) -e "s,@bfd_version@,$$bfd_version," \ -e "s,@bfd_version_string@,$$bfd_version_string," \ @@ -21,10 +21,10 @@ diff -rupN --no-dereference binutils-2.34/bfd/Makefile.am binutils-2.34-new/bfd/ -e "s,@report_bugs_to@,$$report_bugs_to," \ < $(srcdir)/version.h > $@; \ echo "$${bfd_soversion}" > libtool-soversion -diff -rupN --no-dereference binutils-2.34/bfd/Makefile.in binutils-2.34-new/bfd/Makefile.in ---- binutils-2.34/bfd/Makefile.in 2020-02-01 12:49:13.000000000 +0100 -+++ binutils-2.34-new/bfd/Makefile.in 2020-12-18 02:57:12.205063623 +0100 -@@ -2081,8 +2081,8 @@ stmp-lcoff-h: $(LIBCOFF_H_FILES) +diff -rupN --no-dereference binutils-2.37/bfd/Makefile.in binutils-2.37-new/bfd/Makefile.in +--- binutils-2.37/bfd/Makefile.in 2021-07-18 18:36:53.000000000 +0200 ++++ binutils-2.37-new/bfd/Makefile.in 2021-07-24 21:59:00.069988437 +0200 +@@ -2053,8 +2053,8 @@ stmp-lcoff-h: $(LIBCOFF_H_FILES) bfdver.h: $(srcdir)/version.h $(srcdir)/development.sh $(srcdir)/Makefile.in @echo "creating $@" @bfd_version=`echo "$(VERSION)" | $(SED) -e 's/\([^\.]*\)\.*\([^\.]*\)\.*\([^\.]*\)\.*\([^\.]*\)\.*\([^\.]*\).*/\1.00\2.00\3.00\4.00\5/' -e 's/\([^\.]*\)\..*\(..\)\..*\(..\)\..*\(..\)\..*\(..\)$$/\1\2\3\4\5/'` ;\ @@ -35,7 +35,7 @@ diff -rupN --no-dereference binutils-2.34/bfd/Makefile.in binutils-2.34-new/bfd/ bfd_version_package="\"$(PKGVERSION)\"" ;\ report_bugs_to="\"$(REPORT_BUGS_TO)\"" ;\ . $(srcdir)/development.sh ;\ -@@ -2093,7 +2093,7 @@ bfdver.h: $(srcdir)/version.h $(srcdir)/ +@@ -2065,7 +2065,7 @@ bfdver.h: $(srcdir)/version.h $(srcdir)/ fi ;\ $(SED) -e "s,@bfd_version@,$$bfd_version," \ -e "s,@bfd_version_string@,$$bfd_version_string," \ diff --git a/binutils_CVE-2020-16592.patch b/binutils_CVE-2020-16592.patch deleted file mode 100644 index b8f0125..0000000 --- a/binutils_CVE-2020-16592.patch +++ /dev/null @@ -1,39 +0,0 @@ -diff -rupN --no-dereference binutils-2.34/bfd/peXXigen.c binutils-2.34-new/bfd/peXXigen.c ---- binutils-2.34/bfd/peXXigen.c 2020-01-18 14:55:47.000000000 +0100 -+++ binutils-2.34-new/bfd/peXXigen.c 2020-12-18 02:57:24.508020278 +0100 -@@ -177,25 +177,25 @@ _bfd_XXi_swap_sym_in (bfd * abfd, void * - int unused_section_number = 0; - asection *sec; - flagword flags; -+ size_t name_len; -+ char *sec_name; - - for (sec = abfd->sections; sec; sec = sec->next) - if (unused_section_number <= sec->target_index) - unused_section_number = sec->target_index + 1; - -- if (name == namebuf) -+ name_len = strlen (name) + 1; -+ sec_name = bfd_alloc (abfd, name_len); -+ if (sec_name == NULL) - { -- name = (const char *) bfd_alloc (abfd, strlen (namebuf) + 1); -- if (name == NULL) -- { -- _bfd_error_handler (_("%pB: out of memory creating name for empty section"), -- abfd); -- return; -- } -- strcpy ((char *) name, namebuf); -+ _bfd_error_handler (_("%pB: out of memory creating name " -+ "for empty section"), abfd); -+ return; - } -+ memcpy (sec_name, name, name_len); - - flags = SEC_HAS_CONTENTS | SEC_ALLOC | SEC_DATA | SEC_LOAD; -- sec = bfd_make_section_anyway_with_flags (abfd, name, flags); -+ sec = bfd_make_section_anyway_with_flags (abfd, sec_name, flags); - if (sec == NULL) - { - _bfd_error_handler (_("%pB: unable to create fake empty section"), diff --git a/binutils_CVE-2020-16598.patch b/binutils_CVE-2020-16598.patch deleted file mode 100644 index 3291b52..0000000 --- a/binutils_CVE-2020-16598.patch +++ /dev/null @@ -1,12 +0,0 @@ -diff -rupN --no-dereference binutils-2.34/binutils/debug.c binutils-2.34-new/binutils/debug.c ---- binutils-2.34/binutils/debug.c 2020-01-18 14:55:47.000000000 +0100 -+++ binutils-2.34-new/binutils/debug.c 2020-12-18 02:57:25.423017056 +0100 -@@ -3277,6 +3277,8 @@ debug_class_type_samep (struct debug_han - names, since that sometimes fails in the presence of - typedefs and we really don't care. */ - if (strcmp (f1->name, f2->name) != 0 -+ || f1->type == NULL -+ || f2->type == NULL - || ! debug_type_samep (info, - debug_get_real_type ((void *) info, - f1->type, NULL), diff --git a/mingw-binutils.spec b/mingw-binutils.spec index 7983a0a..4365381 100644 --- a/mingw-binutils.spec +++ b/mingw-binutils.spec @@ -1,24 +1,30 @@ %global run_testsuite 1 Name: mingw-binutils -Version: 2.34 -Release: 10%{?dist} +Version: 2.37 +Release: 1%{?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.bz2 +Source0: http://ftp.gnu.org/gnu/binutils/binutils-%{version}.tar.xz ### Patches from native package - -# Unneeded, mingw does not have lib64 -# Patch01: binutils-2.20.51.0.2-libtool-lib64.patch +# Purpose: Use /lib64 and /usr/lib64 instead of /lib and /usr/lib in the +# default library search path of 64-bit targets. +# Lifetime: Permanent, but it should not be. This is a bug in the libtool +# sources used in both binutils and gcc, (specifically the +# libtool.m4 file). These are based on a version released in 2009 +# (2.2.6?) rather than the latest version. (Definitely fixed in +# libtool version 2.4.6). +# 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-2.25-version.patch +Patch02: binutils-version.patch # Purpose: Exports the demangle.h header file (associated with the libiberty # sources) with the binutils-devel rpm. @@ -34,7 +40,7 @@ Patch03: binutils-export-demangle.h.patch # 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-2.22.52.0.4-no-config-h-check.patch +Patch04: binutils-no-config-h-check.patch # Purpose: Include the filename concerned in readelf error messages. This # makes readelf's output more helpful when it is run on multiple @@ -43,10 +49,15 @@ Patch04: binutils-2.22.52.0.4-no-config-h-check.patch # making it better (IMHO) but also potentially breaking tools that # depend upon readelf's current format. Hence it remains a local # patch. -Patch05: binutils-2.29-filename-in-error-messages.patch +Patch05: binutils-filename-in-error-messages.patch -# Unneeded, affects ELF only -# Patch06: binutils-2.29-revert-PLT-elision.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. @@ -56,63 +67,60 @@ Patch05: binutils-2.29-filename-in-error-messages.patch # no longer being maintained. Patch07: binutils-readelf-other-sym-info.patch -# Unneeded, affects ELF only -# Patch08: binutils-2.27-aarch64-ifunc.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 -# Unneeded, affects ELF only -# Patch10: binutils-attach-to-group.patch - -# Purpose: Stop gold from complaining about relocs in the .gnu.build.attribute -# section that reference symbols in discarded sections. -# Lifetime: Fixed in 2.33 (maybe) -Patch11: binutils-gold-ignore-discarded-note-relocs.patch - # Purpose: Allow OS specific sections in section groups. -# Lifetime: Might be fixed in 2.33 -Patch12: binutils-special-sections-in-groups.patch +# Lifetime: Fixed in 2.38 (maybe) +Patch10: binutils-special-sections-in-groups.patch # Purpose: Fix linker testsuite failures. -# Lifetime: Fixed in 2.33 (possibly) -Patch13: binutils-fix-testsuite-failures.patch +# Lifetime: Fixed in 2.37 (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.35 (maybe) -Patch14: binutils-gold-mismatched-section-flags.patch - -# Purpose: Fix a potential use of an initialised field by readelf. -# Lifetime: Fixed in 2.35 -Patch15: binutils-readelf-compression-header-size.patch +# Lifetime: Fixed in 2.38 (maybe) +Patch12: binutils-gold-mismatched-section-flags.patch # Purpose: Add a check to the GOLD linker for a corrupt input file # with a fuzzed section offset. -# Lifetime: Fixed in 2.35 (maybe) -Patch16: binutils-CVE-2019-1010204.patch -# Backport fix for CVE-2020-16592 -# https://sourceware.org/git/gitweb.cgi?p=binutils-gdb.git;h=7ecb51549ab1ec22aba5aaf34b70323cf0b8509a -Patch17: binutils_CVE-2020-16592.patch -# Backport fix for CVE-2020-16598 -# https://sourceware.org/git/gitweb.cgi?p=binutils-gdb.git;h=ca3f923f82a079dcf441419f4a50a50f8b4b33c2 -Patch18: binutils_CVE-2020-16598.patch +# Lifetime: Fixed in 2.38 (maybe) +Patch13: binutils-CVE-2019-1010204.patch -# Backport fixes for CVE-2021-20197. -Patch19: binutils-gdb.git-365f5fb6d0f0da83817431a275e99e6f6babbe04.patch -Patch20: binutils-gdb.git-1a1c3b4cc17687091cff5a368bd6f13742bcfdf8.patch -Patch21: binutils-gdb.git-014cc7f849e8209623fc99264814bce7b3b6faf2.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. +Patch14: binutils-gold-warn-unsupported.patch -# This fixes CVE-2021-20197 patches above. See: -# https://sourceware.org/bugzilla/show_bug.cgi?id=27270 -Patch22: binutils-gdb.git-6184480d7ce1bcd57669a62867efc68418d0de7c.patch +# Purpose: Use the "unsigned long long" type for pointers on hosts where +# long is a 32-bit type but pointers are a 64-bit type. Necessary +# because users expect to be able to install both the i686- and +# x86_64 versions of binutils-devel on the same machine, so they +# need to identical versions of the bfd.h header file. +# Lifetime: Permanent. +Patch15: binutils-use-long-long.patch -### MINGW specific patches -Patch102: binutils-config.patch +# Purpose: Fix testsuite failures due to the patches applied here. +# Lifetime: Permanent, but varying with each new rebase. +Patch16: binutils-testsuite-fixes.patch -BuildRequires: make +# Purpose: Enable the creation of .note.gnu.property sections by the GOLD +# linker for x86 binaries. +# Lifetime: Fixed in 2.38 maybe +Patch17: binutils-gold-i386-gnu-property-notes.patch + + +BuildRequires: make BuildRequires: gcc BuildRequires: flex BuildRequires: bison @@ -125,7 +133,6 @@ BuildRequires: dejagnu BuildRequires: sharutils %endif Provides: bundled(libiberty) -BuildRequires: autoconf, automake %description @@ -170,16 +177,6 @@ sed -i -e 's/%''{release}/%{release}/g' bfd/Makefile{.am,.in} %build -# Dependencies are not set up to rebuild the configure files -# in the subdirectories. So we just rebuild the ones we care -# about -pushd libiberty -autoconf -popd -pushd intl -autoconf -popd - # We call configure directly rather than via macros, thus if # we are using LTO, we have to manually fix the broken configure # scripts @@ -284,6 +281,7 @@ 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 @@ -373,6 +371,10 @@ rm -rf %{buildroot}/multilib %changelog +* Thu Aug 12 2021 Richard W.M. Jones - 2.37-1 +- Rebase to binutils 2.37 + resolves: rhbz#1953913 + * Mon Aug 09 2021 Mohan Boddu - 2.34-10 - Rebuilt for IMA sigs, glibc 2.34, aarch64 flags Related: rhbz#1991688 diff --git a/sources b/sources index 24c4851..b8c6109 100644 --- a/sources +++ b/sources @@ -1 +1 @@ -SHA512 (binutils-2.34.tar.bz2) = f47e7304e102c7bbc97958a08093e27796b9051d1567ce4fbb723d39ef3e29efa325ee14a1bdcc462a925a7f9bbbc9aee28294c6dc23850f371030f3835a8067 +SHA512 (binutils-2.37.tar.xz) = 5c11aeef6935860a6819ed3a3c93371f052e52b4bdc5033da36037c1544d013b7f12cb8d561ec954fe7469a68f1b66f1a3cd53d5a3af7293635a90d69edd15e7