From 7286330d02940dd660037b0aa76d6eacc64e024b Mon Sep 17 00:00:00 2001 From: Sandro Mani Date: Sun, 30 Oct 2022 12:42:07 +0100 Subject: [PATCH] Rebase patches --- binutils-autoconf-version.patch | 5 +- ...ls-do-not-link-with-static-libstdc++.patch | 16 +- binutils-export-demangle.h.patch | 18 +- binutils-filename-in-error-messages.patch | 24 +- binutils-fix-testsuite-failures.patch | 586 +++--- binutils-gas-dwarf-skip-empty-functions.patch | 38 +- binutils-gold-i386-gnu-property-notes.patch | 15 +- binutils-gold-mismatched-section-flags.patch | 10 +- binutils-gold-warn-unsupported.patch | 67 +- binutils-libtool-no-rpath.patch | 7 +- binutils-no-config-h-check.patch | 14 +- binutils-package-metadata.patch | 122 +- binutils-readelf-other-sym-info.patch | 9 +- binutils-revert-PLT-elision.patch | 438 ++-- binutils-special-sections-in-groups.patch | 9 +- binutils-testsuite-fixes.patch | 1814 ++++++++--------- binutils-version.patch | 20 +- 17 files changed, 1497 insertions(+), 1715 deletions(-) diff --git a/binutils-autoconf-version.patch b/binutils-autoconf-version.patch index f94fdad..c555904 100644 --- a/binutils-autoconf-version.patch +++ b/binutils-autoconf-version.patch @@ -1,5 +1,6 @@ ---- binutils.orig/config/override.m4 2021-08-31 14:20:17.275574804 +0100 -+++ binutils-2.37/config/override.m4 2021-08-31 14:36:37.793954247 +0100 +diff -rupN --no-dereference binutils-2.39/config/override.m4 binutils-2.39-new/config/override.m4 +--- binutils-2.39/config/override.m4 2022-07-08 11:46:47.000000000 +0200 ++++ binutils-2.39-new/config/override.m4 2022-10-30 12:41:36.883023796 +0100 @@ -41,7 +41,7 @@ dnl Or for updating the whole tree at on AC_DEFUN([_GCC_AUTOCONF_VERSION_CHECK], [m4_if(m4_defn([_GCC_AUTOCONF_VERSION]), diff --git a/binutils-do-not-link-with-static-libstdc++.patch b/binutils-do-not-link-with-static-libstdc++.patch index 49d46c2..ae1f1c2 100644 --- a/binutils-do-not-link-with-static-libstdc++.patch +++ b/binutils-do-not-link-with-static-libstdc++.patch @@ -1,7 +1,7 @@ -diff -rup binutils.orig/configure binutils-2.30/configure ---- binutils.orig/configure 2018-09-24 17:50:06.967172922 +0100 -+++ binutils-2.30/configure 2018-09-24 17:51:16.648624865 +0100 -@@ -4996,49 +4996,6 @@ if test -z "$LD"; then +diff -rupN --no-dereference binutils-2.39/configure binutils-2.39-new/configure +--- binutils-2.39/configure 2022-07-08 11:55:40.000000000 +0200 ++++ binutils-2.39-new/configure 2022-10-30 12:41:28.785023757 +0100 +@@ -5276,49 +5276,6 @@ if test -z "$LD"; then fi fi @@ -51,10 +51,10 @@ diff -rup binutils.orig/configure binutils-2.30/configure if test -n "$ac_tool_prefix"; then -diff -rup binutils.orig/configure.ac binutils-2.30/configure.ac ---- binutils.orig/configure.ac 2018-09-24 17:50:07.241170767 +0100 -+++ binutils-2.30/configure.ac 2018-09-24 17:50:29.908992486 +0100 -@@ -1288,26 +1288,6 @@ if test -z "$LD"; then +diff -rupN --no-dereference binutils-2.39/configure.ac binutils-2.39-new/configure.ac +--- binutils-2.39/configure.ac 2022-08-05 13:02:04.000000000 +0200 ++++ binutils-2.39-new/configure.ac 2022-10-30 12:41:28.786023757 +0100 +@@ -1314,26 +1314,6 @@ if test -z "$LD"; then fi fi diff --git a/binutils-export-demangle.h.patch b/binutils-export-demangle.h.patch index 9716a8b..237f719 100644 --- a/binutils-export-demangle.h.patch +++ b/binutils-export-demangle.h.patch @@ -1,7 +1,7 @@ -diff -rup binutils.orig/bfd/Makefile.am binutils-2.32/bfd/Makefile.am ---- binutils.orig/bfd/Makefile.am 2019-02-08 12:22:51.395684251 +0000 -+++ binutils-2.32/bfd/Makefile.am 2019-02-08 12:22:53.970664973 +0000 -@@ -33,7 +33,7 @@ bfdlibdir = @bfdlibdir@ +diff -rupN --no-dereference binutils-2.39/bfd/Makefile.am binutils-2.39-new/bfd/Makefile.am +--- binutils-2.39/bfd/Makefile.am 2022-10-30 12:41:22.907023730 +0100 ++++ binutils-2.39-new/bfd/Makefile.am 2022-10-30 12:41:22.912023730 +0100 +@@ -38,7 +38,7 @@ bfdlibdir = @bfdlibdir@ bfdincludedir = @bfdincludedir@ bfdlib_LTLIBRARIES = libbfd.la bfdinclude_HEADERS = $(BFD_H) $(INCDIR)/ansidecl.h $(INCDIR)/symcat.h \ @@ -10,10 +10,10 @@ diff -rup binutils.orig/bfd/Makefile.am binutils-2.32/bfd/Makefile.am else !INSTALL_LIBBFD # Empty these so that the respective installation directories will not be created. bfdlibdir = -diff -rup binutils.orig/bfd/Makefile.in binutils-2.32/bfd/Makefile.in ---- binutils.orig/bfd/Makefile.in 2019-02-08 12:21:35.291254044 +0000 -+++ binutils-2.32/bfd/Makefile.in 2019-02-08 12:22:10.163992947 +0000 -@@ -249,7 +249,7 @@ am__can_run_installinfo = \ +diff -rupN --no-dereference binutils-2.39/bfd/Makefile.in binutils-2.39-new/bfd/Makefile.in +--- binutils-2.39/bfd/Makefile.in 2022-10-30 12:41:22.908023730 +0100 ++++ binutils-2.39-new/bfd/Makefile.in 2022-10-30 12:41:22.912023730 +0100 +@@ -290,7 +290,7 @@ am__can_run_installinfo = \ esac am__bfdinclude_HEADERS_DIST = $(INCDIR)/plugin-api.h bfd.h \ $(INCDIR)/ansidecl.h $(INCDIR)/symcat.h \ @@ -22,7 +22,7 @@ diff -rup binutils.orig/bfd/Makefile.in binutils-2.32/bfd/Makefile.in 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 +@@ -511,7 +511,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 \ diff --git a/binutils-filename-in-error-messages.patch b/binutils-filename-in-error-messages.patch index e23d3ec..c9b406e 100644 --- a/binutils-filename-in-error-messages.patch +++ b/binutils-filename-in-error-messages.patch @@ -1,9 +1,12 @@ ---- binutils.orig/binutils/readelf.c 2021-07-19 12:39:14.206556025 +0100 -+++ binutils-2.37/binutils/readelf.c 2021-07-19 12:44:37.712728732 +0100 -@@ -21873,45 +21873,52 @@ process_file (char * file_name) +diff -rupN --no-dereference binutils-2.39/binutils/readelf.c binutils-2.39-new/binutils/readelf.c +--- binutils-2.39/binutils/readelf.c 2022-07-08 11:46:47.000000000 +0200 ++++ binutils-2.39-new/binutils/readelf.c 2022-10-30 12:41:25.339023741 +0100 +@@ -22710,46 +22710,53 @@ process_file (char * file_name) + Filedata * filedata = NULL; struct stat statbuf; char armag[SARMAG]; - bool ret = true; +- bool ret = true; ++ bool ret = false; + char * name; + char * saved_program_name; + @@ -67,7 +70,7 @@ } filedata->file_size = (bfd_size_type) statbuf.st_size; -@@ -21919,33 +21926,39 @@ process_file (char * file_name) +@@ -22757,33 +22764,39 @@ process_file (char * file_name) if (memcmp (armag, ARMAG, SARMAG) == 0) { @@ -121,14 +124,3 @@ free (ba_cache.strtab); ba_cache.strtab = NULL; ---- binutils.orig/binutils/readelf.c 2021-08-10 10:15:22.088016072 +0100 -+++ binutils-2.37/binutils/readelf.c 2021-08-10 10:15:55.567907891 +0100 -@@ -21884,7 +21884,7 @@ process_file (char * file_name) - Filedata * filedata = NULL; - struct stat statbuf; - char armag[SARMAG]; -- bool ret = true; -+ bool ret = false; - char * name; - char * saved_program_name; - diff --git a/binutils-fix-testsuite-failures.patch b/binutils-fix-testsuite-failures.patch index c2b19a5..87d4b29 100644 --- a/binutils-fix-testsuite-failures.patch +++ b/binutils-fix-testsuite-failures.patch @@ -1,305 +1,6 @@ -diff -rup binutils-2.32.orig/ld/testsuite/ld-plugin/plugin-10.d binutils-2.32/ld/testsuite/ld-plugin/plugin-10.d ---- binutils-2.32.orig/ld/testsuite/ld-plugin/plugin-10.d 2019-02-15 13:33:21.979627285 +0000 -+++ binutils-2.32/ld/testsuite/ld-plugin/plugin-10.d 2019-02-15 13:40:26.911199033 +0000 -@@ -34,5 +34,6 @@ hook called: claim_file tmpdir/libtext.a - hook called: all symbols read. - Sym: '_?func' Resolution: LDPR_PREVAILING_DEF - Sym: '_?func2' Resolution: LDPR_PREVAILING_DEF_IRONLY -+#... - hook called: cleanup. - #... -diff -rup binutils-2.32.orig/ld/testsuite/ld-plugin/plugin-13.d binutils-2.32/ld/testsuite/ld-plugin/plugin-13.d ---- binutils-2.32.orig/ld/testsuite/ld-plugin/plugin-13.d 2019-02-15 13:33:21.980627277 +0000 -+++ binutils-2.32/ld/testsuite/ld-plugin/plugin-13.d 2019-02-15 13:41:30.189692800 +0000 -@@ -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 -rup binutils-2.32.orig/ld/testsuite/ld-plugin/plugin-14.d binutils-2.32/ld/testsuite/ld-plugin/plugin-14.d ---- binutils-2.32.orig/ld/testsuite/ld-plugin/plugin-14.d 2019-02-15 13:33:21.977627301 +0000 -+++ binutils-2.32/ld/testsuite/ld-plugin/plugin-14.d 2019-02-15 13:42:03.598430960 +0000 -@@ -27,7 +27,6 @@ hook called: claim_file .*/ld/testsuite/ - hook called: claim_file tmpdir/text.o \[@0/.* not claimed - #... - hook called: all symbols read. --.*: tmpdir/main.o: in function `main': --.*main.c.*: undefined reference to `\.?func' -+#... - hook called: cleanup. - #... -diff -rup binutils-2.32.orig/ld/testsuite/ld-plugin/plugin-15.d binutils-2.32/ld/testsuite/ld-plugin/plugin-15.d ---- binutils-2.32.orig/ld/testsuite/ld-plugin/plugin-15.d 2019-02-15 13:33:21.980627277 +0000 -+++ binutils-2.32/ld/testsuite/ld-plugin/plugin-15.d 2019-02-15 13:42:28.014239600 +0000 -@@ -28,7 +28,6 @@ hook called: claim_file .*/ld/testsuite/ - hook called: claim_file tmpdir/text.o \[@0/.* not claimed - #... - hook called: all symbols read. --.*: tmpdir/main.o: in function `main': --.*main.c.*: undefined reference to `\.?func' -+#... - hook called: cleanup. - #... -diff -rup binutils-2.32.orig/ld/testsuite/ld-plugin/plugin-16.d binutils-2.32/ld/testsuite/ld-plugin/plugin-16.d ---- binutils-2.32.orig/ld/testsuite/ld-plugin/plugin-16.d 2019-02-15 13:33:21.977627301 +0000 -+++ binutils-2.32/ld/testsuite/ld-plugin/plugin-16.d 2019-02-15 13:43:21.309821910 +0000 -@@ -30,9 +30,8 @@ hook called: claim_file .*/ld/testsuite/ - hook called: claim_file tmpdir/text.o \[@0/.* not claimed - #... - hook called: all symbols read. --Sym: '_?func' Resolution: LDPR_PREVAILING_DEF -+Sym: '_?func' Resolution: LDPR_PREVAILING_DEF_IRONLY - Sym: '_?func2' Resolution: LDPR_PREVAILING_DEF_IRONLY --.*: tmpdir/main.o: in function `main': --.*main.c.*: undefined reference to `\.?func' -+#... - hook called: cleanup. - #... -diff -rup binutils-2.32.orig/ld/testsuite/ld-plugin/plugin-17.d binutils-2.32/ld/testsuite/ld-plugin/plugin-17.d ---- binutils-2.32.orig/ld/testsuite/ld-plugin/plugin-17.d 2019-02-15 13:33:21.977627301 +0000 -+++ binutils-2.32/ld/testsuite/ld-plugin/plugin-17.d 2019-02-15 13:43:54.925558451 +0000 -@@ -31,7 +31,8 @@ hook called: claim_file .*/ld/testsuite/ - hook called: claim_file tmpdir/text.o \[@0/.* not claimed - #... - hook called: all symbols read. --Sym: '_?func' Resolution: LDPR_PREVAILING_DEF -+Sym: '_?func' Resolution: LDPR_PREVAILING_DEF_IRONLY - Sym: '_?func2' Resolution: LDPR_PREVAILING_DEF_IRONLY -+#... - hook called: cleanup. - #... -diff -rup binutils-2.32.orig/ld/testsuite/ld-plugin/plugin-20.d binutils-2.32/ld/testsuite/ld-plugin/plugin-20.d ---- binutils-2.32.orig/ld/testsuite/ld-plugin/plugin-20.d 2019-02-15 13:33:21.980627277 +0000 -+++ binutils-2.32/ld/testsuite/ld-plugin/plugin-20.d 2019-02-15 13:49:20.091010016 +0000 -@@ -2,6 +2,5 @@ hook called: all symbols read. - Input: func.c \(tmpdir/libfunc.a\) - Sym: '_?func' Resolution: LDPR_PREVAILING_DEF.* - Sym: '_?func' Resolution: LDPR_PREVAILING_DEF.* --.*: tmpdir/main.o: in function `main': --.*main.c.*: undefined reference to `\.?func' -+#... - hook called: cleanup. -diff -rup binutils-2.32.orig/ld/testsuite/ld-plugin/plugin-21.d binutils-2.32/ld/testsuite/ld-plugin/plugin-21.d ---- binutils-2.32.orig/ld/testsuite/ld-plugin/plugin-21.d 2019-02-15 13:33:21.978627293 +0000 -+++ binutils-2.32/ld/testsuite/ld-plugin/plugin-21.d 2019-02-15 13:49:34.506897033 +0000 -@@ -2,6 +2,5 @@ hook called: all symbols read. - Input: .*/ld/testsuite/ld-plugin/func.c \(.*/ld/testsuite/ld-plugin/func.c\) - Sym: '_?func' Resolution: LDPR_PREVAILING_DEF.* - Sym: '_?func' Resolution: LDPR_PREVAILING_DEF.* --.*: tmpdir/main.o: in function `main': --.*main.c.*: undefined reference to `\.?func' -+#... - hook called: cleanup. -diff -rup binutils-2.32.orig/ld/testsuite/ld-plugin/plugin-22.d binutils-2.32/ld/testsuite/ld-plugin/plugin-22.d ---- binutils-2.32.orig/ld/testsuite/ld-plugin/plugin-22.d 2019-02-15 13:33:21.980627277 +0000 -+++ binutils-2.32/ld/testsuite/ld-plugin/plugin-22.d 2019-02-15 13:50:00.409694022 +0000 -@@ -2,6 +2,5 @@ Claimed: tmpdir/libfunc.a \[@.* - hook called: all symbols read. - Sym: '_?func' Resolution: LDPR_PREVAILING_DEF.* - Sym: '_?func' Resolution: LDPR_PREVAILING_DEF.* --.*: tmpdir/main.o: in function `main': --.*main.c.*: undefined reference to `\.?func' -+#... - hook called: cleanup. -diff -rup binutils-2.32.orig/ld/testsuite/ld-plugin/plugin-23.d binutils-2.32/ld/testsuite/ld-plugin/plugin-23.d ---- binutils-2.32.orig/ld/testsuite/ld-plugin/plugin-23.d 2019-02-15 13:33:21.979627285 +0000 -+++ binutils-2.32/ld/testsuite/ld-plugin/plugin-23.d 2019-02-15 13:50:14.938580156 +0000 -@@ -2,6 +2,5 @@ Claimed: .*/ld/testsuite/ld-plugin/func. - hook called: all symbols read. - Sym: '_?func' Resolution: LDPR_PREVAILING_DEF.* - Sym: '_?func' Resolution: LDPR_PREVAILING_DEF.* --.*: tmpdir/main.o: in function `main': --.*main.c.*: undefined reference to `\.?func' -+#... - hook called: cleanup. -diff -rup binutils-2.32.orig/ld/testsuite/ld-plugin/plugin-24.d binutils-2.32/ld/testsuite/ld-plugin/plugin-24.d ---- binutils-2.32.orig/ld/testsuite/ld-plugin/plugin-24.d 2019-02-15 13:33:21.980627277 +0000 -+++ binutils-2.32/ld/testsuite/ld-plugin/plugin-24.d 2019-02-15 13:49:46.346804240 +0000 -@@ -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 -rup binutils-2.32.orig/ld/testsuite/ld-plugin/plugin-25.d binutils-2.32/ld/testsuite/ld-plugin/plugin-25.d ---- binutils-2.32.orig/ld/testsuite/ld-plugin/plugin-25.d 2019-02-15 13:33:21.978627293 +0000 -+++ binutils-2.32/ld/testsuite/ld-plugin/plugin-25.d 2019-02-15 13:50:29.322467422 +0000 -@@ -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 -rup binutils-2.32.orig/ld/testsuite/ld-plugin/plugin-28.d binutils-2.32/ld/testsuite/ld-plugin/plugin-28.d ---- binutils-2.32.orig/ld/testsuite/ld-plugin/plugin-28.d 2019-02-15 13:33:21.977627301 +0000 -+++ binutils-2.32/ld/testsuite/ld-plugin/plugin-28.d 2019-02-15 13:45:05.343006557 +0000 -@@ -1 +1,3 @@ - .*: error: Error -+#... -+ -diff -rup binutils-2.32.orig/ld/testsuite/ld-plugin/plugin-29.d binutils-2.32/ld/testsuite/ld-plugin/plugin-29.d ---- binutils-2.32.orig/ld/testsuite/ld-plugin/plugin-29.d 2019-02-15 13:33:21.978627293 +0000 -+++ binutils-2.32/ld/testsuite/ld-plugin/plugin-29.d 2019-02-15 13:45:22.764870016 +0000 -@@ -1 +1,2 @@ - .*: warning: Warning -+#... -diff -rup binutils-2.32.orig/ld/testsuite/ld-plugin/plugin-30.d binutils-2.32/ld/testsuite/ld-plugin/plugin-30.d ---- binutils-2.32.orig/ld/testsuite/ld-plugin/plugin-30.d 2019-02-15 13:33:21.976627309 +0000 -+++ binutils-2.32/ld/testsuite/ld-plugin/plugin-30.d 2019-02-15 13:48:57.067190464 +0000 -@@ -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 -rup binutils-2.32.orig/ld/testsuite/ld-plugin/plugin-6.d binutils-2.32/ld/testsuite/ld-plugin/plugin-6.d ---- binutils-2.32.orig/ld/testsuite/ld-plugin/plugin-6.d 2019-02-15 13:33:21.979627285 +0000 -+++ binutils-2.32/ld/testsuite/ld-plugin/plugin-6.d 2019-02-15 13:37:14.672749977 +0000 -@@ -27,7 +27,6 @@ hook called: claim_file tmpdir/func.o \[ - hook called: claim_file tmpdir/text.o \[@0/.* not claimed - #... - hook called: all symbols read. --.*: tmpdir/main.o: in function `main': --.*main.c.*: undefined reference to `\.?func' -+#... - hook called: cleanup. - #... -diff -rup binutils-2.32.orig/ld/testsuite/ld-plugin/plugin-7.d binutils-2.32/ld/testsuite/ld-plugin/plugin-7.d ---- binutils-2.32.orig/ld/testsuite/ld-plugin/plugin-7.d 2019-02-15 13:33:21.977627301 +0000 -+++ binutils-2.32/ld/testsuite/ld-plugin/plugin-7.d 2019-02-15 13:37:58.000400421 +0000 -@@ -28,7 +28,6 @@ hook called: claim_file tmpdir/func.o \[ - hook called: claim_file tmpdir/text.o \[@0/.* not claimed - #... - hook called: all symbols read. --.*: tmpdir/main.o: in function `main': --.*main.c.*: undefined reference to `\.?func' -+#... - hook called: cleanup. - #... -diff -rup binutils-2.32.orig/ld/testsuite/ld-plugin/plugin-8.d binutils-2.32/ld/testsuite/ld-plugin/plugin-8.d ---- binutils-2.32.orig/ld/testsuite/ld-plugin/plugin-8.d 2019-02-15 13:33:21.980627277 +0000 -+++ binutils-2.32/ld/testsuite/ld-plugin/plugin-8.d 2019-02-15 13:38:34.096109209 +0000 -@@ -32,7 +32,6 @@ hook called: claim_file tmpdir/text.o \[ - hook called: all symbols read. - Sym: '_?func' Resolution: LDPR_PREVAILING_DEF - Sym: '_?func2' Resolution: LDPR_PREVAILING_DEF_IRONLY --.*: tmpdir/main.o: in function `main': --.*main.c.*: undefined reference to `\.?func' -+#... - hook called: cleanup. - #... -diff -rup binutils-2.32.orig/ld/testsuite/ld-plugin/plugin-9.d binutils-2.32/ld/testsuite/ld-plugin/plugin-9.d ---- binutils-2.32.orig/ld/testsuite/ld-plugin/plugin-9.d 2019-02-15 13:33:21.977627301 +0000 -+++ binutils-2.32/ld/testsuite/ld-plugin/plugin-9.d 2019-02-15 13:39:52.655475403 +0000 -@@ -31,7 +31,8 @@ hook called: claim_file tmpdir/func.o \[ - hook called: claim_file tmpdir/text.o \[@0/.* not claimed - #... - hook called: all symbols read. --Sym: '_?func' Resolution: LDPR_PREVAILING_DEF -+Sym: '_?func' Resolution: LDPR_PREVAILING_DEF_IRONLY - Sym: '_?func2' Resolution: LDPR_PREVAILING_DEF_IRONLY -+#... - hook called: cleanup. - #... -diff -rup binutils-2.32.orig/ld/testsuite/ld-plugin/pr20070.d binutils-2.32/ld/testsuite/ld-plugin/pr20070.d ---- binutils-2.32.orig/ld/testsuite/ld-plugin/pr20070.d 2019-02-15 13:33:21.976627309 +0000 -+++ binutils-2.32/ld/testsuite/ld-plugin/pr20070.d 2019-02-15 13:50:56.874251486 +0000 -@@ -5,5 +5,6 @@ Sym: 'weakdef' Resolution: LDPR_PREVAILI - Sym: 'undef' Resolution: LDPR_UNDEF - Sym: 'weakundef' Resolution: LDPR_UNDEF - Sym: 'common' Resolution: LDPR_PREVAILING_DEF_IRONLY -+#... - hook called: cleanup. - #... -diff -rup binutils-2.32.orig/ld/testsuite/ld-srec/srec.exp binutils-2.32/ld/testsuite/ld-srec/srec.exp ---- binutils-2.32.orig/ld/testsuite/ld-srec/srec.exp 2019-02-15 13:33:21.938627615 +0000 -+++ binutils-2.32/ld/testsuite/ld-srec/srec.exp 2019-02-15 13:53:58.744814006 +0000 -@@ -21,6 +21,8 @@ - - # Get the offset from an S-record line to the start of the data. - -+return -+ - proc srec_off { l } { - if [string match "S1*" $l] { - return 8 -diff -rup binutils-2.32.orig/ld/testsuite/ld-plugin/plugin-10.d binutils-2.32/ld/testsuite/ld-plugin/plugin-10.d ---- binutils-2.32.orig/ld/testsuite/ld-plugin/plugin-10.d 2019-02-15 14:10:59.038709514 +0000 -+++ binutils-2.32/ld/testsuite/ld-plugin/plugin-10.d 2019-02-15 14:13:53.532300721 +0000 -@@ -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 -+Sym: '_?func' Resolution: LDPR_PREVAILING_DEF_IRONLY - Sym: '_?func2' Resolution: LDPR_PREVAILING_DEF_IRONLY - #... - hook called: cleanup. -diff -rup binutils-2.32.orig/ld/testsuite/ld-plugin/plugin-11.d binutils-2.32/ld/testsuite/ld-plugin/plugin-11.d ---- binutils-2.32.orig/ld/testsuite/ld-plugin/plugin-11.d 2019-02-15 14:10:59.041709490 +0000 -+++ binutils-2.32/ld/testsuite/ld-plugin/plugin-11.d 2019-02-15 14:14:50.061844322 +0000 -@@ -35,8 +35,9 @@ hook called: claim_file tmpdir/func.o \[ - hook called: claim_file tmpdir/libtext.a \[@.* CLAIMED - #... - hook called: all symbols read. --Sym: '_?func' Resolution: LDPR_PREVAILING_DEF -+Sym: '_?func' Resolution: LDPR_PREVAILING_DEF_IRONLY - Sym: '_?func2' Resolution: LDPR_PREVAILING_DEF_IRONLY --Sym: '_?text' Resolution: LDPR_PREVAILING_DEF -+Sym: '_?text' Resolution: LDPR_PREVAILING_DEF_IRONLY -+#... - hook called: cleanup. - #... -diff -rup binutils-2.32.orig/ld/testsuite/ld-plugin/plugin-18.d binutils-2.32/ld/testsuite/ld-plugin/plugin-18.d ---- binutils-2.32.orig/ld/testsuite/ld-plugin/plugin-18.d 2019-02-15 14:10:58.942710289 +0000 -+++ binutils-2.32/ld/testsuite/ld-plugin/plugin-18.d 2019-02-15 14:15:20.030602369 +0000 -@@ -32,7 +32,8 @@ hook called: claim_file .*/ld/testsuite/ - hook called: claim_file tmpdir/libtext.a \[@.* not claimed - #... - hook called: all symbols read. --Sym: '_?func' Resolution: LDPR_PREVAILING_DEF -+Sym: '_?func' Resolution: LDPR_PREVAILING_DEF_IRONLY - Sym: '_?func2' Resolution: LDPR_PREVAILING_DEF_IRONLY -+#... - hook called: cleanup. - #... -diff -rup binutils-2.32.orig/ld/testsuite/ld-plugin/plugin-19.d binutils-2.32/ld/testsuite/ld-plugin/plugin-19.d ---- binutils-2.32.orig/ld/testsuite/ld-plugin/plugin-19.d 2019-02-15 14:10:59.024709627 +0000 -+++ binutils-2.32/ld/testsuite/ld-plugin/plugin-19.d 2019-02-15 14:15:54.926320633 +0000 -@@ -35,8 +35,9 @@ hook called: claim_file .*/ld/testsuite/ - hook called: claim_file tmpdir/libtext.a \[@.* CLAIMED - #... - hook called: all symbols read. --Sym: '_?func' Resolution: LDPR_PREVAILING_DEF -+Sym: '_?func' Resolution: LDPR_PREVAILING_DEF_IRONLY - Sym: '_?func2' Resolution: LDPR_PREVAILING_DEF_IRONLY --Sym: '_?text' Resolution: LDPR_PREVAILING_DEF -+Sym: '_?text' Resolution: LDPR_PREVAILING_DEF_IRONLY -+#... - hook called: cleanup. - #... -diff -rup binutils-2.32.orig/ld/testsuite/ld-plugin/plugin-28.d binutils-2.32/ld/testsuite/ld-plugin/plugin-28.d ---- binutils-2.32.orig/ld/testsuite/ld-plugin/plugin-28.d 2019-02-15 14:10:58.998709837 +0000 -+++ binutils-2.32/ld/testsuite/ld-plugin/plugin-28.d 2019-02-15 14:12:19.856057024 +0000 -@@ -1,3 +1,2 @@ - .*: error: Error - #... -- -diff -rup binutils-2.32.orig/ld/testsuite/ld-plugin/plugin-8.d binutils-2.32/ld/testsuite/ld-plugin/plugin-8.d ---- binutils-2.32.orig/ld/testsuite/ld-plugin/plugin-8.d 2019-02-15 14:10:59.074709224 +0000 -+++ binutils-2.32/ld/testsuite/ld-plugin/plugin-8.d 2019-02-15 14:11:48.144313048 +0000 -@@ -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 -+Sym: '_?func' Resolution: LDPR_PREVAILING_DEF_IRONLY - Sym: '_?func2' Resolution: LDPR_PREVAILING_DEF_IRONLY - #... - hook called: cleanup. -diff -rup binutils.orig/ld/testsuite/ld-elfvers/vers24.rd binutils-2.30/ld/testsuite/ld-elfvers/vers24.rd ---- binutils.orig/ld/testsuite/ld-elfvers/vers24.rd 2018-09-05 09:45:44.013108697 +0100 -+++ binutils-2.30/ld/testsuite/ld-elfvers/vers24.rd 2018-09-05 12:06:17.287425232 +0100 +diff -rupN --no-dereference binutils-2.39/ld/testsuite/ld-elfvers/vers24.rd binutils-2.39-new/ld/testsuite/ld-elfvers/vers24.rd +--- binutils-2.39/ld/testsuite/ld-elfvers/vers24.rd 2022-07-08 11:46:48.000000000 +0200 ++++ binutils-2.39-new/ld/testsuite/ld-elfvers/vers24.rd 2022-10-30 12:41:31.100023768 +0100 @@ -7,9 +7,9 @@ Symbol table '.dynsym' contains [0-9]+ e # And ensure the dynamic symbol table contains at least x@VERS.0 # and foo@@VERS.0 symbols @@ -312,10 +13,261 @@ diff -rup binutils.orig/ld/testsuite/ld-elfvers/vers24.rd binutils-2.30/ld/tests #... Symbol table '.symtab' contains [0-9]+ entries: #pass -diff -rup binutils.orig/ld/testsuite/ld-plugin/plugin.exp binutils-2.30/ld/testsuite/ld-plugin/plugin.exp ---- binutils.orig/ld/testsuite/ld-plugin/plugin.exp 2018-09-05 09:45:44.023108605 +0100 -+++ binutils-2.30/ld/testsuite/ld-plugin/plugin.exp 2018-09-05 11:18:53.997202105 +0100 -@@ -118,6 +118,12 @@ if { $can_compile && !$failed_compile } +diff -rupN --no-dereference binutils-2.39/ld/testsuite/ld-plugin/plugin-10.d binutils-2.39-new/ld/testsuite/ld-plugin/plugin-10.d +--- binutils-2.39/ld/testsuite/ld-plugin/plugin-10.d 2022-07-08 11:46:48.000000000 +0200 ++++ binutils-2.39-new/ld/testsuite/ld-plugin/plugin-10.d 2022-10-30 12:41:31.099023768 +0100 +@@ -32,7 +32,8 @@ hook called: claim_file tmpdir/func.o \[ + hook called: claim_file tmpdir/libtext.a \[@.* not claimed + #... + hook called: all symbols read. +-Sym: '_?func' Resolution: LDPR_PREVAILING_DEF ++Sym: '_?func' Resolution: LDPR_PREVAILING_DEF_IRONLY + Sym: '_?func2' Resolution: LDPR_PREVAILING_DEF_IRONLY ++#... + hook called: cleanup. + #... +diff -rupN --no-dereference binutils-2.39/ld/testsuite/ld-plugin/plugin-11.d binutils-2.39-new/ld/testsuite/ld-plugin/plugin-11.d +--- binutils-2.39/ld/testsuite/ld-plugin/plugin-11.d 2022-07-08 11:46:48.000000000 +0200 ++++ binutils-2.39-new/ld/testsuite/ld-plugin/plugin-11.d 2022-10-30 12:41:31.099023768 +0100 +@@ -35,8 +35,9 @@ hook called: claim_file tmpdir/func.o \[ + hook called: claim_file tmpdir/libtext.a \[@.* CLAIMED + #... + hook called: all symbols read. +-Sym: '_?func' Resolution: LDPR_PREVAILING_DEF ++Sym: '_?func' Resolution: LDPR_PREVAILING_DEF_IRONLY + Sym: '_?func2' Resolution: LDPR_PREVAILING_DEF_IRONLY +-Sym: '_?text' Resolution: LDPR_PREVAILING_DEF ++Sym: '_?text' Resolution: LDPR_PREVAILING_DEF_IRONLY ++#... + hook called: cleanup. + #... +diff -rupN --no-dereference binutils-2.39/ld/testsuite/ld-plugin/plugin-13.d binutils-2.39-new/ld/testsuite/ld-plugin/plugin-13.d +--- binutils-2.39/ld/testsuite/ld-plugin/plugin-13.d 2022-07-08 11:46:48.000000000 +0200 ++++ binutils-2.39-new/ld/testsuite/ld-plugin/plugin-13.d 2022-10-30 12:41:31.095023768 +0100 +@@ -23,5 +23,3 @@ hook called: claim_file tmpdir/main.o \[ + hook called: claim_file .*/ld/testsuite/ld-plugin/func.c \[@0/.* CLAIMED + hook called: claim_file tmpdir/text.o \[@0/.* not claimed + #... +-.*main.c.*: undefined reference to `\.?func' +-#... +diff -rupN --no-dereference binutils-2.39/ld/testsuite/ld-plugin/plugin-14.d binutils-2.39-new/ld/testsuite/ld-plugin/plugin-14.d +--- binutils-2.39/ld/testsuite/ld-plugin/plugin-14.d 2022-07-08 11:46:48.000000000 +0200 ++++ binutils-2.39-new/ld/testsuite/ld-plugin/plugin-14.d 2022-10-30 12:41:31.095023768 +0100 +@@ -27,7 +27,6 @@ hook called: claim_file .*/ld/testsuite/ + hook called: claim_file tmpdir/text.o \[@0/.* not claimed + #... + hook called: all symbols read. +-.*: tmpdir/main.o: in function `main': +-.*main.c.*: undefined reference to `\.?func' ++#... + hook called: cleanup. + #... +diff -rupN --no-dereference binutils-2.39/ld/testsuite/ld-plugin/plugin-15.d binutils-2.39-new/ld/testsuite/ld-plugin/plugin-15.d +--- binutils-2.39/ld/testsuite/ld-plugin/plugin-15.d 2022-07-08 11:46:48.000000000 +0200 ++++ binutils-2.39-new/ld/testsuite/ld-plugin/plugin-15.d 2022-10-30 12:41:31.095023768 +0100 +@@ -28,7 +28,6 @@ hook called: claim_file .*/ld/testsuite/ + hook called: claim_file tmpdir/text.o \[@0/.* not claimed + #... + hook called: all symbols read. +-.*: tmpdir/main.o: in function `main': +-.*main.c.*: undefined reference to `\.?func' ++#... + hook called: cleanup. + #... +diff -rupN --no-dereference binutils-2.39/ld/testsuite/ld-plugin/plugin-16.d binutils-2.39-new/ld/testsuite/ld-plugin/plugin-16.d +--- binutils-2.39/ld/testsuite/ld-plugin/plugin-16.d 2022-07-08 11:46:48.000000000 +0200 ++++ binutils-2.39-new/ld/testsuite/ld-plugin/plugin-16.d 2022-10-30 12:41:31.096023768 +0100 +@@ -30,9 +30,8 @@ hook called: claim_file .*/ld/testsuite/ + hook called: claim_file tmpdir/text.o \[@0/.* not claimed + #... + hook called: all symbols read. +-Sym: '_?func' Resolution: LDPR_PREVAILING_DEF ++Sym: '_?func' Resolution: LDPR_PREVAILING_DEF_IRONLY + Sym: '_?func2' Resolution: LDPR_PREVAILING_DEF_IRONLY +-.*: tmpdir/main.o: in function `main': +-.*main.c.*: undefined reference to `\.?func' ++#... + hook called: cleanup. + #... +diff -rupN --no-dereference binutils-2.39/ld/testsuite/ld-plugin/plugin-17.d binutils-2.39-new/ld/testsuite/ld-plugin/plugin-17.d +--- binutils-2.39/ld/testsuite/ld-plugin/plugin-17.d 2022-07-08 11:46:48.000000000 +0200 ++++ binutils-2.39-new/ld/testsuite/ld-plugin/plugin-17.d 2022-10-30 12:41:31.096023768 +0100 +@@ -31,7 +31,8 @@ hook called: claim_file .*/ld/testsuite/ + hook called: claim_file tmpdir/text.o \[@0/.* not claimed + #... + hook called: all symbols read. +-Sym: '_?func' Resolution: LDPR_PREVAILING_DEF ++Sym: '_?func' Resolution: LDPR_PREVAILING_DEF_IRONLY + Sym: '_?func2' Resolution: LDPR_PREVAILING_DEF_IRONLY ++#... + hook called: cleanup. + #... +diff -rupN --no-dereference binutils-2.39/ld/testsuite/ld-plugin/plugin-18.d binutils-2.39-new/ld/testsuite/ld-plugin/plugin-18.d +--- binutils-2.39/ld/testsuite/ld-plugin/plugin-18.d 2022-07-08 11:46:48.000000000 +0200 ++++ binutils-2.39-new/ld/testsuite/ld-plugin/plugin-18.d 2022-10-30 12:41:31.100023768 +0100 +@@ -32,7 +32,8 @@ hook called: claim_file .*/ld/testsuite/ + hook called: claim_file tmpdir/libtext.a \[@.* not claimed + #... + hook called: all symbols read. +-Sym: '_?func' Resolution: LDPR_PREVAILING_DEF ++Sym: '_?func' Resolution: LDPR_PREVAILING_DEF_IRONLY + Sym: '_?func2' Resolution: LDPR_PREVAILING_DEF_IRONLY ++#... + hook called: cleanup. + #... +diff -rupN --no-dereference binutils-2.39/ld/testsuite/ld-plugin/plugin-19.d binutils-2.39-new/ld/testsuite/ld-plugin/plugin-19.d +--- binutils-2.39/ld/testsuite/ld-plugin/plugin-19.d 2022-07-08 11:46:48.000000000 +0200 ++++ binutils-2.39-new/ld/testsuite/ld-plugin/plugin-19.d 2022-10-30 12:41:31.100023768 +0100 +@@ -35,8 +35,9 @@ hook called: claim_file .*/ld/testsuite/ + hook called: claim_file tmpdir/libtext.a \[@.* CLAIMED + #... + hook called: all symbols read. +-Sym: '_?func' Resolution: LDPR_PREVAILING_DEF ++Sym: '_?func' Resolution: LDPR_PREVAILING_DEF_IRONLY + Sym: '_?func2' Resolution: LDPR_PREVAILING_DEF_IRONLY +-Sym: '_?text' Resolution: LDPR_PREVAILING_DEF ++Sym: '_?text' Resolution: LDPR_PREVAILING_DEF_IRONLY ++#... + hook called: cleanup. + #... +diff -rupN --no-dereference binutils-2.39/ld/testsuite/ld-plugin/plugin-20.d binutils-2.39-new/ld/testsuite/ld-plugin/plugin-20.d +--- binutils-2.39/ld/testsuite/ld-plugin/plugin-20.d 2022-07-08 11:46:48.000000000 +0200 ++++ binutils-2.39-new/ld/testsuite/ld-plugin/plugin-20.d 2022-10-30 12:41:31.096023768 +0100 +@@ -2,6 +2,5 @@ hook called: all symbols read. + Input: func.c \(tmpdir/libfunc.a\) + Sym: '_?func' Resolution: LDPR_PREVAILING_DEF.* + Sym: '_?func' Resolution: LDPR_PREVAILING_DEF.* +-.*: tmpdir/main.o: in function `main': +-.*main.c.*: undefined reference to `\.?func' ++#... + hook called: cleanup. +diff -rupN --no-dereference binutils-2.39/ld/testsuite/ld-plugin/plugin-21.d binutils-2.39-new/ld/testsuite/ld-plugin/plugin-21.d +--- binutils-2.39/ld/testsuite/ld-plugin/plugin-21.d 2022-07-08 11:46:48.000000000 +0200 ++++ binutils-2.39-new/ld/testsuite/ld-plugin/plugin-21.d 2022-10-30 12:41:31.096023768 +0100 +@@ -2,6 +2,5 @@ hook called: all symbols read. + Input: .*/ld/testsuite/ld-plugin/func.c \(.*/ld/testsuite/ld-plugin/func.c\) + Sym: '_?func' Resolution: LDPR_PREVAILING_DEF.* + Sym: '_?func' Resolution: LDPR_PREVAILING_DEF.* +-.*: tmpdir/main.o: in function `main': +-.*main.c.*: undefined reference to `\.?func' ++#... + hook called: cleanup. +diff -rupN --no-dereference binutils-2.39/ld/testsuite/ld-plugin/plugin-22.d binutils-2.39-new/ld/testsuite/ld-plugin/plugin-22.d +--- binutils-2.39/ld/testsuite/ld-plugin/plugin-22.d 2022-07-08 11:46:48.000000000 +0200 ++++ binutils-2.39-new/ld/testsuite/ld-plugin/plugin-22.d 2022-10-30 12:41:31.097023768 +0100 +@@ -2,6 +2,5 @@ Claimed: tmpdir/libfunc.a \[@.* + hook called: all symbols read. + Sym: '_?func' Resolution: LDPR_PREVAILING_DEF.* + Sym: '_?func' Resolution: LDPR_PREVAILING_DEF.* +-.*: tmpdir/main.o: in function `main': +-.*main.c.*: undefined reference to `\.?func' ++#... + hook called: cleanup. +diff -rupN --no-dereference binutils-2.39/ld/testsuite/ld-plugin/plugin-23.d binutils-2.39-new/ld/testsuite/ld-plugin/plugin-23.d +--- binutils-2.39/ld/testsuite/ld-plugin/plugin-23.d 2022-07-08 11:46:48.000000000 +0200 ++++ binutils-2.39-new/ld/testsuite/ld-plugin/plugin-23.d 2022-10-30 12:41:31.097023768 +0100 +@@ -2,6 +2,5 @@ Claimed: .*/ld/testsuite/ld-plugin/func. + hook called: all symbols read. + Sym: '_?func' Resolution: LDPR_PREVAILING_DEF.* + Sym: '_?func' Resolution: LDPR_PREVAILING_DEF.* +-.*: tmpdir/main.o: in function `main': +-.*main.c.*: undefined reference to `\.?func' ++#... + hook called: cleanup. +diff -rupN --no-dereference binutils-2.39/ld/testsuite/ld-plugin/plugin-24.d binutils-2.39-new/ld/testsuite/ld-plugin/plugin-24.d +--- binutils-2.39/ld/testsuite/ld-plugin/plugin-24.d 2022-07-08 11:46:48.000000000 +0200 ++++ binutils-2.39-new/ld/testsuite/ld-plugin/plugin-24.d 2022-10-30 12:41:31.097023768 +0100 +@@ -2,4 +2,5 @@ hook called: all symbols read. + Input: .*/ld/testsuite/ld-plugin/func.c \(.*/ld/testsuite/ld-plugin/func.c\) + Sym: '_?func' Resolution: LDPR_PREVAILING_DEF.* + Sym: '_?func' Resolution: LDPR_PREVAILING_DEF.* ++#... + hook called: cleanup. +diff -rupN --no-dereference binutils-2.39/ld/testsuite/ld-plugin/plugin-25.d binutils-2.39-new/ld/testsuite/ld-plugin/plugin-25.d +--- binutils-2.39/ld/testsuite/ld-plugin/plugin-25.d 2022-07-08 11:46:48.000000000 +0200 ++++ binutils-2.39-new/ld/testsuite/ld-plugin/plugin-25.d 2022-10-30 12:41:31.097023768 +0100 +@@ -2,4 +2,5 @@ Claimed: .*/ld/testsuite/ld-plugin/func. + hook called: all symbols read. + Sym: '_?func' Resolution: LDPR_PREVAILING_DEF.* + Sym: '_?func' Resolution: LDPR_PREVAILING_DEF.* ++#... + hook called: cleanup. +diff -rupN --no-dereference binutils-2.39/ld/testsuite/ld-plugin/plugin-28.d binutils-2.39-new/ld/testsuite/ld-plugin/plugin-28.d +--- binutils-2.39/ld/testsuite/ld-plugin/plugin-28.d 2022-07-08 11:46:48.000000000 +0200 ++++ binutils-2.39-new/ld/testsuite/ld-plugin/plugin-28.d 2022-10-30 12:41:31.100023768 +0100 +@@ -1 +1,2 @@ + .*: error: Error ++#... +diff -rupN --no-dereference binutils-2.39/ld/testsuite/ld-plugin/plugin-29.d binutils-2.39-new/ld/testsuite/ld-plugin/plugin-29.d +--- binutils-2.39/ld/testsuite/ld-plugin/plugin-29.d 2022-07-08 11:46:48.000000000 +0200 ++++ binutils-2.39-new/ld/testsuite/ld-plugin/plugin-29.d 2022-10-30 12:41:31.098023768 +0100 +@@ -1 +1,2 @@ + .*: warning: Warning ++#... +diff -rupN --no-dereference binutils-2.39/ld/testsuite/ld-plugin/plugin-30.d binutils-2.39-new/ld/testsuite/ld-plugin/plugin-30.d +--- binutils-2.39/ld/testsuite/ld-plugin/plugin-30.d 2022-07-08 11:46:48.000000000 +0200 ++++ binutils-2.39-new/ld/testsuite/ld-plugin/plugin-30.d 2022-10-30 12:41:31.098023768 +0100 +@@ -24,3 +24,4 @@ hook called: claim_file tmpdir/main.o \[ + hook called: claim_file tmpdir/func.o \[@0/.* not claimed + hook called: claim_file tmpdir/text.o \[@0/.* not claimed + hook called: claim_file tmpdir/libempty.a \[@.* not claimed ++#pass +diff -rupN --no-dereference binutils-2.39/ld/testsuite/ld-plugin/plugin-6.d binutils-2.39-new/ld/testsuite/ld-plugin/plugin-6.d +--- binutils-2.39/ld/testsuite/ld-plugin/plugin-6.d 2022-07-08 11:46:48.000000000 +0200 ++++ binutils-2.39-new/ld/testsuite/ld-plugin/plugin-6.d 2022-10-30 12:41:31.098023768 +0100 +@@ -27,7 +27,6 @@ hook called: claim_file tmpdir/func.o \[ + hook called: claim_file tmpdir/text.o \[@0/.* not claimed + #... + hook called: all symbols read. +-.*: tmpdir/main.o: in function `main': +-.*main.c.*: undefined reference to `\.?func' ++#... + hook called: cleanup. + #... +diff -rupN --no-dereference binutils-2.39/ld/testsuite/ld-plugin/plugin-7.d binutils-2.39-new/ld/testsuite/ld-plugin/plugin-7.d +--- binutils-2.39/ld/testsuite/ld-plugin/plugin-7.d 2022-07-08 11:46:48.000000000 +0200 ++++ binutils-2.39-new/ld/testsuite/ld-plugin/plugin-7.d 2022-10-30 12:41:31.098023768 +0100 +@@ -28,7 +28,6 @@ hook called: claim_file tmpdir/func.o \[ + hook called: claim_file tmpdir/text.o \[@0/.* not claimed + #... + hook called: all symbols read. +-.*: tmpdir/main.o: in function `main': +-.*main.c.*: undefined reference to `\.?func' ++#... + hook called: cleanup. + #... +diff -rupN --no-dereference binutils-2.39/ld/testsuite/ld-plugin/plugin-8.d binutils-2.39-new/ld/testsuite/ld-plugin/plugin-8.d +--- binutils-2.39/ld/testsuite/ld-plugin/plugin-8.d 2022-07-08 11:46:48.000000000 +0200 ++++ binutils-2.39-new/ld/testsuite/ld-plugin/plugin-8.d 2022-10-30 12:41:31.100023768 +0100 +@@ -30,9 +30,8 @@ hook called: claim_file tmpdir/func.o \[ + hook called: claim_file tmpdir/text.o \[@0/.* not claimed + #... + hook called: all symbols read. +-Sym: '_?func' Resolution: LDPR_PREVAILING_DEF ++Sym: '_?func' Resolution: LDPR_PREVAILING_DEF_IRONLY + Sym: '_?func2' Resolution: LDPR_PREVAILING_DEF_IRONLY +-.*: tmpdir/main.o: in function `main': +-.*main.c.*: undefined reference to `\.?func' ++#... + hook called: cleanup. + #... +diff -rupN --no-dereference binutils-2.39/ld/testsuite/ld-plugin/plugin-9.d binutils-2.39-new/ld/testsuite/ld-plugin/plugin-9.d +--- binutils-2.39/ld/testsuite/ld-plugin/plugin-9.d 2022-07-08 11:46:48.000000000 +0200 ++++ binutils-2.39-new/ld/testsuite/ld-plugin/plugin-9.d 2022-10-30 12:41:31.099023768 +0100 +@@ -31,7 +31,8 @@ hook called: claim_file tmpdir/func.o \[ + hook called: claim_file tmpdir/text.o \[@0/.* not claimed + #... + hook called: all symbols read. +-Sym: '_?func' Resolution: LDPR_PREVAILING_DEF ++Sym: '_?func' Resolution: LDPR_PREVAILING_DEF_IRONLY + Sym: '_?func2' Resolution: LDPR_PREVAILING_DEF_IRONLY ++#... + hook called: cleanup. + #... +diff -rupN --no-dereference binutils-2.39/ld/testsuite/ld-plugin/plugin.exp binutils-2.39-new/ld/testsuite/ld-plugin/plugin.exp +--- binutils-2.39/ld/testsuite/ld-plugin/plugin.exp 2022-07-08 11:46:48.000000000 +0200 ++++ binutils-2.39-new/ld/testsuite/ld-plugin/plugin.exp 2022-10-30 12:41:31.101023768 +0100 +@@ -117,6 +117,12 @@ if { $can_compile && !$failed_compile } } } @@ -328,3 +280,25 @@ diff -rup binutils.orig/ld/testsuite/ld-plugin/plugin.exp binutils-2.30/ld/tests 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.39/ld/testsuite/ld-plugin/pr20070.d binutils-2.39-new/ld/testsuite/ld-plugin/pr20070.d +--- binutils-2.39/ld/testsuite/ld-plugin/pr20070.d 2022-07-08 11:46:48.000000000 +0200 ++++ binutils-2.39-new/ld/testsuite/ld-plugin/pr20070.d 2022-10-30 12:41:31.099023768 +0100 +@@ -5,5 +5,6 @@ Sym: 'weakdef' Resolution: LDPR_PREVAILI + Sym: 'undef' Resolution: LDPR_UNDEF + Sym: 'weakundef' Resolution: LDPR_UNDEF + Sym: 'common' Resolution: LDPR_PREVAILING_DEF_IRONLY ++#... + hook called: cleanup. + #... +diff -rupN --no-dereference binutils-2.39/ld/testsuite/ld-srec/srec.exp binutils-2.39-new/ld/testsuite/ld-srec/srec.exp +--- binutils-2.39/ld/testsuite/ld-srec/srec.exp 2022-07-08 11:46:48.000000000 +0200 ++++ binutils-2.39-new/ld/testsuite/ld-srec/srec.exp 2022-10-30 12:41:31.099023768 +0100 +@@ -21,6 +21,8 @@ + + # Get the offset from an S-record line to the start of the data. + ++return ++ + proc srec_off { l } { + if [string match "S1*" $l] { + return 8 diff --git a/binutils-gas-dwarf-skip-empty-functions.patch b/binutils-gas-dwarf-skip-empty-functions.patch index 6d75c0b..5f0371c 100644 --- a/binutils-gas-dwarf-skip-empty-functions.patch +++ b/binutils-gas-dwarf-skip-empty-functions.patch @@ -1,30 +1,7 @@ -From b53c44bfe31fb036f212275b6d70edd5eee7b088 Mon Sep 17 00:00:00 2001 -From: Jan Beulich via Binutils -Date: Tue, 9 Aug 2022 13:12:03 +0200 -Subject: [PATCH] gas/Dwarf: properly skip zero-size functions - -PR gas/29451 - -While out_debug_abbrev() properly skips such functions, out_debug_info() -mistakenly didn't. It needs to calculate the high_pc expression ahead of -time, in order to skip emitting any data for the function if the value -is zero. - -The one case which would still leave a zero-size entry is when -symbol_get_obj(symp)->size ends up evaluating to zero. I hope we can -expect that to not be the case, otherwise we'd need to have a way to -post-process .debug_info contents between resolving expressions and -actually writing the data out to the file. Even then it wouldn't be -entirely obvious in which way to alter the data. ---- - gas/dwarf2dbg.c | 39 ++++++++++++++++++++------------------- - 1 file changed, 20 insertions(+), 19 deletions(-) - -diff --git a/gas/dwarf2dbg.c b/gas/dwarf2dbg.c -index 868ec79ee2c..f346bd6a412 100644 ---- a/gas/dwarf2dbg.c -+++ b/gas/dwarf2dbg.c -@@ -2882,6 +2882,7 @@ out_debug_info (segT info_seg, segT abbrev_seg, segT line_seg, segT str_seg, +diff -rupN --no-dereference binutils-2.39/gas/dwarf2dbg.c binutils-2.39-new/gas/dwarf2dbg.c +--- binutils-2.39/gas/dwarf2dbg.c 2022-07-08 11:46:47.000000000 +0200 ++++ binutils-2.39-new/gas/dwarf2dbg.c 2022-10-30 12:41:40.297023812 +0100 +@@ -2882,6 +2882,7 @@ out_debug_info (segT info_seg, segT abbr { const char *name; size_t len; @@ -32,7 +9,7 @@ index 868ec79ee2c..f346bd6a412 100644 /* Skip warning constructs (see above). */ if (symbol_get_bfdsym (symp)->flags & BSF_WARNING) -@@ -2895,6 +2896,18 @@ out_debug_info (segT info_seg, segT abbrev_seg, segT line_seg, segT str_seg, +@@ -2895,6 +2896,18 @@ out_debug_info (segT info_seg, segT abbr if (!S_IS_DEFINED (symp) || !S_IS_FUNCTION (symp)) continue; @@ -51,7 +28,7 @@ index 868ec79ee2c..f346bd6a412 100644 subseg_set (str_seg, 0); name_sym = symbol_temp_new_now_octets (); name = S_GET_NAME (symp); -@@ -2920,29 +2933,17 @@ out_debug_info (segT info_seg, segT abbrev_seg, segT line_seg, segT str_seg, +@@ -2920,29 +2933,17 @@ out_debug_info (segT info_seg, segT abbr emit_expr (&exp, sizeof_address); /* DW_AT_high_pc */ @@ -88,6 +65,3 @@ index 868ec79ee2c..f346bd6a412 100644 } /* End of children. */ --- -2.37.1 - diff --git a/binutils-gold-i386-gnu-property-notes.patch b/binutils-gold-i386-gnu-property-notes.patch index 7831bf7..a1c729b 100644 --- a/binutils-gold-i386-gnu-property-notes.patch +++ b/binutils-gold-i386-gnu-property-notes.patch @@ -1,8 +1,7 @@ -diff --git a/gold/i386.cc b/gold/i386.cc -index bf209fe9a86..31161ff091c 100644 ---- a/gold/i386.cc -+++ b/gold/i386.cc -@@ -360,7 +360,11 @@ class Target_i386 : public Sized_target<32, false> +diff -rupN --no-dereference binutils-2.39/gold/i386.cc binutils-2.39-new/gold/i386.cc +--- binutils-2.39/gold/i386.cc 2022-07-08 11:46:48.000000000 +0200 ++++ binutils-2.39-new/gold/i386.cc 2022-10-30 12:41:35.714023790 +0100 +@@ -360,7 +360,11 @@ class Target_i386 : public Sized_target< got_(NULL), plt_(NULL), got_plt_(NULL), got_irelative_(NULL), got_tlsdesc_(NULL), global_offset_table_(NULL), rel_dyn_(NULL), rel_irelative_(NULL), copy_relocs_(elfcpp::R_386_COPY), @@ -15,7 +14,7 @@ index bf209fe9a86..31161ff091c 100644 { } // Process the relocations to determine unreferenced sections for -@@ -859,6 +863,21 @@ class Target_i386 : public Sized_target<32, false> +@@ -859,6 +863,21 @@ class Target_i386 : public Sized_target< this->rel_dyn_section(layout)); } @@ -37,7 +36,7 @@ index bf209fe9a86..31161ff091c 100644 // Information about this specific target which we pass to the // general Target structure. static const Target::Target_info i386_info; -@@ -898,6 +917,26 @@ class Target_i386 : public Sized_target<32, false> +@@ -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_; @@ -64,7 +63,7 @@ index bf209fe9a86..31161ff091c 100644 }; const Target::Target_info Target_i386::i386_info = -@@ -1042,6 +1081,126 @@ Target_i386::rel_irelative_section(Layout* layout) +@@ -1042,6 +1081,126 @@ Target_i386::rel_irelative_section(Layou return this->rel_irelative_; } diff --git a/binutils-gold-mismatched-section-flags.patch b/binutils-gold-mismatched-section-flags.patch index 63dba2b..855b3ee 100644 --- a/binutils-gold-mismatched-section-flags.patch +++ b/binutils-gold-mismatched-section-flags.patch @@ -1,7 +1,7 @@ -diff -rup binutils.orig/gold/layout.cc binutils-2.32/gold/layout.cc ---- binutils.orig/gold/layout.cc 2019-06-24 14:37:36.013086899 +0100 -+++ binutils-2.32/gold/layout.cc 2019-06-24 14:41:40.054517479 +0100 -@@ -868,6 +868,7 @@ Layout::get_output_section(const char* n +diff -rupN --no-dereference binutils-2.39/gold/layout.cc binutils-2.39-new/gold/layout.cc +--- binutils-2.39/gold/layout.cc 2022-07-08 11:46:48.000000000 +0200 ++++ binutils-2.39-new/gold/layout.cc 2022-10-30 12:41:32.255023774 +0100 +@@ -869,6 +869,7 @@ Layout::get_output_section(const char* n && (same_name->flags() & elfcpp::SHF_TLS) == 0) os = same_name; } @@ -9,7 +9,7 @@ diff -rup binutils.orig/gold/layout.cc binutils-2.32/gold/layout.cc else if ((flags & elfcpp::SHF_TLS) == 0) { elfcpp::Elf_Xword zero_flags = 0; -@@ -878,6 +879,7 @@ Layout::get_output_section(const char* n +@@ -879,6 +880,7 @@ Layout::get_output_section(const char* n if (p != this->section_name_map_.end()) os = p->second; } diff --git a/binutils-gold-warn-unsupported.patch b/binutils-gold-warn-unsupported.patch index 8e00aa3..bb3399d 100644 --- a/binutils-gold-warn-unsupported.patch +++ b/binutils-gold-warn-unsupported.patch @@ -1,8 +1,28 @@ -Only in binutils-2.34/gold: autom4te.cache -diff -rup binutils.orig/gold/configure binutils-2.34/gold/configure ---- binutils.orig/gold/configure 2020-04-20 12:35:13.048297305 +0100 -+++ binutils-2.34/gold/configure 2020-04-20 14:02:06.743725696 +0100 -@@ -5180,7 +5180,8 @@ for targ in $target $canon_targets; do +diff -rupN --no-dereference binutils-2.39/bfd/config.bfd binutils-2.39-new/bfd/config.bfd +--- binutils-2.39/bfd/config.bfd 2022-07-08 11:46:47.000000000 +0200 ++++ binutils-2.39-new/bfd/config.bfd 2022-10-30 12:41:33.412023779 +0100 +@@ -490,7 +490,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 +@@ -1478,7 +1478,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.39/gold/configure binutils-2.39-new/gold/configure +--- binutils-2.39/gold/configure 2022-07-08 11:58:08.000000000 +0200 ++++ binutils-2.39-new/gold/configure 2022-10-30 12:41:33.410023779 +0100 +@@ -5223,7 +5223,8 @@ for targ in $target $canon_targets; do . ${srcdir}/configure.tgt if test "$targ_obj" = "UNKNOWN"; then @@ -12,10 +32,10 @@ diff -rup binutils.orig/gold/configure binutils-2.34/gold/configure else targetobjs="$targetobjs ${targ_obj}.\$(OBJEXT)" if test "$targ_extra_obj" != ""; then -diff -rup binutils.orig/gold/configure.ac binutils-2.34/gold/configure.ac ---- binutils.orig/gold/configure.ac 2020-04-20 12:35:13.050297291 +0100 -+++ binutils-2.34/gold/configure.ac 2020-04-20 14:01:46.435868770 +0100 -@@ -181,7 +181,7 @@ for targ in $target $canon_targets; do +diff -rupN --no-dereference binutils-2.39/gold/configure.ac binutils-2.39-new/gold/configure.ac +--- binutils-2.39/gold/configure.ac 2022-07-08 11:46:48.000000000 +0200 ++++ binutils-2.39-new/gold/configure.ac 2022-10-30 12:41:33.411023779 +0100 +@@ -182,7 +182,7 @@ for targ in $target $canon_targets; do . ${srcdir}/configure.tgt if test "$targ_obj" = "UNKNOWN"; then @@ -24,9 +44,10 @@ diff -rup binutils.orig/gold/configure.ac binutils-2.34/gold/configure.ac else targetobjs="$targetobjs ${targ_obj}.\$(OBJEXT)" if test "$targ_extra_obj" != ""; then ---- binutils.orig/ld/configure.tgt 2020-04-20 12:35:12.465301359 +0100 -+++ binutils-2.34/ld/configure.tgt 2020-04-20 14:17:52.123066333 +0100 -@@ -220,7 +220,7 @@ bfin-*-linux-uclibc*) targ_emul=elf32bfi +diff -rupN --no-dereference binutils-2.39/ld/configure.tgt binutils-2.39-new/ld/configure.tgt +--- binutils-2.39/ld/configure.tgt 2022-07-29 09:37:48.000000000 +0200 ++++ binutils-2.39-new/ld/configure.tgt 2022-10-30 12:41:33.411023779 +0100 +@@ -258,7 +258,7 @@ bfin-*-linux-uclibc*) targ_emul=elf32bfi targ_extra_emuls="elf32bfin" targ_extra_libpath=$targ_extra_emuls ;; @@ -35,7 +56,7 @@ diff -rup binutils.orig/gold/configure.ac binutils-2.34/gold/configure.ac ;; cr16-*-elf*) targ_emul=elf32cr16 ;; -@@ -1026,7 +1026,7 @@ z8k-*-coff) targ_emul=z8002 +@@ -1078,7 +1078,7 @@ loongarch64-*) targ_emul=elf64loongarch targ_extra_ofiles= ;; *) @@ -44,23 +65,3 @@ diff -rup binutils.orig/gold/configure.ac binutils-2.34/gold/configure.ac echo 2>&1 "*** see ld/configure.tgt for supported targets" exit 1 ---- binutils.orig/bfd/config.bfd 2020-04-20 12:35:13.038297375 +0100 -+++ binutils-2.34/bfd/config.bfd 2020-04-20 14:25:26.452869193 +0100 -@@ -473,7 +473,7 @@ case "${targ}" in - ;; - - #ifdef BFD64 -- bpf-*-none) -+ bpf-*-none | bpf-*) - targ_defvec=bpf_elf64_le_vec - targ_selvecs=bpf_elf64_be_vec - targ_underscore=yes -@@ -1427,7 +1427,7 @@ case "${targ}" in - ;; - - *) -- echo 1>&2 "*** BFD does not support target ${targ}." -+ echo 1>&2 "*** BFD does not support target '${targ}'. Honest." - echo 1>&2 "*** Look in bfd/config.bfd for supported targets." - exit 1 - ;; diff --git a/binutils-libtool-no-rpath.patch b/binutils-libtool-no-rpath.patch index a4f90a1..398736f 100644 --- a/binutils-libtool-no-rpath.patch +++ b/binutils-libtool-no-rpath.patch @@ -1,6 +1,6 @@ -diff -rup binutils.orig/ltmain.sh binutils-2.37/ltmain.sh ---- binutils.orig/ltmain.sh 2022-01-27 16:23:09.304207432 +0000 -+++ binutils-2.37/ltmain.sh 2022-01-27 16:23:18.380143759 +0000 +diff -rupN --no-dereference binutils-2.39/ltmain.sh binutils-2.39-new/ltmain.sh +--- binutils-2.39/ltmain.sh 2022-07-08 11:46:48.000000000 +0200 ++++ binutils-2.39-new/ltmain.sh 2022-10-30 12:41:38.049023801 +0100 @@ -7103,6 +7103,7 @@ EOF rpath="$finalize_rpath" test "$mode" != relink && rpath="$compile_rpath$rpath" @@ -25,4 +25,3 @@ diff -rup binutils.orig/ltmain.sh binutils-2.37/ltmain.sh if test -n "$hardcode_libdir_flag_spec"; then if test -n "$hardcode_libdir_separator"; then if test -z "$hardcode_libdirs"; then -Only in binutils-2.37: ltmain.sh.orig diff --git a/binutils-no-config-h-check.patch b/binutils-no-config-h-check.patch index c89195a..0f84b9e 100644 --- a/binutils-no-config-h-check.patch +++ b/binutils-no-config-h-check.patch @@ -1,6 +1,7 @@ ---- a/bfd/bfd-in.h 2012-08-02 10:56:34.561769686 +0100 -+++ b/bfd/bfd-in.h 2012-08-02 11:13:27.134797755 +0100 -@@ -25,11 +25,6 @@ +diff -rupN --no-dereference binutils-2.39/bfd/bfd-in2.h binutils-2.39-new/bfd/bfd-in2.h +--- binutils-2.39/bfd/bfd-in2.h 2022-08-01 09:12:32.000000000 +0200 ++++ binutils-2.39-new/bfd/bfd-in2.h 2022-10-30 12:41:24.134023735 +0100 +@@ -30,11 +30,6 @@ #ifndef __BFD_H_SEEN__ #define __BFD_H_SEEN__ @@ -12,9 +13,10 @@ #ifdef __cplusplus extern "C" { #endif ---- a/bfd/bfd-in2.h 2012-08-02 10:56:34.349769680 +0100 -+++ b/bfd/bfd-in2.h 2012-08-02 11:13:40.015798113 +0100 -@@ -32,11 +32,6 @@ +diff -rupN --no-dereference binutils-2.39/bfd/bfd-in.h binutils-2.39-new/bfd/bfd-in.h +--- binutils-2.39/bfd/bfd-in.h 2022-08-01 09:12:32.000000000 +0200 ++++ binutils-2.39-new/bfd/bfd-in.h 2022-10-30 12:41:24.133023735 +0100 +@@ -23,11 +23,6 @@ #ifndef __BFD_H_SEEN__ #define __BFD_H_SEEN__ diff --git a/binutils-package-metadata.patch b/binutils-package-metadata.patch index d2925b0..a224888 100644 --- a/binutils-package-metadata.patch +++ b/binutils-package-metadata.patch @@ -1,42 +1,20 @@ -diff -rup binutils.orig/gold/Makefile.am binutils-2.38/gold/Makefile.am ---- binutils.orig/gold/Makefile.am 2022-08-04 11:11:01.788495165 +0100 -+++ binutils-2.38/gold/Makefile.am 2022-08-04 11:12:26.124013955 +0100 -@@ -35,7 +35,7 @@ THREADFLAGS = @PTHREAD_CFLAGS@ - THREADLIBS = @PTHREAD_LIBS@ +diff -rupN --no-dereference binutils-2.39/elfcpp/elfcpp.h binutils-2.39-new/elfcpp/elfcpp.h +--- binutils-2.39/elfcpp/elfcpp.h 2022-07-08 11:46:47.000000000 +0200 ++++ binutils-2.39-new/elfcpp/elfcpp.h 2022-10-30 12:41:39.175023806 +0100 +@@ -999,7 +999,9 @@ enum + // string. + NT_GNU_GOLD_VERSION = 4, + // Program property note, as described in "Linux Extensions to the gABI". +- NT_GNU_PROPERTY_TYPE_0 = 5 ++ NT_GNU_PROPERTY_TYPE_0 = 5, ++ // FDO .note.package notes as defined on https://systemd.io/ELF_PACKAGE_METADATA/ ++ FDO_PACKAGING_METADATA = 0xcafe1a7e + }; - AM_CFLAGS = $(WARN_CFLAGS) $(LFS_CFLAGS) $(RANDOM_SEED_CFLAGS) $(ZLIBINC) $(THREADFLAGS) --AM_CXXFLAGS = $(WARN_CXXFLAGS) $(LFS_CFLAGS) $(RANDOM_SEED_CFLAGS) $(ZLIBINC) $(THREADFLAGS) -+AM_CXXFLAGS = $(WARN_CXXFLAGS) $(LFS_CFLAGS) $(RANDOM_SEED_CFLAGS) $(ZLIBINC) $(THREADFLAGS) $(JANSSON_CFLAGS) - AM_LDFLAGS = $(THREADFLAGS) - - AM_CPPFLAGS = \ -@@ -187,7 +187,7 @@ libgold_a_LIBADD = $(LIBOBJS) - sources_var = main.cc - deps_var = $(TARGETOBJS) libgold.a $(LIBIBERTY) $(LIBINTL_DEP) - ldadd_var = $(TARGETOBJS) libgold.a $(LIBIBERTY) $(GOLD_LDADD) $(LIBINTL) \ -- $(THREADLIBS) $(LIBDL) $(ZLIB) -+ $(THREADLIBS) $(LIBDL) $(ZLIB) $(JANSSON_LIBS) - ldflags_var = $(GOLD_LDFLAGS) - - ld_new_SOURCES = $(sources_var) -@@ -201,12 +201,12 @@ incremental_dump_SOURCES = incremental-d - incremental_dump_DEPENDENCIES = $(TARGETOBJS) libgold.a $(LIBIBERTY) \ - $(LIBINTL_DEP) - incremental_dump_LDADD = $(TARGETOBJS) libgold.a $(LIBIBERTY) $(LIBINTL) \ -- $(THREADLIBS) $(LIBDL) $(ZLIB) -+ $(THREADLIBS) $(LIBDL) $(ZLIB) $(JANSSON_LIBS) - - dwp_SOURCES = dwp.cc - dwp_DEPENDENCIES = libgold.a $(LIBIBERTY) $(LIBINTL_DEP) - dwp_LDADD = libgold.a $(LIBIBERTY) $(GOLD_LDADD) $(LIBINTL) $(THREADLIBS) \ -- $(LIBDL) $(ZLIB) -+ $(LIBDL) $(ZLIB) $(JANSSON_LIBS) - dwp_LDFLAGS = $(GOLD_LDFLAGS) - - CONFIG_STATUS_DEPENDENCIES = $(srcdir)/../bfd/development.sh -diff -rup binutils.orig/gold/configure.ac binutils-2.38/gold/configure.ac ---- binutils.orig/gold/configure.ac 2022-08-04 11:11:01.783495194 +0100 -+++ binutils-2.38/gold/configure.ac 2022-08-04 11:12:26.124013955 +0100 + // The OS values which may appear in word 0 of a NT_GNU_ABI_TAG note. +diff -rupN --no-dereference binutils-2.39/gold/configure.ac binutils-2.39-new/gold/configure.ac +--- binutils-2.39/gold/configure.ac 2022-10-30 12:41:34.538023785 +0100 ++++ binutils-2.39-new/gold/configure.ac 2022-10-30 12:41:39.173023806 +0100 @@ -591,6 +591,32 @@ if test "$threads" = "yes"; then fi AM_CONDITIONAL(THREADS, test "$threads" = "yes") @@ -70,9 +48,9 @@ diff -rup binutils.orig/gold/configure.ac binutils-2.38/gold/configure.ac dnl We have to check these in C, not C++, because autoconf generates dnl tests which have no type information, and current glibc provides dnl multiple declarations of functions like basename when compiling -diff -rup binutils.orig/gold/layout.cc binutils-2.38/gold/layout.cc ---- binutils.orig/gold/layout.cc 2022-08-04 11:11:01.783495194 +0100 -+++ binutils-2.38/gold/layout.cc 2022-08-04 11:12:26.125013949 +0100 +diff -rupN --no-dereference binutils-2.39/gold/layout.cc binutils-2.39-new/gold/layout.cc +--- binutils-2.39/gold/layout.cc 2022-10-30 12:41:33.405023779 +0100 ++++ binutils-2.39-new/gold/layout.cc 2022-10-30 12:41:39.174023806 +0100 @@ -38,6 +38,9 @@ #include #include @@ -144,9 +122,9 @@ diff -rup binutils.orig/gold/layout.cc binutils-2.38/gold/layout.cc // If we have both .stabXX and .stabXXstr sections, then the sh_link // field of the former should point to the latter. I'm not sure who // started this, but the GNU linker does it, and some tools depend -diff -rup binutils.orig/gold/layout.h binutils-2.38/gold/layout.h ---- binutils.orig/gold/layout.h 2022-08-04 11:11:01.788495165 +0100 -+++ binutils-2.38/gold/layout.h 2022-08-04 11:12:26.125013949 +0100 +diff -rupN --no-dereference binutils-2.39/gold/layout.h binutils-2.39-new/gold/layout.h +--- binutils-2.39/gold/layout.h 2022-07-08 11:46:48.000000000 +0200 ++++ binutils-2.39-new/gold/layout.h 2022-10-30 12:41:39.174023806 +0100 @@ -1107,6 +1107,10 @@ class Layout void create_build_id(); @@ -167,9 +145,45 @@ diff -rup binutils.orig/gold/layout.h binutils-2.38/gold/layout.h // The output section containing dwarf abbreviations Output_reduced_debug_abbrev_section* debug_abbrev_; // The output section containing the dwarf debug info tree -diff -rup binutils.orig/gold/options.h binutils-2.38/gold/options.h ---- binutils.orig/gold/options.h 2022-08-04 11:11:01.785495182 +0100 -+++ binutils-2.38/gold/options.h 2022-08-04 11:12:26.125013949 +0100 +diff -rupN --no-dereference binutils-2.39/gold/Makefile.am binutils-2.39-new/gold/Makefile.am +--- binutils-2.39/gold/Makefile.am 2022-07-08 11:46:48.000000000 +0200 ++++ binutils-2.39-new/gold/Makefile.am 2022-10-30 12:41:39.173023806 +0100 +@@ -35,7 +35,7 @@ THREADFLAGS = @PTHREAD_CFLAGS@ + THREADLIBS = @PTHREAD_LIBS@ + + AM_CFLAGS = $(WARN_CFLAGS) $(LFS_CFLAGS) $(RANDOM_SEED_CFLAGS) $(ZLIBINC) $(THREADFLAGS) +-AM_CXXFLAGS = $(WARN_CXXFLAGS) $(LFS_CFLAGS) $(RANDOM_SEED_CFLAGS) $(ZLIBINC) $(THREADFLAGS) ++AM_CXXFLAGS = $(WARN_CXXFLAGS) $(LFS_CFLAGS) $(RANDOM_SEED_CFLAGS) $(ZLIBINC) $(THREADFLAGS) $(JANSSON_CFLAGS) + AM_LDFLAGS = $(THREADFLAGS) + + AM_CPPFLAGS = \ +@@ -187,7 +187,7 @@ libgold_a_LIBADD = $(LIBOBJS) + sources_var = main.cc + deps_var = $(TARGETOBJS) libgold.a $(LIBIBERTY) $(LIBINTL_DEP) + ldadd_var = $(TARGETOBJS) libgold.a $(LIBIBERTY) $(GOLD_LDADD) $(LIBINTL) \ +- $(THREADLIBS) $(LIBDL) $(ZLIB) ++ $(THREADLIBS) $(LIBDL) $(ZLIB) $(JANSSON_LIBS) + ldflags_var = $(GOLD_LDFLAGS) + + ld_new_SOURCES = $(sources_var) +@@ -201,12 +201,12 @@ incremental_dump_SOURCES = incremental-d + incremental_dump_DEPENDENCIES = $(TARGETOBJS) libgold.a $(LIBIBERTY) \ + $(LIBINTL_DEP) + incremental_dump_LDADD = $(TARGETOBJS) libgold.a $(LIBIBERTY) $(LIBINTL) \ +- $(THREADLIBS) $(LIBDL) $(ZLIB) ++ $(THREADLIBS) $(LIBDL) $(ZLIB) $(JANSSON_LIBS) + + dwp_SOURCES = dwp.cc + dwp_DEPENDENCIES = libgold.a $(LIBIBERTY) $(LIBINTL_DEP) + dwp_LDADD = libgold.a $(LIBIBERTY) $(GOLD_LDADD) $(LIBINTL) $(THREADLIBS) \ +- $(LIBDL) $(ZLIB) ++ $(LIBDL) $(ZLIB) $(JANSSON_LIBS) + dwp_LDFLAGS = $(GOLD_LDFLAGS) + + CONFIG_STATUS_DEPENDENCIES = $(srcdir)/../bfd/development.sh +diff -rupN --no-dereference binutils-2.39/gold/options.h binutils-2.39-new/gold/options.h +--- binutils-2.39/gold/options.h 2022-07-08 11:46:48.000000000 +0200 ++++ binutils-2.39-new/gold/options.h 2022-10-30 12:41:39.175023806 +0100 @@ -1102,6 +1102,10 @@ class General_options DEFINE_bool(p, options::ONE_DASH, 'p', false, N_("Ignored for ARM compatibility"), NULL); @@ -181,17 +195,3 @@ diff -rup binutils.orig/gold/options.h binutils-2.38/gold/options.h DEFINE_bool(pie, options::ONE_DASH, '\0', false, N_("Create a position independent executable"), N_("Do not create a position independent executable")); -diff -rup binutils.orig/elfcpp/elfcpp.h binutils-2.38/elfcpp/elfcpp.h ---- binutils.orig/elfcpp/elfcpp.h 2022-08-04 11:11:00.940500003 +0100 -+++ binutils-2.38/elfcpp/elfcpp.h 2022-08-04 11:12:26.124013955 +0100 -@@ -999,7 +999,9 @@ enum - // string. - NT_GNU_GOLD_VERSION = 4, - // Program property note, as described in "Linux Extensions to the gABI". -- NT_GNU_PROPERTY_TYPE_0 = 5 -+ NT_GNU_PROPERTY_TYPE_0 = 5, -+ // FDO .note.package notes as defined on https://systemd.io/ELF_PACKAGE_METADATA/ -+ FDO_PACKAGING_METADATA = 0xcafe1a7e - }; - - // The OS values which may appear in word 0 of a NT_GNU_ABI_TAG note. diff --git a/binutils-readelf-other-sym-info.patch b/binutils-readelf-other-sym-info.patch index 72913ba..ddfd850 100644 --- a/binutils-readelf-other-sym-info.patch +++ b/binutils-readelf-other-sym-info.patch @@ -1,6 +1,7 @@ ---- binutils.orig/binutils/readelf.c 2020-07-24 15:08:30.317597020 +0100 -+++ binutils-2.35/binutils/readelf.c 2020-07-24 15:09:39.029155552 +0100 -@@ -12069,11 +12069,13 @@ print_dynamic_symbol (Filedata *filedata +diff -rupN --no-dereference binutils-2.39/binutils/readelf.c binutils-2.39-new/binutils/readelf.c +--- binutils-2.39/binutils/readelf.c 2022-10-30 12:41:26.462023746 +0100 ++++ binutils-2.39-new/binutils/readelf.c 2022-10-30 12:41:27.687023752 +0100 +@@ -13177,11 +13177,13 @@ print_dynamic_symbol (Filedata *filedata unsigned int vis = ELF_ST_VISIBILITY (psym->st_other); printf (" %-7s", get_symbol_visibility (vis)); @@ -14,7 +15,7 @@ } printf (" %4s ", get_symbol_index_type (filedata, psym->st_shndx)); -@@ -12112,7 +12114,17 @@ print_dynamic_symbol (Filedata *filedata +@@ -13235,7 +13237,17 @@ print_dynamic_symbol (Filedata *filedata version_string); } diff --git a/binutils-revert-PLT-elision.patch b/binutils-revert-PLT-elision.patch index 885bbee..c43fc21 100644 --- a/binutils-revert-PLT-elision.patch +++ b/binutils-revert-PLT-elision.patch @@ -1,218 +1,7 @@ -diff -rup binutils.orig/ld/testsuite/ld-i386/pltgot-1.d binutils-2.29.1/ld/testsuite/ld-i386/pltgot-1.d ---- binutils.orig/ld/testsuite/ld-i386/pltgot-1.d 2017-11-15 13:32:39.335065263 +0000 -+++ binutils-2.29.1/ld/testsuite/ld-i386/pltgot-1.d 2017-11-15 15:03:55.649727195 +0000 -@@ -2,6 +2,7 @@ - #readelf: -S --wide - #as: --32 - -+#pass - #... - +\[ *[0-9]+\] \.plt +PROGBITS +[0-9a-f]+ +[0-9a-f]+ +0+10 +.* - #... -diff -rup binutils.orig/ld/testsuite/ld-i386/pltgot-2.d binutils-2.29.1/ld/testsuite/ld-i386/pltgot-2.d ---- binutils.orig/ld/testsuite/ld-i386/pltgot-2.d 2017-11-15 13:32:39.329065335 +0000 -+++ binutils-2.29.1/ld/testsuite/ld-i386/pltgot-2.d 2017-11-15 15:04:20.803430034 +0000 -@@ -3,7 +3,6 @@ - #readelf: -d --wide - #as: --32 - --#failif - #... - +0x[0-9a-f]+ +\(PLTREL.* - #... -diff -rup binutils.orig/ld/testsuite/ld-i386/pr19636-2d.d binutils-2.29.1/ld/testsuite/ld-i386/pr19636-2d.d ---- binutils.orig/ld/testsuite/ld-i386/pr19636-2d.d 2017-11-15 13:32:39.336065251 +0000 -+++ binutils-2.29.1/ld/testsuite/ld-i386/pr19636-2d.d 2017-11-15 15:03:00.413379749 +0000 -@@ -9,7 +9,7 @@ Relocation section '\.rel\.dyn' at offse - [0-9a-f]+ +[0-9a-f]+ +R_386_32 +0+ +func - [0-9a-f]+ +[0-9a-f]+ +R_386_PC32 +0+ +func - [0-9a-f]+ +[0-9a-f]+ +R_386_GLOB_DAT +0+ +func -- -+#... - Symbol table '\.dynsym' contains [0-9]+ entries: - +Num: +Value +Size Type +Bind +Vis +Ndx Name - #... -diff -rup binutils.orig/ld/testsuite/ld-i386/pr19636-2e.d binutils-2.29.1/ld/testsuite/ld-i386/pr19636-2e.d ---- binutils.orig/ld/testsuite/ld-i386/pr19636-2e.d 2017-11-15 13:32:39.330065323 +0000 -+++ binutils-2.29.1/ld/testsuite/ld-i386/pr19636-2e.d 2017-11-15 15:03:28.928042882 +0000 -@@ -9,7 +9,7 @@ Relocation section '\.rel\.dyn' at offse - [0-9a-f]+ +[0-9a-f]+ +R_386_32 +0+ +func - [0-9a-f]+ +[0-9a-f]+ +R_386_PC32 +0+ +func - [0-9a-f]+ +[0-9a-f]+ +R_386_GLOB_DAT +0+ +func -- -+#... - Symbol table '\.dynsym' contains [0-9]+ entries: - +Num: +Value +Size Type +Bind +Vis +Ndx Name - #... -diff -rup binutils.orig/ld/testsuite/ld-x86-64/pltgot-1.d binutils-2.29.1/ld/testsuite/ld-x86-64/pltgot-1.d ---- binutils.orig/ld/testsuite/ld-x86-64/pltgot-1.d 2017-11-15 13:32:39.415064300 +0000 -+++ binutils-2.29.1/ld/testsuite/ld-x86-64/pltgot-1.d 2017-11-15 15:08:39.333375801 +0000 -@@ -2,8 +2,4 @@ - #readelf: -S --wide - #as: --64 - --#... -- +\[ *[0-9]+\] \.plt +PROGBITS +[0-9a-f]+ +[0-9a-f]+ +0+10 +.* --#... -- +\[ *[0-9]+\] \.got\.plt +PROGBITS +[0-9a-f]+ +[0-9a-f]+ +0+18 +.* - #pass -diff -rup binutils.orig/ld/testsuite/ld-x86-64/pltgot-2.d binutils-2.29.1/ld/testsuite/ld-x86-64/pltgot-2.d ---- binutils.orig/ld/testsuite/ld-x86-64/pltgot-2.d 2017-11-15 13:32:39.404064432 +0000 -+++ binutils-2.29.1/ld/testsuite/ld-x86-64/pltgot-2.d 2017-11-15 15:08:59.031143095 +0000 -@@ -3,7 +3,6 @@ - #readelf: -d --wide - #as: --64 - --#failif - #... - +0x[0-9a-f]+ +\(PLTREL.* - #... -diff -rup binutils.orig/ld/testsuite/ld-x86-64/plt-main.rd binutils-2.29.1/ld/testsuite/ld-x86-64/plt-main.rd ---- binutils.orig/ld/testsuite/ld-x86-64/plt-main.rd 2017-11-15 13:32:39.407064397 +0000 -+++ binutils-2.29.1/ld/testsuite/ld-x86-64/plt-main.rd 2017-11-15 15:06:17.244054423 +0000 -@@ -1,4 +1,3 @@ --#failif - #... - [0-9a-f ]+R_X86_64_JUMP_SLOT +0+ +bar \+ 0 - #... -diff -rup binutils.orig/ld/testsuite/ld-x86-64/pr20830a.d binutils-2.29.1/ld/testsuite/ld-x86-64/pr20830a.d ---- binutils.orig/ld/testsuite/ld-x86-64/pr20830a.d 2017-11-15 13:32:39.412064336 +0000 -+++ binutils-2.29.1/ld/testsuite/ld-x86-64/pr20830a.d 2017-11-15 15:15:09.918750288 +0000 -@@ -20,6 +20,7 @@ Contents of the .eh_frame section: - DW_CFA_offset: r16 \(rip\) at cfa-8 - DW_CFA_nop - DW_CFA_nop -+#pass - - 0+18 0000000000000014 0000001c FDE cie=00000000 pc=00000000000001c8..00000000000001d4 - DW_CFA_nop -diff -rup binutils.orig/ld/testsuite/ld-x86-64/pr20830a-now.d binutils-2.29.1/ld/testsuite/ld-x86-64/pr20830a-now.d ---- binutils.orig/ld/testsuite/ld-x86-64/pr20830a-now.d 2017-11-15 13:32:39.413064324 +0000 -+++ binutils-2.29.1/ld/testsuite/ld-x86-64/pr20830a-now.d 2017-11-15 15:16:08.227055104 +0000 -@@ -20,6 +20,7 @@ Contents of the .eh_frame section: - DW_CFA_offset: r16 \(rip\) at cfa-8 - DW_CFA_nop - DW_CFA_nop -+#pass - - 0+18 0000000000000014 0000001c FDE cie=00000000 pc=00000000000001c8..00000000000001d4 - DW_CFA_nop -diff -rup binutils.orig/ld/testsuite/ld-x86-64/pr20830b.d binutils-2.29.1/ld/testsuite/ld-x86-64/pr20830b.d ---- binutils.orig/ld/testsuite/ld-x86-64/pr20830b.d 2017-11-15 13:32:39.413064324 +0000 -+++ binutils-2.29.1/ld/testsuite/ld-x86-64/pr20830b.d 2017-11-15 15:16:20.115913358 +0000 -@@ -20,7 +20,8 @@ Contents of the .eh_frame section: - DW_CFA_offset: r16 \(rip\) at cfa-8 - DW_CFA_nop - DW_CFA_nop -- -+#pass -+ - 0+18 0000000000000010 0000001c FDE cie=00000000 pc=0000000000000138..0000000000000144 - DW_CFA_nop - DW_CFA_nop -diff -rup binutils.orig/ld/testsuite/ld-x86-64/pr20830b-now.d binutils-2.29.1/ld/testsuite/ld-x86-64/pr20830b-now.d ---- binutils.orig/ld/testsuite/ld-x86-64/pr20830b-now.d 2017-11-15 13:32:39.411064348 +0000 -+++ binutils-2.29.1/ld/testsuite/ld-x86-64/pr20830b-now.d 2017-11-15 15:16:29.012807282 +0000 -@@ -20,7 +20,8 @@ Contents of the .eh_frame section: - DW_CFA_offset: r16 \(rip\) at cfa-8 - DW_CFA_nop - DW_CFA_nop -- -+#pass -+ - 0+18 0000000000000010 0000001c FDE cie=00000000 pc=0000000000000138..0000000000000144 - DW_CFA_nop - DW_CFA_nop -diff -rup binutils.orig/ld/testsuite/ld-x86-64/pr21038a.d binutils-2.29.1/ld/testsuite/ld-x86-64/pr21038a.d ---- binutils.orig/ld/testsuite/ld-x86-64/pr21038a.d 2017-11-15 13:32:39.408064384 +0000 -+++ binutils-2.29.1/ld/testsuite/ld-x86-64/pr21038a.d 2017-11-15 15:19:48.097433680 +0000 -@@ -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 -rup binutils.orig/ld/testsuite/ld-x86-64/pr21038a-now.d binutils-2.29.1/ld/testsuite/ld-x86-64/pr21038a-now.d ---- binutils.orig/ld/testsuite/ld-x86-64/pr21038a-now.d 2017-11-15 13:32:39.401064469 +0000 -+++ binutils-2.29.1/ld/testsuite/ld-x86-64/pr21038a-now.d 2017-11-15 15:10:56.077760324 +0000 -@@ -20,7 +20,8 @@ Contents of the .eh_frame section: - DW_CFA_offset: r16 \(rip\) at cfa-8 - DW_CFA_nop - DW_CFA_nop -- -+#pass -+ - 0+18 0000000000000014 0000001c FDE cie=00000000 pc=00000000000001c8..00000000000001d4 - DW_CFA_nop - DW_CFA_nop -diff -rup binutils.orig/ld/testsuite/ld-x86-64/pr21038b.d binutils-2.29.1/ld/testsuite/ld-x86-64/pr21038b.d ---- binutils.orig/ld/testsuite/ld-x86-64/pr21038b.d 2017-11-15 13:32:39.405064420 +0000 -+++ binutils-2.29.1/ld/testsuite/ld-x86-64/pr21038b.d 2017-11-15 15:10:42.828916844 +0000 -@@ -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 -rup binutils.orig/ld/testsuite/ld-x86-64/pr21038b-now.d binutils-2.29.1/ld/testsuite/ld-x86-64/pr21038b-now.d ---- binutils.orig/ld/testsuite/ld-x86-64/pr21038b-now.d 2017-11-15 13:32:39.416064288 +0000 -+++ binutils-2.29.1/ld/testsuite/ld-x86-64/pr21038b-now.d 2017-11-15 15:11:11.550577531 +0000 -@@ -20,7 +20,8 @@ Contents of the .eh_frame section: - DW_CFA_offset: r16 \(rip\) at cfa-8 - DW_CFA_nop - DW_CFA_nop -- -+#pass -+ - 0+18 0000000000000014 0000001c FDE cie=00000000 pc=00000000000001d8..00000000000001dd - DW_CFA_nop - DW_CFA_nop -diff -rup binutils.orig/ld/testsuite/ld-x86-64/pr21038c.d binutils-2.29.1/ld/testsuite/ld-x86-64/pr21038c.d ---- binutils.orig/ld/testsuite/ld-x86-64/pr21038c.d 2017-11-15 13:32:39.411064348 +0000 -+++ binutils-2.29.1/ld/testsuite/ld-x86-64/pr21038c.d 2017-11-15 15:09:52.664509478 +0000 -@@ -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 -rup binutils.orig/ld/testsuite/ld-x86-64/pr21038c-now.d binutils-2.29.1/ld/testsuite/ld-x86-64/pr21038c-now.d ---- binutils.orig/ld/testsuite/ld-x86-64/pr21038c-now.d 2017-11-15 13:32:39.413064324 +0000 -+++ binutils-2.29.1/ld/testsuite/ld-x86-64/pr21038c-now.d 2017-11-15 15:11:22.975442559 +0000 -@@ -20,7 +20,8 @@ Contents of the .eh_frame section: - DW_CFA_offset: r16 \(rip\) at cfa-8 - DW_CFA_nop - DW_CFA_nop -- -+#pass -+ - 0+18 0000000000000014 0000001c FDE cie=00000000 pc=0000000000000220..0000000000000231 - DW_CFA_nop - DW_CFA_nop -diff -rup binutils.orig/ld/testsuite/ld-x86-64/tlspic2.rd binutils-2.29.1/ld/testsuite/ld-x86-64/tlspic2.rd ---- binutils.orig/ld/testsuite/ld-x86-64/tlspic2.rd 2017-11-15 13:32:39.417064276 +0000 -+++ binutils-2.29.1/ld/testsuite/ld-x86-64/tlspic2.rd 2017-11-15 15:05:02.950932110 +0000 -@@ -14,6 +14,7 @@ Section Headers: - +\[[ 0-9]+\] .dynsym +.* - +\[[ 0-9]+\] .dynstr +.* - +\[[ 0-9]+\] .rela.dyn +.* -+#pass - +\[[ 0-9]+\] .plt +.* - +\[[ 0-9]+\] .plt.got +.* - +\[[ 0-9]+\] .text +PROGBITS +0+1000 0+1000 0+31a 00 +AX +0 +0 4096 ---- binutils.orig/bfd/elfxx-x86.c 2018-01-22 15:59:25.875788033 +0000 -+++ binutils-2.30.0/bfd/elfxx-x86.c 2018-01-22 16:00:20.789146597 +0000 -@@ -107,7 +107,7 @@ elf_x86_allocate_dynrelocs (struct elf_l +diff -rupN --no-dereference binutils-2.39/bfd/elfxx-x86.c binutils-2.39-new/bfd/elfxx-x86.c +--- binutils-2.39/bfd/elfxx-x86.c 2022-07-26 09:13:10.000000000 +0200 ++++ binutils-2.39-new/bfd/elfxx-x86.c 2022-10-30 12:41:26.471023746 +0100 +@@ -105,7 +105,7 @@ elf_x86_allocate_dynrelocs (struct elf_l plt_entry_size = htab->plt.plt_entry_size; resolved_to_zero = UNDEFINED_WEAK_RESOLVED_TO_ZERO (info, eh); @@ -221,7 +10,7 @@ diff -rup binutils.orig/ld/testsuite/ld-x86-64/tlspic2.rd binutils-2.29.1/ld/tes /* 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 +@@ -123,7 +123,7 @@ elf_x86_allocate_dynrelocs (struct elf_l /* Use the GOT PLT. */ eh->plt_got.refcount = 1; } @@ -230,8 +19,55 @@ diff -rup binutils.orig/ld/testsuite/ld-x86-64/tlspic2.rd binutils-2.29.1/ld/tes /* Since STT_GNU_IFUNC symbol must go through PLT, we handle it here if it is defined and referenced in a non-shared object. */ if (h->type == STT_GNU_IFUNC ---- binutils.orig/ld/testsuite/ld-i386/pr20830.d 2018-07-09 09:49:51.277239857 +0100 -+++ binutils-2.30.90/ld/testsuite/ld-i386/pr20830.d 2018-07-09 10:32:41.113356733 +0100 +diff -rupN --no-dereference binutils-2.39/ld/testsuite/ld-i386/pltgot-1.d binutils-2.39-new/ld/testsuite/ld-i386/pltgot-1.d +--- binutils-2.39/ld/testsuite/ld-i386/pltgot-1.d 2022-07-08 11:46:48.000000000 +0200 ++++ binutils-2.39-new/ld/testsuite/ld-i386/pltgot-1.d 2022-10-30 12:41:26.467023746 +0100 +@@ -2,6 +2,7 @@ + #readelf: -S --wide + #as: --32 + ++#pass + #... + +\[ *[0-9]+\] \.plt +PROGBITS +[0-9a-f]+ +[0-9a-f]+ +0+10 +.* + #... +diff -rupN --no-dereference binutils-2.39/ld/testsuite/ld-i386/pltgot-2.d binutils-2.39-new/ld/testsuite/ld-i386/pltgot-2.d +--- binutils-2.39/ld/testsuite/ld-i386/pltgot-2.d 2022-07-08 11:46:48.000000000 +0200 ++++ binutils-2.39-new/ld/testsuite/ld-i386/pltgot-2.d 2022-10-30 12:41:26.467023746 +0100 +@@ -3,7 +3,6 @@ + #readelf: -d --wide + #as: --32 + +-#failif + #... + +0x[0-9a-f]+ +\(PLTREL.* + #... +diff -rupN --no-dereference binutils-2.39/ld/testsuite/ld-i386/pr19636-2d.d binutils-2.39-new/ld/testsuite/ld-i386/pr19636-2d.d +--- binutils-2.39/ld/testsuite/ld-i386/pr19636-2d.d 2022-07-08 11:46:48.000000000 +0200 ++++ binutils-2.39-new/ld/testsuite/ld-i386/pr19636-2d.d 2022-10-30 12:41:26.467023746 +0100 +@@ -8,7 +8,7 @@ Relocation section '\.rel\.dyn' at offse + [0-9a-f]+ +[0-9a-f]+ +R_386_32 +0+ +func + [0-9a-f]+ +[0-9a-f]+ +R_386_PC32 +0+ +func + [0-9a-f]+ +[0-9a-f]+ +R_386_GLOB_DAT +0+ +func +- ++#... + Symbol table '\.dynsym' contains [0-9]+ entries: + +Num: +Value +Size Type +Bind +Vis +Ndx Name + #... +diff -rupN --no-dereference binutils-2.39/ld/testsuite/ld-i386/pr19636-2e.d binutils-2.39-new/ld/testsuite/ld-i386/pr19636-2e.d +--- binutils-2.39/ld/testsuite/ld-i386/pr19636-2e.d 2022-07-08 11:46:48.000000000 +0200 ++++ binutils-2.39-new/ld/testsuite/ld-i386/pr19636-2e.d 2022-10-30 12:41:26.468023746 +0100 +@@ -8,7 +8,7 @@ Relocation section '\.rel\.dyn' at offse + [0-9a-f]+ +[0-9a-f]+ +R_386_32 +0+ +func + [0-9a-f]+ +[0-9a-f]+ +R_386_PC32 +0+ +func + [0-9a-f]+ +[0-9a-f]+ +R_386_GLOB_DAT +0+ +func +- ++#... + Symbol table '\.dynsym' contains [0-9]+ entries: + +Num: +Value +Size Type +Bind +Vis +Ndx Name + #... +diff -rupN --no-dereference binutils-2.39/ld/testsuite/ld-i386/pr20830.d binutils-2.39-new/ld/testsuite/ld-i386/pr20830.d +--- binutils-2.39/ld/testsuite/ld-i386/pr20830.d 2022-07-08 11:46:48.000000000 +0200 ++++ binutils-2.39-new/ld/testsuite/ld-i386/pr20830.d 2022-10-30 12:41:26.472023746 +0100 @@ -19,7 +19,7 @@ Contents of the .eh_frame section: DW_CFA_offset: r8 \(eip\) at cfa-4 DW_CFA_nop @@ -241,3 +77,169 @@ diff -rup binutils.orig/ld/testsuite/ld-x86-64/tlspic2.rd binutils-2.29.1/ld/tes 0+18 00000010 0000001c FDE cie=00000000 pc=00000128..00000133 DW_CFA_nop DW_CFA_nop +diff -rupN --no-dereference binutils-2.39/ld/testsuite/ld-x86-64/pltgot-1.d binutils-2.39-new/ld/testsuite/ld-x86-64/pltgot-1.d +--- binutils-2.39/ld/testsuite/ld-x86-64/pltgot-1.d 2022-07-08 11:46:48.000000000 +0200 ++++ binutils-2.39-new/ld/testsuite/ld-x86-64/pltgot-1.d 2022-10-30 12:41:26.468023746 +0100 +@@ -2,8 +2,4 @@ + #readelf: -S --wide + #as: --64 + +-#... +- +\[ *[0-9]+\] \.plt +PROGBITS +[0-9a-f]+ +[0-9a-f]+ +0+10 +.* +-#... +- +\[ *[0-9]+\] \.got\.plt +PROGBITS +[0-9a-f]+ +[0-9a-f]+ +0+18 +.* + #pass +diff -rupN --no-dereference binutils-2.39/ld/testsuite/ld-x86-64/pltgot-2.d binutils-2.39-new/ld/testsuite/ld-x86-64/pltgot-2.d +--- binutils-2.39/ld/testsuite/ld-x86-64/pltgot-2.d 2022-07-08 11:46:48.000000000 +0200 ++++ binutils-2.39-new/ld/testsuite/ld-x86-64/pltgot-2.d 2022-10-30 12:41:26.469023746 +0100 +@@ -3,7 +3,6 @@ + #readelf: -d --wide + #as: --64 + +-#failif + #... + +0x[0-9a-f]+ +\(PLTREL.* + #... +diff -rupN --no-dereference binutils-2.39/ld/testsuite/ld-x86-64/plt-main.rd binutils-2.39-new/ld/testsuite/ld-x86-64/plt-main.rd +--- binutils-2.39/ld/testsuite/ld-x86-64/plt-main.rd 2022-07-08 11:46:48.000000000 +0200 ++++ binutils-2.39-new/ld/testsuite/ld-x86-64/plt-main.rd 2022-10-30 12:41:26.469023746 +0100 +@@ -1,4 +1,3 @@ +-#failif + #... + [0-9a-f ]+R_X86_64_JUMP_SLOT +0+ +bar \+ 0 + #... +diff -rupN --no-dereference binutils-2.39/ld/testsuite/ld-x86-64/pr20830a.d binutils-2.39-new/ld/testsuite/ld-x86-64/pr20830a.d +--- binutils-2.39/ld/testsuite/ld-x86-64/pr20830a.d 2022-07-08 11:46:48.000000000 +0200 ++++ binutils-2.39-new/ld/testsuite/ld-x86-64/pr20830a.d 2022-10-30 12:41:26.469023746 +0100 +@@ -20,6 +20,7 @@ Contents of the .eh_frame section: + DW_CFA_offset: r16 \(rip\) at cfa-8 + DW_CFA_nop + DW_CFA_nop ++#pass + + 0+18 0000000000000014 0000001c FDE cie=00000000 pc=00000000000001c8..00000000000001d4 + DW_CFA_nop +diff -rupN --no-dereference binutils-2.39/ld/testsuite/ld-x86-64/pr20830a-now.d binutils-2.39-new/ld/testsuite/ld-x86-64/pr20830a-now.d +--- binutils-2.39/ld/testsuite/ld-x86-64/pr20830a-now.d 2022-07-08 11:46:48.000000000 +0200 ++++ binutils-2.39-new/ld/testsuite/ld-x86-64/pr20830a-now.d 2022-10-30 12:41:26.469023746 +0100 +@@ -20,6 +20,7 @@ Contents of the .eh_frame section: + DW_CFA_offset: r16 \(rip\) at cfa-8 + DW_CFA_nop + DW_CFA_nop ++#pass + + 0+18 0000000000000014 0000001c FDE cie=00000000 pc=00000000000001c8..00000000000001d4 + DW_CFA_nop +diff -rupN --no-dereference binutils-2.39/ld/testsuite/ld-x86-64/pr20830b.d binutils-2.39-new/ld/testsuite/ld-x86-64/pr20830b.d +--- binutils-2.39/ld/testsuite/ld-x86-64/pr20830b.d 2022-07-08 11:46:48.000000000 +0200 ++++ binutils-2.39-new/ld/testsuite/ld-x86-64/pr20830b.d 2022-10-30 12:41:26.469023746 +0100 +@@ -20,7 +20,8 @@ Contents of the .eh_frame section: + DW_CFA_offset: r16 \(rip\) at cfa-8 + DW_CFA_nop + DW_CFA_nop +- ++#pass ++ + 0+18 0000000000000010 0000001c FDE cie=00000000 pc=0000000000000138..0000000000000144 + DW_CFA_nop + DW_CFA_nop +diff -rupN --no-dereference binutils-2.39/ld/testsuite/ld-x86-64/pr20830b-now.d binutils-2.39-new/ld/testsuite/ld-x86-64/pr20830b-now.d +--- binutils-2.39/ld/testsuite/ld-x86-64/pr20830b-now.d 2022-07-08 11:46:48.000000000 +0200 ++++ binutils-2.39-new/ld/testsuite/ld-x86-64/pr20830b-now.d 2022-10-30 12:41:26.469023746 +0100 +@@ -20,7 +20,8 @@ Contents of the .eh_frame section: + DW_CFA_offset: r16 \(rip\) at cfa-8 + DW_CFA_nop + DW_CFA_nop +- ++#pass ++ + 0+18 0000000000000010 0000001c FDE cie=00000000 pc=0000000000000138..0000000000000144 + DW_CFA_nop + DW_CFA_nop +diff -rupN --no-dereference binutils-2.39/ld/testsuite/ld-x86-64/pr21038a.d binutils-2.39-new/ld/testsuite/ld-x86-64/pr21038a.d +--- binutils-2.39/ld/testsuite/ld-x86-64/pr21038a.d 2022-07-08 11:46:48.000000000 +0200 ++++ binutils-2.39-new/ld/testsuite/ld-x86-64/pr21038a.d 2022-10-30 12:41:26.470023746 +0100 +@@ -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.39/ld/testsuite/ld-x86-64/pr21038a-now.d binutils-2.39-new/ld/testsuite/ld-x86-64/pr21038a-now.d +--- binutils-2.39/ld/testsuite/ld-x86-64/pr21038a-now.d 2022-07-08 11:46:48.000000000 +0200 ++++ binutils-2.39-new/ld/testsuite/ld-x86-64/pr21038a-now.d 2022-10-30 12:41:26.470023746 +0100 +@@ -20,7 +20,8 @@ Contents of the .eh_frame section: + DW_CFA_offset: r16 \(rip\) at cfa-8 + DW_CFA_nop + DW_CFA_nop +- ++#pass ++ + 0+18 0000000000000014 0000001c FDE cie=00000000 pc=00000000000001c8..00000000000001d4 + DW_CFA_nop + DW_CFA_nop +diff -rupN --no-dereference binutils-2.39/ld/testsuite/ld-x86-64/pr21038b.d binutils-2.39-new/ld/testsuite/ld-x86-64/pr21038b.d +--- binutils-2.39/ld/testsuite/ld-x86-64/pr21038b.d 2022-07-08 11:46:48.000000000 +0200 ++++ binutils-2.39-new/ld/testsuite/ld-x86-64/pr21038b.d 2022-10-30 12:41:26.470023746 +0100 +@@ -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.39/ld/testsuite/ld-x86-64/pr21038b-now.d binutils-2.39-new/ld/testsuite/ld-x86-64/pr21038b-now.d +--- binutils-2.39/ld/testsuite/ld-x86-64/pr21038b-now.d 2022-07-08 11:46:48.000000000 +0200 ++++ binutils-2.39-new/ld/testsuite/ld-x86-64/pr21038b-now.d 2022-10-30 12:41:26.470023746 +0100 +@@ -20,7 +20,8 @@ Contents of the .eh_frame section: + DW_CFA_offset: r16 \(rip\) at cfa-8 + DW_CFA_nop + DW_CFA_nop +- ++#pass ++ + 0+18 0000000000000014 0000001c FDE cie=00000000 pc=00000000000001d8..00000000000001dd + DW_CFA_nop + DW_CFA_nop +diff -rupN --no-dereference binutils-2.39/ld/testsuite/ld-x86-64/pr21038c.d binutils-2.39-new/ld/testsuite/ld-x86-64/pr21038c.d +--- binutils-2.39/ld/testsuite/ld-x86-64/pr21038c.d 2022-07-08 11:46:48.000000000 +0200 ++++ binutils-2.39-new/ld/testsuite/ld-x86-64/pr21038c.d 2022-10-30 12:41:26.470023746 +0100 +@@ -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.39/ld/testsuite/ld-x86-64/pr21038c-now.d binutils-2.39-new/ld/testsuite/ld-x86-64/pr21038c-now.d +--- binutils-2.39/ld/testsuite/ld-x86-64/pr21038c-now.d 2022-07-08 11:46:48.000000000 +0200 ++++ binutils-2.39-new/ld/testsuite/ld-x86-64/pr21038c-now.d 2022-10-30 12:41:26.470023746 +0100 +@@ -20,7 +20,8 @@ Contents of the .eh_frame section: + DW_CFA_offset: r16 \(rip\) at cfa-8 + DW_CFA_nop + DW_CFA_nop +- ++#pass ++ + 0+18 0000000000000014 0000001c FDE cie=00000000 pc=0000000000000220..0000000000000231 + DW_CFA_nop + DW_CFA_nop +diff -rupN --no-dereference binutils-2.39/ld/testsuite/ld-x86-64/tlspic2.rd binutils-2.39-new/ld/testsuite/ld-x86-64/tlspic2.rd +--- binutils-2.39/ld/testsuite/ld-x86-64/tlspic2.rd 2022-07-08 11:46:48.000000000 +0200 ++++ binutils-2.39-new/ld/testsuite/ld-x86-64/tlspic2.rd 2022-10-30 12:41:26.471023746 +0100 +@@ -14,6 +14,7 @@ Section Headers: + +\[[ 0-9]+\] .dynsym +.* + +\[[ 0-9]+\] .dynstr +.* + +\[[ 0-9]+\] .rela.dyn +.* ++#pass + +\[[ 0-9]+\] .plt +.* + +\[[ 0-9]+\] .plt.got +.* + +\[[ 0-9]+\] .text +PROGBITS +0+1000 0+1000 0+31a 00 +AX +0 +0 4096 diff --git a/binutils-special-sections-in-groups.patch b/binutils-special-sections-in-groups.patch index 7de5a93..559a850 100644 --- a/binutils-special-sections-in-groups.patch +++ b/binutils-special-sections-in-groups.patch @@ -1,6 +1,7 @@ ---- binutils.orig/bfd/elf.c 2018-10-19 11:42:10.107277490 +0100 -+++ binutils-2.31.1/bfd/elf.c 2018-10-19 11:44:33.607105801 +0100 -@@ -830,7 +830,13 @@ setup_group (bfd *abfd, Elf_Internal_Shd +diff -rupN --no-dereference binutils-2.39/bfd/elf.c binutils-2.39-new/bfd/elf.c +--- binutils-2.39/bfd/elf.c 2022-07-08 11:46:47.000000000 +0200 ++++ binutils-2.39-new/bfd/elf.c 2022-10-30 12:41:29.952023763 +0100 +@@ -824,7 +824,13 @@ setup_group (bfd *abfd, Elf_Internal_Shd } } @@ -15,7 +16,7 @@ { /* xgettext:c-format */ _bfd_error_handler (_("%pB: no group info for section '%pA'"), -@@ -936,7 +942,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 index 4090e82..cbb3bfa 100644 --- a/binutils-testsuite-fixes.patch +++ b/binutils-testsuite-fixes.patch @@ -1,165 +1,281 @@ -diff -rup binutils.orig/ld/testsuite/ld-plugin/plugin-10.d binutils-2.36.1/ld/testsuite/ld-plugin/plugin-10.d ---- binutils.orig/ld/testsuite/ld-plugin/plugin-10.d 2021-02-12 10:13:11.116049499 +0000 -+++ binutils-2.36.1/ld/testsuite/ld-plugin/plugin-10.d 2021-02-12 10:23:44.298370984 +0000 -@@ -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 -rup binutils.orig/ld/testsuite/ld-plugin/plugin-11.d binutils-2.36.1/ld/testsuite/ld-plugin/plugin-11.d ---- binutils.orig/ld/testsuite/ld-plugin/plugin-11.d 2021-02-12 10:13:11.119049477 +0000 -+++ binutils-2.36.1/ld/testsuite/ld-plugin/plugin-11.d 2021-02-12 10:50:40.973828943 +0000 -@@ -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 -rup binutils.orig/ld/testsuite/ld-plugin/plugin-16.d binutils-2.36.1/ld/testsuite/ld-plugin/plugin-16.d ---- binutils.orig/ld/testsuite/ld-plugin/plugin-16.d 2021-02-12 10:13:11.119049477 +0000 -+++ binutils-2.36.1/ld/testsuite/ld-plugin/plugin-16.d 2021-02-12 10:29:31.510843797 +0000 -@@ -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 -rup binutils.orig/ld/testsuite/ld-plugin/plugin-17.d binutils-2.36.1/ld/testsuite/ld-plugin/plugin-17.d ---- binutils.orig/ld/testsuite/ld-plugin/plugin-17.d 2021-02-12 10:13:11.116049499 +0000 -+++ binutils-2.36.1/ld/testsuite/ld-plugin/plugin-17.d 2021-02-12 10:35:13.348404638 +0000 -@@ -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 -rup binutils.orig/ld/testsuite/ld-plugin/plugin-18.d binutils-2.36.1/ld/testsuite/ld-plugin/plugin-18.d ---- binutils.orig/ld/testsuite/ld-plugin/plugin-18.d 2021-02-12 10:13:11.118049484 +0000 -+++ binutils-2.36.1/ld/testsuite/ld-plugin/plugin-18.d 2021-02-12 10:29:47.974726314 +0000 -@@ -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 -rup binutils.orig/ld/testsuite/ld-plugin/plugin-19.d binutils-2.36.1/ld/testsuite/ld-plugin/plugin-19.d ---- binutils.orig/ld/testsuite/ld-plugin/plugin-19.d 2021-02-12 10:13:11.116049499 +0000 -+++ binutils-2.36.1/ld/testsuite/ld-plugin/plugin-19.d 2021-02-12 10:30:31.990412245 +0000 -@@ -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 -rup binutils.orig/ld/testsuite/ld-plugin/plugin-8.d binutils-2.36.1/ld/testsuite/ld-plugin/plugin-8.d ---- binutils.orig/ld/testsuite/ld-plugin/plugin-8.d 2021-02-12 10:13:11.118049484 +0000 -+++ binutils-2.36.1/ld/testsuite/ld-plugin/plugin-8.d 2021-02-12 10:23:18.489561148 +0000 -@@ -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 -rup binutils.orig/ld/testsuite/ld-plugin/plugin-9.d binutils-2.36.1/ld/testsuite/ld-plugin/plugin-9.d ---- binutils.orig/ld/testsuite/ld-plugin/plugin-9.d 2021-02-12 10:13:11.119049477 +0000 -+++ binutils-2.36.1/ld/testsuite/ld-plugin/plugin-9.d 2021-02-12 10:23:34.417443785 +0000 -@@ -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 -rup binutils.orig/ld/testsuite/ld-x86-64/x86-64.exp binutils-2.36.1/ld/testsuite/ld-x86-64/x86-64.exp ---- binutils.orig/ld/testsuite/ld-x86-64/x86-64.exp 2021-02-12 11:44:39.121364751 +0000 -+++ binutils-2.36.1/ld/testsuite/ld-x86-64/x86-64.exp 2021-02-12 11:46:27.505597689 +0000 -@@ -1878,24 +1878,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] } { -@@ -1922,7 +1904,6 @@ if { [isnative] && [check_compiler_avail - } +diff -rupN --no-dereference binutils-2.39/binutils/testsuite/binutils-all/compress.exp binutils-2.39-new/binutils/testsuite/binutils-all/compress.exp +--- binutils-2.39/binutils/testsuite/binutils-all/compress.exp 2022-07-08 11:46:47.000000000 +0200 ++++ binutils-2.39-new/binutils/testsuite/binutils-all/compress.exp 2022-10-30 12:41:34.555023785 +0100 +@@ -766,12 +766,6 @@ proc test_gnu_debuglink {} { + } else { + pass "$test (objdump with missing link)" } +- set got [remote_exec host [concat sh -c [list "$READELF -S tmpdir/testprog > /dev/null"]]] +- if { [lindex $got 0] != 0 || ![string match "" [lindex $got 1]] } then { +- fail "$test (readelf with missing link)" +- } else { +- pass "$test (readelf with missing link)" +- } + } -- undefined_weak "$NOPIE_CFLAGS" "$NOPIE_LDFLAGS" - undefined_weak "-fPIE" "" - undefined_weak "-fPIE" "-pie" - undefined_weak "-fPIE" "-Wl,-z,nodynamic-undefined-weak" ---- binutils.orig/ld/testsuite/ld-plugin/plugin-12.d 2021-02-12 11:44:39.076365068 +0000 -+++ binutils-2.36.1/ld/testsuite/ld-plugin/plugin-12.d 2021-02-12 12:01:48.091931654 +0000 -@@ -1,5 +1,5 @@ - #... --.*: symbol `func' definition: DEF, visibility: DEFAULT, resolution: PREVAILING_DEF -+.*: symbol `func' definition: DEF, visibility: DEFAULT, resolution: PREVAILING_DE.* - .*: 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 ---- binutils.orig/ld/testsuite/ld-plugin/plugin-12.d 2021-02-12 14:14:25.023160021 +0000 -+++ binutils-2.36.1/ld/testsuite/ld-plugin/plugin-12.d 2021-02-12 14:19:29.106923745 +0000 -@@ -1,6 +1,6 @@ - #... --.*: symbol `func' definition: DEF, visibility: DEFAULT, resolution: PREVAILING_DE.* --.*: 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 + if {[is_elf_format]} then { +diff -rupN --no-dereference binutils-2.39/gold/main.cc binutils-2.39-new/gold/main.cc +--- binutils-2.39/gold/main.cc 2022-07-08 11:46:48.000000000 +0200 ++++ binutils-2.39-new/gold/main.cc 2022-10-30 12:41:34.547023785 +0100 +@@ -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.39/gprofng/testsuite/lib/display-lib.exp binutils-2.39-new/gprofng/testsuite/lib/display-lib.exp +--- binutils-2.39/gprofng/testsuite/lib/display-lib.exp 2022-07-08 11:46:48.000000000 +0200 ++++ binutils-2.39-new/gprofng/testsuite/lib/display-lib.exp 2022-10-30 12:41:34.560023785 +0100 +@@ -96,9 +96,8 @@ proc run_display_test { dir cflags gprof + perror "comparison of results in $dir failed" + } else { + send_log "compilation of test program in $dir failed:\n$out\n" +- perror "compilation of test program in $dir failed" ++ unsupported "compilation of test program in $dir failed" + } +- fail $dir + return 0 + } + pass $dir +diff -rupN --no-dereference binutils-2.39/ld/testsuite/ld-aarch64/bti-plt-5.d binutils-2.39-new/ld/testsuite/ld-aarch64/bti-plt-5.d +--- binutils-2.39/ld/testsuite/ld-aarch64/bti-plt-5.d 2022-07-08 11:46:48.000000000 +0200 ++++ binutils-2.39-new/ld/testsuite/ld-aarch64/bti-plt-5.d 2022-10-30 12:41:34.563023785 +0100 +@@ -8,21 +8,4 @@ + [^:]*: *file format elf64-.*aarch64 + + Disassembly of section \.plt: +- +-[0-9a-f]+ <.*>: +-.*: d503245f bti c +-.*: a9bf7bf0 stp x16, x30, \[sp, #-16\]! +-.*: 90000090 adrp x16, 410000 <.*> +-.*: f9421611 ldr x17, \[x16, #1064\] +-.*: 9110a210 add x16, x16, #0x428 +-.*: d61f0220 br x17 +-.*: d503201f nop +-.*: d503201f nop +- +-[0-9a-f]+ <.*>: +-.*: d503245f bti c +-.*: 90000090 adrp x16, 410000 <.*> +-.*: f9421a11 ldr x17, \[x16, #1072\] +-.*: 9110c210 add x16, x16, #0x430 +-.*: d61f0220 br x17 +-.*: d503201f nop ++#... +diff -rupN --no-dereference binutils-2.39/ld/testsuite/ld-aarch64/erratum843419-far-full.d binutils-2.39-new/ld/testsuite/ld-aarch64/erratum843419-far-full.d +--- binutils-2.39/ld/testsuite/ld-aarch64/erratum843419-far-full.d 2022-07-08 11:46:48.000000000 +0200 ++++ binutils-2.39-new/ld/testsuite/ld-aarch64/erratum843419-far-full.d 2022-10-30 12:41:34.561023785 +0100 +@@ -8,7 +8,7 @@ Disassembly of section \.text: + + 0*400000 <_start>: + ... +- 400ffc: 90400000 adrp x0, 80400000 <__bss_end__\+0x7ffedff0> ++ 400ffc: 90400000 adrp x0, 80400000 <__bss_end__\+.*> + 401000: f9000042 str x2, \[x2\] + 401004: d2800002 mov x2, #0x0 // #0 + 401008: 14000004 b 401018 +diff -rupN --no-dereference binutils-2.39/ld/testsuite/ld-aarch64/farcall-bl-plt.d binutils-2.39-new/ld/testsuite/ld-aarch64/farcall-bl-plt.d +--- binutils-2.39/ld/testsuite/ld-aarch64/farcall-bl-plt.d 2022-07-08 11:46:48.000000000 +0200 ++++ binutils-2.39-new/ld/testsuite/ld-aarch64/farcall-bl-plt.d 2022-10-30 12:41:34.561023785 +0100 +@@ -10,7 +10,7 @@ Disassembly of section .plt: + + .* <.plt>: + .*: a9bf7bf0 stp x16, x30, \[sp, #-16\]! +-.*: .* adrp x16, .* <__foo_veneer\+.*> ++.*: .* adrp x16, .* <.*> + .*: .* ldr [wx]17, \[x16, #.*\] + .*: .* add [wx]16, [wx]16, #.* + .*: d61f0220 br x17 +@@ -19,7 +19,7 @@ Disassembly of section .plt: + .*: d503201f nop + + .* : +-.*: .* adrp x16, .* <__foo_veneer\+.*> ++.*: .* adrp x16, .* <.*> + .*: .* ldr [wx]17, \[x16, #.*\] + .*: .* add [wx]16, [wx]16, #.* + .*: d61f0220 br x17 +@@ -35,7 +35,7 @@ Disassembly of section .text: + .*: .* nop + + .* <__foo_veneer>: +-.*: .* adrp x16, 0 <.*> ++.*: .* adrp x16, .* <.*> + .*: .* add x16, x16, #.* + .*: d61f0200 br x16 + ... +diff -rupN --no-dereference binutils-2.39/ld/testsuite/ld-aarch64/farcall-b-plt.d binutils-2.39-new/ld/testsuite/ld-aarch64/farcall-b-plt.d +--- binutils-2.39/ld/testsuite/ld-aarch64/farcall-b-plt.d 2022-07-08 11:46:48.000000000 +0200 ++++ binutils-2.39-new/ld/testsuite/ld-aarch64/farcall-b-plt.d 2022-10-30 12:41:34.561023785 +0100 +@@ -10,7 +10,7 @@ Disassembly of section .plt: + + .* <.plt>: + .*: a9bf7bf0 stp x16, x30, \[sp, #-16\]! +-.*: .* adrp x16, .* <__foo_veneer\+.*> ++.*: .* adrp x16, .* <.*> + .*: .* ldr [wx]17, \[x16, #.*\] + .*: .* add [wx]16, [wx]16, #.* + .*: d61f0220 br x17 +@@ -19,7 +19,7 @@ Disassembly of section .plt: + .*: d503201f nop + + .* : +-.*: .* adrp x16, .* <__foo_veneer\+.*> ++.*: .* adrp x16, .* <.*> + .*: .* ldr [wx]17, \[x16, #.*\] + .*: .* add [wx]16, [wx]16, #.* + .*: d61f0220 br x17 +@@ -35,7 +35,7 @@ Disassembly of section .text: + .*: .* nop + + .* <__foo_veneer>: +-.*: .* adrp x16, 0 <.*> ++.*: .* adrp x16, .* <.*> + .*: .* add x16, x16, #.* + .*: d61f0200 br x16 + ... +diff -rupN --no-dereference binutils-2.39/ld/testsuite/ld-aarch64/ifunc-1.d binutils-2.39-new/ld/testsuite/ld-aarch64/ifunc-1.d +--- binutils-2.39/ld/testsuite/ld-aarch64/ifunc-1.d 2022-07-08 11:46:48.000000000 +0200 ++++ binutils-2.39-new/ld/testsuite/ld-aarch64/ifunc-1.d 2022-10-30 12:41:34.564023785 +0100 +@@ -2,8 +2,6 @@ + #ld: -shared --hash-style=sysv + #objdump: -dw + +-#... +-0+(130|1a0|1c8) : +-#... +-[ \t0-9a-f]+:[ \t0-9a-f]+bl[ \t0-9a-f]+<\*ABS\*\+0x(130|1a0|1c8)@plt> ++.*: file format elf.+aarch64.* #pass ---- binutils.orig/ld/testsuite/ld-aarch64/variant_pcs-now.d 2021-07-19 12:39:14.240555833 +0100 -+++ binutils-2.37/ld/testsuite/ld-aarch64/variant_pcs-now.d 2021-07-19 12:50:27.753751551 +0100 ++ +diff -rupN --no-dereference binutils-2.39/ld/testsuite/ld-aarch64/ifunc-1-local.d binutils-2.39-new/ld/testsuite/ld-aarch64/ifunc-1-local.d +--- binutils-2.39/ld/testsuite/ld-aarch64/ifunc-1-local.d 2022-07-08 11:46:48.000000000 +0200 ++++ binutils-2.39-new/ld/testsuite/ld-aarch64/ifunc-1-local.d 2022-10-30 12:41:34.564023785 +0100 +@@ -2,8 +2,6 @@ + #ld: -shared --hash-style=sysv + #objdump: -dw + +-#... +-0+(110|180|1a0) <(__GI_)?foo>: +-#... +-[ \t0-9a-f]+:[ \t0-9a-f]+bl[ \t0-9a-f]+<\*ABS\*\+(0x110|0x180|0x1a0)@plt> ++.*: file format elf.+aarch64.* + #pass ++ +diff -rupN --no-dereference binutils-2.39/ld/testsuite/ld-aarch64/ifunc-21.d binutils-2.39-new/ld/testsuite/ld-aarch64/ifunc-21.d +--- binutils-2.39/ld/testsuite/ld-aarch64/ifunc-21.d 2022-07-08 11:46:48.000000000 +0200 ++++ binutils-2.39-new/ld/testsuite/ld-aarch64/ifunc-21.d 2022-10-30 12:41:34.562023785 +0100 +@@ -11,16 +11,4 @@ Contents of section .text: + [0-9a-f]+ .* + Contents of section .got.plt: + [0-9a-f]+ 0+ 0+ 0+ 0+ .* +- (10298|102b8) 0+ 0+ [0-9a-f]+ [0-9a-f]+ .* +- +-Disassembly of section .text: +- +-.* : +- .*: d65f03c0 ret +- +-.* : +- .*: 90000080 adrp x0, 10000 <.*> +- .*: .* ldr x0, \[x0, #(672|704)\] +- .*: d65f03c0 ret +- + #pass +diff -rupN --no-dereference binutils-2.39/ld/testsuite/ld-aarch64/ifunc-22.d binutils-2.39-new/ld/testsuite/ld-aarch64/ifunc-22.d +--- binutils-2.39/ld/testsuite/ld-aarch64/ifunc-22.d 2022-07-08 11:46:48.000000000 +0200 ++++ binutils-2.39-new/ld/testsuite/ld-aarch64/ifunc-22.d 2022-10-30 12:41:34.562023785 +0100 +@@ -6,6 +6,4 @@ + # Ensure GOT is populated correctly in static link + + .*: file format elf64-(little|big)aarch64 +- +-Contents of section \.got: +- [0-9a-f]+ 00000000 00000000 (d0004000|18004000|00000000) (00000000|004000d0|00400018) .* ++#pass +diff -rupN --no-dereference binutils-2.39/ld/testsuite/ld-aarch64/ifunc-2.d binutils-2.39-new/ld/testsuite/ld-aarch64/ifunc-2.d +--- binutils-2.39/ld/testsuite/ld-aarch64/ifunc-2.d 2022-07-08 11:46:48.000000000 +0200 ++++ binutils-2.39-new/ld/testsuite/ld-aarch64/ifunc-2.d 2022-10-30 12:41:34.564023785 +0100 +@@ -3,9 +3,3 @@ + #objdump: -dw + + #... +-0+(130|1a0|1c8) : +-#... +-[ \t0-9a-f]+:[ \t0-9a-f]+bl[ \t0-9a-f]+<\*ABS\*\+0x(130|1a0|1c8)@plt> +-[ \t0-9a-f]+:[ \t0-9a-f]+adrp[ \t]+x0, 0 <.*> +-[ \t0-9a-f]+:[ \t0-9a-f]+add[ \t]+x0, x0, #0x(120|190|1b8) +-#pass +diff -rupN --no-dereference binutils-2.39/ld/testsuite/ld-aarch64/ifunc-2-local.d binutils-2.39-new/ld/testsuite/ld-aarch64/ifunc-2-local.d +--- binutils-2.39/ld/testsuite/ld-aarch64/ifunc-2-local.d 2022-07-08 11:46:48.000000000 +0200 ++++ binutils-2.39-new/ld/testsuite/ld-aarch64/ifunc-2-local.d 2022-10-30 12:41:34.563023785 +0100 +@@ -3,9 +3,3 @@ + #objdump: -dw + + #... +-0+(110|180|1a0) <__GI_foo>: +-#... +-[ \t0-9a-f]+:[ \t0-9a-f]+bl[ \t0-9a-f]+<\*ABS\*\+0x(110|180|1a0)@plt> +-[ \t0-9a-f]+:[ \t0-9a-f]+adrp[ \t]+x0, 0 <.*> +-[ \t0-9a-f]+:[ \t0-9a-f]+add[ \t]+x0, x0, #0x(100|170|190) +-#pass +diff -rupN --no-dereference binutils-2.39/ld/testsuite/ld-aarch64/ifunc-3a.d binutils-2.39-new/ld/testsuite/ld-aarch64/ifunc-3a.d +--- binutils-2.39/ld/testsuite/ld-aarch64/ifunc-3a.d 2022-07-08 11:46:48.000000000 +0200 ++++ binutils-2.39-new/ld/testsuite/ld-aarch64/ifunc-3a.d 2022-10-30 12:41:34.564023785 +0100 +@@ -4,7 +4,3 @@ + #objdump: -dw + + #... +-0+(150|1d0|1e8) <__GI_foo>: +-#... +-[ \t0-9a-f]+:[ \t0-9a-f]+bl[ \t0-9a-f]+<\*ABS\*\+0x(150|1d0|1e8)@plt> +-#pass +diff -rupN --no-dereference binutils-2.39/ld/testsuite/ld-aarch64/ifunc-7c.d binutils-2.39-new/ld/testsuite/ld-aarch64/ifunc-7c.d +--- binutils-2.39/ld/testsuite/ld-aarch64/ifunc-7c.d 2022-07-08 11:46:48.000000000 +0200 ++++ binutils-2.39-new/ld/testsuite/ld-aarch64/ifunc-7c.d 2022-10-30 12:41:34.564023785 +0100 +@@ -6,14 +6,4 @@ + # Check if adrp and ldr have been relocated correctly. + + .*: file format elf.+aarch64.* +- +- +-Disassembly of section \.text: +- +-[0-9a-f]+ : +- [0-9a-f]+: d65f03c0 ret +- +-[0-9a-f]+ <__start>: +- [0-9a-f]+: [0-9a-f]+ bl [0-9a-f]+ <\*ABS\*\+0x[0-9a-f]+@plt> +- [0-9a-f]+: [0-9a-f]+ adrp x0, [0-9]+ <__start\+0x[0-9a-f]+> +- [0-9a-f]+: [0-9a-f]+ ldr x0, \[x0, .+\] ++#... +diff -rupN --no-dereference binutils-2.39/ld/testsuite/ld-aarch64/tls-relax-gdesc-le-now.d binutils-2.39-new/ld/testsuite/ld-aarch64/tls-relax-gdesc-le-now.d +--- binutils-2.39/ld/testsuite/ld-aarch64/tls-relax-gdesc-le-now.d 2022-07-08 11:46:48.000000000 +0200 ++++ binutils-2.39-new/ld/testsuite/ld-aarch64/tls-relax-gdesc-le-now.d 2022-10-30 12:41:34.547023785 +0100 +@@ -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.39/ld/testsuite/ld-aarch64/variant_pcs-now.d binutils-2.39-new/ld/testsuite/ld-aarch64/variant_pcs-now.d +--- binutils-2.39/ld/testsuite/ld-aarch64/variant_pcs-now.d 2022-07-08 11:46:48.000000000 +0200 ++++ binutils-2.39-new/ld/testsuite/ld-aarch64/variant_pcs-now.d 2022-10-30 12:41:34.546023785 +0100 @@ -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 @@ -212,8 +328,9 @@ diff -rup binutils.orig/ld/testsuite/ld-x86-64/x86-64.exp binutils-2.36.1/ld/tes - 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 ---- binutils.orig/ld/testsuite/ld-aarch64/variant_pcs-r.d 2021-07-19 12:39:14.235555861 +0100 -+++ binutils-2.37/ld/testsuite/ld-aarch64/variant_pcs-r.d 2021-07-19 12:51:04.981541273 +0100 +diff -rupN --no-dereference binutils-2.39/ld/testsuite/ld-aarch64/variant_pcs-r.d binutils-2.39-new/ld/testsuite/ld-aarch64/variant_pcs-r.d +--- binutils-2.39/ld/testsuite/ld-aarch64/variant_pcs-r.d 2022-07-08 11:46:48.000000000 +0200 ++++ binutils-2.39-new/ld/testsuite/ld-aarch64/variant_pcs-r.d 2022-10-30 12:41:34.546023785 +0100 @@ -37,24 +37,24 @@ Symbol table '\.symtab' contains 26 entr 2: 0000000000000000 0 SECTION LOCAL DEFAULT 3.* 3: 0000000000000000 0 SECTION LOCAL DEFAULT 4.* @@ -248,8 +365,9 @@ diff -rup binutils.orig/ld/testsuite/ld-x86-64/x86-64.exp binutils-2.36.1/ld/tes - 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 ---- binutils.orig/ld/testsuite/ld-aarch64/variant_pcs-shared.d 2021-07-19 12:39:14.235555861 +0100 -+++ binutils-2.37/ld/testsuite/ld-aarch64/variant_pcs-shared.d 2021-07-19 12:51:38.076354339 +0100 +diff -rupN --no-dereference binutils-2.39/ld/testsuite/ld-aarch64/variant_pcs-shared.d binutils-2.39-new/ld/testsuite/ld-aarch64/variant_pcs-shared.d +--- binutils-2.39/ld/testsuite/ld-aarch64/variant_pcs-shared.d 2022-07-08 11:46:48.000000000 +0200 ++++ binutils-2.39-new/ld/testsuite/ld-aarch64/variant_pcs-shared.d 2022-10-30 12:41:34.547023785 +0100 @@ -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 @@ -302,69 +420,32 @@ diff -rup binutils.orig/ld/testsuite/ld-x86-64/x86-64.exp binutils-2.36.1/ld/tes - 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 ---- binutils.orig/gold/main.cc 2021-07-19 12:39:14.643553557 +0100 -+++ binutils-2.37/gold/main.cc 2021-07-19 12:53:40.043665415 +0100 -@@ -290,16 +290,6 @@ main(int argc, char** argv) - elapsed.sys / 1000, (elapsed.sys % 1000) * 1000, - elapsed.wall / 1000, (elapsed.wall % 1000) * 1000); +diff -rupN --no-dereference binutils-2.39/ld/testsuite/ld-elf/binutils.exp binutils-2.39-new/ld/testsuite/ld-elf/binutils.exp +--- binutils-2.39/ld/testsuite/ld-elf/binutils.exp 2022-07-08 11:46:48.000000000 +0200 ++++ binutils-2.39-new/ld/testsuite/ld-elf/binutils.exp 2022-10-30 12:41:34.555023785 +0100 +@@ -174,7 +174,7 @@ binutils_test strip "-T ${srcdir}/${subd --#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(); ---- binutils.orig/ld/testsuite/ld-aarch64/tls-relax-gdesc-le-now.d 2021-07-19 14:51:48.859666911 +0100 -+++ binutils-2.37/ld/testsuite/ld-aarch64/tls-relax-gdesc-le-now.d 2021-07-19 14:59:56.130065901 +0100 -@@ -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 - ---- binutils.orig/ld/testsuite/ld-plugin/plugin.exp 2021-07-19 14:51:48.905666659 +0100 -+++ binutils-2.37/ld/testsuite/ld-plugin/plugin.exp 2021-07-19 15:06:56.159875135 +0100 -@@ -119,7 +119,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 _ "" + set tls_tests { "tdata1" "tdata2" } + # hppa64 has its own .tbss section, with different flags. +-if { ![istarget "hppa64-*-*"] } { ++if { ![istarget "hppa64-*-*"] && ![istarget "powerpc*-*-linux*"] } { + lappend tls_tests "tdata3" "tbss1" "tbss2" "tbss3" } - ---- binutils.orig/ld/testsuite/ld-elf/compress.exp 2021-07-19 14:51:48.982666235 +0100 -+++ binutils-2.37/ld/testsuite/ld-elf/compress.exp 2021-07-19 15:16:14.268931663 +0100 -@@ -168,7 +168,7 @@ 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"] -+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" ---- binutils.orig/ld/testsuite/ld-elf/compress.exp 2021-07-20 09:55:20.387674258 +0100 -+++ binutils-2.37/ld/testsuite/ld-elf/compress.exp 2021-07-20 09:59:51.118189655 +0100 -@@ -167,7 +167,7 @@ if { [regexp_diff tmpdir/$test.out $srcd + set tls_opts { +diff -rupN --no-dereference binutils-2.39/ld/testsuite/ld-elf/compress.exp binutils-2.39-new/ld/testsuite/ld-elf/compress.exp +--- binutils-2.39/ld/testsuite/ld-elf/compress.exp 2022-07-08 11:46:48.000000000 +0200 ++++ binutils-2.39-new/ld/testsuite/ld-elf/compress.exp 2022-10-30 12:41:34.548023785 +0100 +@@ -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"] ++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" @@ -398,217 +479,31 @@ diff -rup binutils.orig/ld/testsuite/ld-x86-64/x86-64.exp binutils-2.36.1/ld/tes if { [lindex $got 0] != 0 || ![string match "" [lindex $got 1]] } then { send_log "$got\n" fail "$test_name" ---- binutils.orig/ld/testsuite/ld-elf/shared.exp 2021-07-20 09:55:20.398674198 +0100 -+++ binutils-2.37/ld/testsuite/ld-elf/shared.exp 2021-07-20 10:04:13.180751421 +0100 -@@ -1629,6 +1629,7 @@ if [istarget "sparc*-*-*"] { - if { ([istarget "*-*-linux*"] - || [istarget "*-*-nacl*"] - || [istarget "*-*-gnu*"]) -+ && ![istarget "aarch64*-*-*"] && ![istarget "arm*-*-*"] - && ![istarget "mips*-*-*"] } { - run_ld_link_tests [list \ - [list \ ---- binutils.orig/ld/testsuite/ld-gc/pr13683.d 2021-07-20 09:55:20.295674760 +0100 -+++ binutils-2.37/ld/testsuite/ld-gc/pr13683.d 2021-07-20 10:10:30.650663650 +0100 -@@ -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*-*-* +diff -rupN --no-dereference binutils-2.39/ld/testsuite/ld-elf/linux-x86.exp binutils-2.39-new/ld/testsuite/ld-elf/linux-x86.exp +--- binutils-2.39/ld/testsuite/ld-elf/linux-x86.exp 2022-07-25 09:04:15.000000000 +0200 ++++ binutils-2.39-new/ld/testsuite/ld-elf/linux-x86.exp 2022-10-30 12:41:34.557023785 +0100 +@@ -73,6 +73,10 @@ run_ld_link_tests [list \ + ] \ + ] - # Note - look for both "foo" and "foo2" being defined, non-zero function symbols - ---- binutils.orig/ld/testsuite/ld-gc/pr19161.d 2021-07-20 09:55:20.295674760 +0100 -+++ binutils-2.37/ld/testsuite/ld-gc/pr19161.d 2021-07-20 10:12:36.585966659 +0100 -@@ -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*-*-* - - #... ---- binutils.orig/ld/testsuite/ld-i386/i386.exp 2021-07-20 13:28:42.211613869 +0100 -+++ binutils-2.37/ld/testsuite/ld-i386/i386.exp 2021-07-20 13:40:00.116839084 +0100 -@@ -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,6 +1108,7 @@ if { [isnative] - ] \ - ] - -+ setup_xfail i686*-*-* - undefined_weak "$NOPIE_CFLAGS" "$NOPIE_LDFLAGS" - undefined_weak "-fPIE" "$NOPIE_LDFLAGS" - undefined_weak "-fPIE" "-pie" ---- binutils.orig/ld/testsuite/ld-i386/plt-main.rd 2021-07-20 13:28:42.214613852 +0100 -+++ binutils-2.37/ld/testsuite/ld-i386/plt-main.rd 2021-07-20 13:39:25.781030283 +0100 -@@ -1,4 +1,1 @@ --#failif --#... --[0-9a-f ]+R_386_JUMP_SLOT +0+ +bar - #... ---- binutils.orig/ld/testsuite/ld-scripts/crossref.exp 2021-07-20 13:28:42.114614409 +0100 -+++ binutils-2.37/ld/testsuite/ld-scripts/crossref.exp 2021-07-20 13:45:27.476015992 +0100 -@@ -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 { [istarget "i?86-*-*"] } { ++ return ++} + - 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 { ---- binutils.orig/ld/testsuite/ld-shared/shared.exp 2021-07-20 13:28:42.168614108 +0100 -+++ binutils-2.37/ld/testsuite/ld-shared/shared.exp 2021-07-20 13:46:57.073516995 +0100 -@@ -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*] \ ---- binutils.orig/ld/testsuite/ld-i386/i386.exp 2021-07-20 15:22:27.898561717 +0100 -+++ binutils-2.37/ld/testsuite/ld-i386/i386.exp 2021-07-20 15:24:39.121829544 +0100 -@@ -1108,8 +1108,9 @@ if { [isnative] - ] \ - ] - -- setup_xfail i686*-*-* -- 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" -@@ -1173,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" \ ---- binutils.orig/ld/testsuite/ld-ifunc/ifunc.exp 2021-07-20 15:22:27.806562231 +0100 -+++ binutils-2.37/ld/testsuite/ld-ifunc/ifunc.exp 2021-07-20 15:28:03.248690669 +0100 -@@ -39,6 +39,7 @@ if { ![is_elf_format] || ![supports_gnu_ - || [istarget nds32*-*-*] - || [istarget nios2-*-*] - || [istarget or1k-*-*] -+ || [istarget ppc*-*-*] - || [istarget score*-*-*] - || [istarget sh*-*-*] - || [istarget tic6x-*-*] -diff -rup binutils.orig/ld/testsuite/ld-powerpc/group1.sym binutils-2.37/ld/testsuite/ld-powerpc/group1.sym ---- binutils.orig/ld/testsuite/ld-powerpc/group1.sym 2021-07-20 15:22:27.827562114 +0100 -+++ binutils-2.37/ld/testsuite/ld-powerpc/group1.sym 2021-07-20 15:39:57.916703418 +0100 -@@ -1,3 +1,2 @@ - #... --.* 8 FUNC +GLOBAL DEFAULT \[: 4\] +1 foo - #pass -diff -rup binutils.orig/ld/testsuite/ld-powerpc/group3.sym binutils-2.37/ld/testsuite/ld-powerpc/group3.sym ---- binutils.orig/ld/testsuite/ld-powerpc/group3.sym 2021-07-20 15:22:27.825562125 +0100 -+++ binutils-2.37/ld/testsuite/ld-powerpc/group3.sym 2021-07-20 15:40:13.388617110 +0100 -@@ -1,3 +1,2 @@ - #... --.* 4 FUNC +GLOBAL DEFAULT \[: 1\] +1 foo - #pass -diff -rup binutils.orig/ld/testsuite/ld-powerpc/notoc3.d binutils-2.37/ld/testsuite/ld-powerpc/notoc3.d ---- binutils.orig/ld/testsuite/ld-powerpc/notoc3.d 2021-07-20 15:22:27.824562131 +0100 -+++ binutils-2.37/ld/testsuite/ld-powerpc/notoc3.d 2021-07-20 15:39:16.508934455 +0100 -@@ -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 ---- binutils.orig/ld/testsuite/ld-ifunc/ifunc.exp 2021-07-20 16:24:17.370869076 +0100 -+++ binutils-2.37/ld/testsuite/ld-ifunc/ifunc.exp 2021-07-20 16:24:31.069792658 +0100 -@@ -39,6 +39,7 @@ if { ![is_elf_format] || ![supports_gnu_ - || [istarget nds32*-*-*] - || [istarget nios2-*-*] - || [istarget or1k-*-*] -+ || [istarget powerpc*-*-*] - || [istarget ppc*-*-*] - || [istarget score*-*-*] - || [istarget sh*-*-*] ---- binutils.orig/ld/testsuite/ld-powerpc/group1.sym 2021-07-20 16:24:17.384868997 +0100 -+++ binutils-2.37/ld/testsuite/ld-powerpc/group1.sym 2021-07-20 16:27:36.604757678 +0100 -@@ -1,2 +1 @@ --#... - #pass ---- binutils.orig/ld/testsuite/ld-powerpc/group3.sym 2021-07-20 16:24:17.389868970 +0100 -+++ binutils-2.37/ld/testsuite/ld-powerpc/group3.sym 2021-07-20 16:28:33.372441000 +0100 -@@ -1,2 +1,1 @@ --#... - #pass ---- binutils.orig/ld/testsuite/ld-elf/pr26580-3.out 2021-07-20 17:07:36.952369125 +0100 -+++ binutils-2.37/ld/testsuite/ld-elf/pr26580-3.out 2021-07-20 17:13:39.069350355 +0100 + run_cc_link_tests [list \ + [list \ + "Build indirect-extern-access-1.so" \ +diff -rupN --no-dereference binutils-2.39/ld/testsuite/ld-elf/pr26580-3.out binutils-2.39-new/ld/testsuite/ld-elf/pr26580-3.out +--- binutils-2.39/ld/testsuite/ld-elf/pr26580-3.out 2022-07-08 11:46:48.000000000 +0200 ++++ binutils-2.39-new/ld/testsuite/ld-elf/pr26580-3.out 2022-10-30 12:41:34.554023785 +0100 @@ -1,2 +1,2 @@ library not loaded -alignment 1 +alignment . ---- binutils.orig/ld/testsuite/ld-elf/shared.exp 2021-07-20 17:07:36.950369136 +0100 -+++ binutils-2.37/ld/testsuite/ld-elf/shared.exp 2021-07-20 17:16:04.267540887 +0100 -@@ -1536,18 +1536,6 @@ if { [istarget *-*-linux*] +diff -rupN --no-dereference binutils-2.39/ld/testsuite/ld-elf/shared.exp binutils-2.39-new/ld/testsuite/ld-elf/shared.exp +--- binutils-2.39/ld/testsuite/ld-elf/shared.exp 2022-07-08 11:46:48.000000000 +0200 ++++ binutils-2.39-new/ld/testsuite/ld-elf/shared.exp 2022-10-30 12:41:34.554023785 +0100 +@@ -1576,18 +1576,6 @@ if { [istarget *-*-linux*] "pr22393-2-static" \ "pass.out" \ ] \ @@ -627,8 +522,17 @@ diff -rup binutils.orig/ld/testsuite/ld-powerpc/notoc3.d binutils-2.37/ld/testsu ] } ---- binutils.orig/ld/testsuite/ld-elf/tls.exp 2021-07-20 17:07:36.953369120 +0100 -+++ binutils-2.37/ld/testsuite/ld-elf/tls.exp 2021-07-20 17:20:40.443001211 +0100 +@@ -1669,6 +1657,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.39/ld/testsuite/ld-elf/tls.exp binutils-2.39-new/ld/testsuite/ld-elf/tls.exp +--- binutils-2.39/ld/testsuite/ld-elf/tls.exp 2022-07-08 11:46:48.000000000 +0200 ++++ binutils-2.39-new/ld/testsuite/ld-elf/tls.exp 2022-10-30 12:41:34.554023785 +0100 @@ -32,6 +32,9 @@ if { !([istarget *-*-linux*] if { ![check_compiler_available] } { return @@ -639,24 +543,115 @@ diff -rup binutils.orig/ld/testsuite/ld-powerpc/notoc3.d binutils-2.37/ld/testsu # This target requires extra GAS options when building PIC/PIE code. set AFLAGS_PIC "" ---- binutils.orig/binutils/testsuite/binutils-all/compress.exp 2021-08-18 12:41:47.036991908 +0100 -+++ binutils-2.37/binutils/testsuite/binutils-all/compress.exp 2021-08-18 12:47:46.097987950 +0100 -@@ -766,12 +766,6 @@ proc test_gnu_debuglink {} { - } else { - pass "$test (objdump with missing link)" - } -- set got [remote_exec host [concat sh -c [list "$READELF -S tmpdir/testprog > /dev/null"]]] -- if { [lindex $got 0] != 0 || ![string match "" [lindex $got 1]] } then { -- fail "$test (readelf with missing link)" -- } else { -- pass "$test (readelf with missing link)" -- } - } +diff -rupN --no-dereference binutils-2.39/ld/testsuite/ld-gc/pr13683.d binutils-2.39-new/ld/testsuite/ld-gc/pr13683.d +--- binutils-2.39/ld/testsuite/ld-gc/pr13683.d 2022-07-08 11:46:48.000000000 +0200 ++++ binutils-2.39-new/ld/testsuite/ld-gc/pr13683.d 2022-10-30 12:41:34.557023785 +0100 +@@ -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-*-* arm*-*-* - if {[is_elf_format]} then { -diff -rup binutils.orig/ld/testsuite/ld-plugin/lto.exp binutils-2.38/ld/testsuite/ld-plugin/lto.exp ---- binutils.orig/ld/testsuite/ld-plugin/lto.exp 2022-04-04 10:38:14.068433736 +0100 -+++ binutils-2.38/ld/testsuite/ld-plugin/lto.exp 2022-04-04 10:46:07.879920580 +0100 + # Note - look for both "foo" and "foo2" being defined, non-zero function symbols + +diff -rupN --no-dereference binutils-2.39/ld/testsuite/ld-gc/pr19161.d binutils-2.39-new/ld/testsuite/ld-gc/pr19161.d +--- binutils-2.39/ld/testsuite/ld-gc/pr19161.d 2022-07-08 11:46:48.000000000 +0200 ++++ binutils-2.39-new/ld/testsuite/ld-gc/pr19161.d 2022-10-30 12:41:34.557023785 +0100 +@@ -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-*-* arm*-*-* + #xfail: mips64vr-*-* msp430-*-* powerpc*-*-eabivle rl78-*-* rx-*-* sh*-*-* + + #... +diff -rupN --no-dereference binutils-2.39/ld/testsuite/ld-i386/i386.exp binutils-2.39-new/ld/testsuite/ld-i386/i386.exp +--- binutils-2.39/ld/testsuite/ld-i386/i386.exp 2022-07-26 09:13:10.000000000 +0200 ++++ binutils-2.39-new/ld/testsuite/ld-i386/i386.exp 2022-10-30 12:41:34.560023785 +0100 +@@ -1077,15 +1077,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" \ +@@ -1137,7 +1128,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" +@@ -1201,7 +1194,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" \ +@@ -1299,22 +1292,6 @@ if { [isnative] + {} \ + "pr28875.so" \ + ] \ +- [list \ +- "Build pr28875" \ +- "$NOPIE_LDFLAGS -Wl,--no-as-needed tmpdir/pr28875.so" \ +- "$NOPIE_CFLAGS" \ +- { pr28875b.c } \ +- {{error_output "pr28875.err"}} \ +- "pr28875" \ +- ] \ +- [list \ +- "Build pr21997-1" \ +- "$NOPIE_LDFLAGS -Wl,--no-as-needed,-z,notext tmpdir/pr21997-1.so" \ +- "$NOPIE_CFLAGS -Wa,-mx86-used-note=yes" \ +- { pr21997-1b.c } \ +- {{error_output "pr21997-1.err"}} \ +- "pr21997-1" \ +- ] \ + ] + + run_ld_link_exec_tests [list \ +diff -rupN --no-dereference binutils-2.39/ld/testsuite/ld-i386/plt-main.rd binutils-2.39-new/ld/testsuite/ld-i386/plt-main.rd +--- binutils-2.39/ld/testsuite/ld-i386/plt-main.rd 2022-07-08 11:46:48.000000000 +0200 ++++ binutils-2.39-new/ld/testsuite/ld-i386/plt-main.rd 2022-10-30 12:41:34.550023785 +0100 +@@ -1,4 +1 @@ +-#failif +-#... +-[0-9a-f ]+R_386_JUMP_SLOT +0+ +bar + #... +diff -rupN --no-dereference binutils-2.39/ld/testsuite/ld-ifunc/ifunc.exp binutils-2.39-new/ld/testsuite/ld-ifunc/ifunc.exp +--- binutils-2.39/ld/testsuite/ld-ifunc/ifunc.exp 2022-07-08 11:46:48.000000000 +0200 ++++ binutils-2.39-new/ld/testsuite/ld-ifunc/ifunc.exp 2022-10-30 12:41:34.553023785 +0100 +@@ -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-*-*] +diff -rupN --no-dereference binutils-2.39/ld/testsuite/ld-plugin/lto.exp binutils-2.39-new/ld/testsuite/ld-plugin/lto.exp +--- binutils-2.39/ld/testsuite/ld-plugin/lto.exp 2022-07-08 11:46:48.000000000 +0200 ++++ binutils-2.39-new/ld/testsuite/ld-plugin/lto.exp 2022-10-30 12:41:34.558023785 +0100 @@ -31,8 +31,8 @@ if { ![check_plugin_api_available] set saved_CFLAGS "$CFLAGS_FOR_TARGET" @@ -668,134 +663,6 @@ diff -rup binutils.orig/ld/testsuite/ld-plugin/lto.exp binutils-2.38/ld/testsuit proc restore_notify { } { global saved_CFLAGS -diff -rup binutils.orig/ld/testsuite/ld-x86-64/pr22001-1b.err binutils-2.38/ld/testsuite/ld-x86-64/pr22001-1b.err ---- binutils.orig/ld/testsuite/ld-x86-64/pr22001-1b.err 2022-04-04 10:38:14.144433207 +0100 -+++ binutils-2.38/ld/testsuite/ld-x86-64/pr22001-1b.err 2022-04-04 10:46:07.879920580 +0100 -@@ -1,2 +1,2 @@ --.*relocation R_X86_64_32S against symbol `copy' can not be used when making a P(D|I)E object; recompile with -fPIE -+.*relocation R_X86_64_(PC32|32S) against symbol `copy' can not be used when making a P(D|I)E object; recompile with -fPIE - #... -diff -rup binutils.orig/ld/testsuite/ld-elf/binutils.exp binutils-2.38/ld/testsuite/ld-elf/binutils.exp ---- binutils.orig/ld/testsuite/ld-elf/binutils.exp 2022-04-04 13:59:22.313980358 +0100 -+++ binutils-2.38/ld/testsuite/ld-elf/binutils.exp 2022-04-04 14:34:59.517719791 +0100 -@@ -174,7 +174,7 @@ binutils_test strip "-T ${srcdir}/${subd - - set tls_tests { "tdata1" "tdata2" } - # hppa64 has its own .tbss section, with different flags. --if { ![istarget "hppa64-*-*"] } { -+if { ![istarget "hppa64-*-*"] && ![istarget "powerpc*-*-linux*"] } { - lappend tls_tests "tdata3" "tbss1" "tbss2" "tbss3" - } - set tls_opts { -diff -rup binutils.orig/ld/testsuite/ld-plugin/plugin.exp binutils-2.38/ld/testsuite/ld-plugin/plugin.exp ---- binutils.orig/ld/testsuite/ld-plugin/plugin.exp 2022-04-04 13:59:22.221980983 +0100 -+++ binutils-2.38/ld/testsuite/ld-plugin/plugin.exp 2022-04-04 14:38:58.364071955 +0100 -@@ -258,6 +258,10 @@ set plugin_lib_tests [list \ - $testobjfiles tmpdir/libempty.a $libs" "" "" "" {{ld plugin-30.d}} "main.x" ] \ - ] - -+if { [istarget "powerpc*-*-linux*"] } { -+ return -+} -+ - set plugin_extra_elf_tests [list \ - [list "plugin set symbol visibility" "-plugin $plugin_path $regclm \ - $regas $regcln -plugin-opt claim:tmpdir/func.o \ -diff -rup binutils.orig/ld/testsuite/ld-powerpc/powerpc.exp binutils-2.38/ld/testsuite/ld-powerpc/powerpc.exp ---- binutils.orig/ld/testsuite/ld-powerpc/powerpc.exp 2022-04-04 13:59:22.231980915 +0100 -+++ binutils-2.38/ld/testsuite/ld-powerpc/powerpc.exp 2022-04-04 14:41:26.284062500 +0100 -@@ -89,6 +89,10 @@ proc supports_ppc64 { } { - } - } - -+if { [istarget "powerpc*-*-linux*"] } { -+ return -+} -+ - # List contains test-items with 3 items followed by 2 lists: - # 0:name 1:ld early options 2:ld late options 3:assembler options - # 4:filenames of assembler files 5: action and options. 6: name of output file -diff -rup binutils.orig/ld/testsuite/ld-s390/s390.exp binutils-2.38/ld/testsuite/ld-s390/s390.exp ---- binutils.orig/ld/testsuite/ld-s390/s390.exp 2022-04-04 15:44:24.998233218 +0100 -+++ binutils-2.38/ld/testsuite/ld-s390/s390.exp 2022-04-04 15:45:53.073628315 +0100 -@@ -26,6 +26,8 @@ if { !([istarget "s390-*-*"] || [istarge - return - } - -+return -+ - # List contains test-items with 3 items followed by 2 lists: - # 0:name 1:ld early options 2:ld late options 3:assembler options - # 4:filenames of assembler files 5: action and options. 6: name of output file -diff -rup binutils.orig/ld/testsuite/ld-elf/linux-x86.exp binutils-2.38/ld/testsuite/ld-elf/linux-x86.exp ---- binutils.orig/ld/testsuite/ld-elf/linux-x86.exp 2022-04-05 09:52:24.952024715 +0100 -+++ binutils-2.38/ld/testsuite/ld-elf/linux-x86.exp 2022-04-05 09:56:58.449705429 +0100 -@@ -73,6 +73,10 @@ run_ld_link_tests [list \ - ] \ - ] - -+if { [istarget "i?86-*-*"] } { -+ return -+} -+ - run_cc_link_tests [list \ - [list \ - "Build indirect-extern-access-1.so" \ -diff -rup binutils.orig/ld/testsuite/ld-gc/pr13683.d binutils-2.38/ld/testsuite/ld-gc/pr13683.d ---- binutils.orig/ld/testsuite/ld-gc/pr13683.d 2022-04-05 09:52:24.827025355 +0100 -+++ binutils-2.38/ld/testsuite/ld-gc/pr13683.d 2022-04-05 10:14:02.876611522 +0100 -@@ -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-*-* aarch64*-*-* arm*-*-* -+#xfail: iq2000-*-* lm32-*-* epiphany-*-* mips64vr-*-* frv-*-* m32c-*-* rl78-*-* rx-*-* sh-*-* powerpc*-*-eabivle msp430-*-* arm*-*-* - - # Note - look for both "foo" and "foo2" being defined, non-zero function symbols - -diff -rup binutils.orig/ld/testsuite/ld-gc/pr19161.d binutils-2.38/ld/testsuite/ld-gc/pr19161.d ---- binutils.orig/ld/testsuite/ld-gc/pr19161.d 2022-04-05 09:52:24.827025355 +0100 -+++ binutils-2.38/ld/testsuite/ld-gc/pr19161.d 2022-04-05 10:14:10.636579174 +0100 -@@ -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-*-* aarch64*-*-* arm*-*-* -+#xfail: epiphany-*-* frv-*-* iq2000-*-* lm32-*-* m32c-*-* arm*-*-* - #xfail: mips64vr-*-* msp430-*-* powerpc*-*-eabivle rl78-*-* rx-*-* sh*-*-* - - #... -diff -rup binutils.orig/ld/testsuite/ld-vsb/vsb.exp binutils-2.38/ld/testsuite/ld-vsb/vsb.exp ---- binutils.orig/ld/testsuite/ld-vsb/vsb.exp 2022-04-05 09:52:24.824025370 +0100 -+++ binutils-2.38/ld/testsuite/ld-vsb/vsb.exp 2022-04-05 09:59:04.657193470 +0100 -@@ -123,6 +123,10 @@ if { [istarget *-*-linux*] - } - } - -+if { [istarget "i?86-*-*"] } { -+ set support_protected "no" -+} -+ - # The test procedure. - proc visibility_test { visibility progname testname main sh1 sh2 dat args } { - global CC_FOR_TARGET -diff -rup binutils.orig/ld/testsuite/lib/ld-lib.exp binutils-2.38/ld/testsuite/lib/ld-lib.exp ---- binutils.orig/ld/testsuite/lib/ld-lib.exp 2022-04-05 09:52:24.822025380 +0100 -+++ binutils-2.38/ld/testsuite/lib/ld-lib.exp 2022-04-05 09:53:51.076584341 +0100 -@@ -1658,6 +1658,10 @@ proc skip_ctf_tests { } { - return 1 - } - -+ if { [istarget "i?86-*-*"] } { -+ return 1 -+ } -+ - if [check_ctf_available] { - return 0 - } -diff -rup binutils.orig/ld/testsuite/ld-plugin/lto.exp binutils-2.39/ld/testsuite/ld-plugin/lto.exp ---- binutils.orig/ld/testsuite/ld-plugin/lto.exp 2022-08-11 12:39:44.419478335 +0100 -+++ binutils-2.39/ld/testsuite/ld-plugin/lto.exp 2022-08-11 12:43:50.508080379 +0100 @@ -481,23 +481,6 @@ set lto_link_elf_tests [list \ "c++" \ ] \ @@ -820,8 +687,281 @@ diff -rup binutils.orig/ld/testsuite/ld-plugin/lto.exp binutils-2.39/ld/testsuit "Build libpr28849a.so" \ "-shared" \ "-fPIC" \ ---- binutils.orig/ld/testsuite/ld-x86-64/x86-64.exp 2022-08-11 12:39:44.491477934 +0100 -+++ binutils-2.39/ld/testsuite/ld-x86-64/x86-64.exp 2022-08-11 12:47:25.610857959 +0100 +diff -rupN --no-dereference binutils-2.39/ld/testsuite/ld-plugin/plugin-10.d binutils-2.39-new/ld/testsuite/ld-plugin/plugin-10.d +--- binutils-2.39/ld/testsuite/ld-plugin/plugin-10.d 2022-10-30 12:41:32.245023774 +0100 ++++ binutils-2.39-new/ld/testsuite/ld-plugin/plugin-10.d 2022-10-30 12:41:34.543023785 +0100 +@@ -32,7 +32,7 @@ hook called: claim_file tmpdir/func.o \[ + hook called: claim_file tmpdir/libtext.a \[@.* not claimed + #... + hook called: all symbols read. +-Sym: '_?func' Resolution: LDPR_PREVAILING_DEF_IRONLY ++Sym: '_?func' Resolution: LDPR_PREVAILING_DE.* + Sym: '_?func2' Resolution: LDPR_PREVAILING_DEF_IRONLY + #... + hook called: cleanup. +diff -rupN --no-dereference binutils-2.39/ld/testsuite/ld-plugin/plugin-11.d binutils-2.39-new/ld/testsuite/ld-plugin/plugin-11.d +--- binutils-2.39/ld/testsuite/ld-plugin/plugin-11.d 2022-10-30 12:41:32.245023774 +0100 ++++ binutils-2.39-new/ld/testsuite/ld-plugin/plugin-11.d 2022-10-30 12:41:34.543023785 +0100 +@@ -35,9 +35,9 @@ hook called: claim_file tmpdir/func.o \[ + hook called: claim_file tmpdir/libtext.a \[@.* CLAIMED + #... + hook called: all symbols read. +-Sym: '_?func' Resolution: LDPR_PREVAILING_DEF_IRONLY ++Sym: '_?func' Resolution: LDPR_PREVAILING_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.39/ld/testsuite/ld-plugin/plugin-12.d binutils-2.39-new/ld/testsuite/ld-plugin/plugin-12.d +--- binutils-2.39/ld/testsuite/ld-plugin/plugin-12.d 2022-07-08 11:46:48.000000000 +0200 ++++ binutils-2.39-new/ld/testsuite/ld-plugin/plugin-12.d 2022-10-30 12:41:34.546023785 +0100 +@@ -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.39/ld/testsuite/ld-plugin/plugin-16.d binutils-2.39-new/ld/testsuite/ld-plugin/plugin-16.d +--- binutils-2.39/ld/testsuite/ld-plugin/plugin-16.d 2022-10-30 12:41:32.246023774 +0100 ++++ binutils-2.39-new/ld/testsuite/ld-plugin/plugin-16.d 2022-10-30 12:41:34.543023785 +0100 +@@ -30,7 +30,7 @@ hook called: claim_file .*/ld/testsuite/ + hook called: claim_file tmpdir/text.o \[@0/.* not claimed + #... + hook called: all symbols read. +-Sym: '_?func' Resolution: LDPR_PREVAILING_DEF_IRONLY ++Sym: '_?func' Resolution: LDPR_PREVAILING_DE.* + Sym: '_?func2' Resolution: LDPR_PREVAILING_DEF_IRONLY + #... + hook called: cleanup. +diff -rupN --no-dereference binutils-2.39/ld/testsuite/ld-plugin/plugin-17.d binutils-2.39-new/ld/testsuite/ld-plugin/plugin-17.d +--- binutils-2.39/ld/testsuite/ld-plugin/plugin-17.d 2022-10-30 12:41:32.246023774 +0100 ++++ binutils-2.39-new/ld/testsuite/ld-plugin/plugin-17.d 2022-10-30 12:41:34.543023785 +0100 +@@ -31,7 +31,7 @@ hook called: claim_file .*/ld/testsuite/ + hook called: claim_file tmpdir/text.o \[@0/.* not claimed + #... + hook called: all symbols read. +-Sym: '_?func' Resolution: LDPR_PREVAILING_DEF_IRONLY ++Sym: '_?func' Resolution: LDPR_PREVAILING_DE.* + Sym: '_?func2' Resolution: LDPR_PREVAILING_DEF_IRONLY + #... + hook called: cleanup. +diff -rupN --no-dereference binutils-2.39/ld/testsuite/ld-plugin/plugin-18.d binutils-2.39-new/ld/testsuite/ld-plugin/plugin-18.d +--- binutils-2.39/ld/testsuite/ld-plugin/plugin-18.d 2022-10-30 12:41:32.246023774 +0100 ++++ binutils-2.39-new/ld/testsuite/ld-plugin/plugin-18.d 2022-10-30 12:41:34.544023785 +0100 +@@ -32,7 +32,7 @@ hook called: claim_file .*/ld/testsuite/ + hook called: claim_file tmpdir/libtext.a \[@.* not claimed + #... + hook called: all symbols read. +-Sym: '_?func' Resolution: LDPR_PREVAILING_DEF_IRONLY ++Sym: '_?func' Resolution: LDPR_PREVAILING_DE.* + Sym: '_?func2' Resolution: LDPR_PREVAILING_DEF_IRONLY + #... + hook called: cleanup. +diff -rupN --no-dereference binutils-2.39/ld/testsuite/ld-plugin/plugin-19.d binutils-2.39-new/ld/testsuite/ld-plugin/plugin-19.d +--- binutils-2.39/ld/testsuite/ld-plugin/plugin-19.d 2022-10-30 12:41:32.247023774 +0100 ++++ binutils-2.39-new/ld/testsuite/ld-plugin/plugin-19.d 2022-10-30 12:41:34.544023785 +0100 +@@ -35,9 +35,9 @@ hook called: claim_file .*/ld/testsuite/ + hook called: claim_file tmpdir/libtext.a \[@.* CLAIMED + #... + hook called: all symbols read. +-Sym: '_?func' Resolution: LDPR_PREVAILING_DEF_IRONLY ++Sym: '_?func' Resolution: LDPR_PREVAILING_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.39/ld/testsuite/ld-plugin/plugin-8.d binutils-2.39-new/ld/testsuite/ld-plugin/plugin-8.d +--- binutils-2.39/ld/testsuite/ld-plugin/plugin-8.d 2022-10-30 12:41:32.249023774 +0100 ++++ binutils-2.39-new/ld/testsuite/ld-plugin/plugin-8.d 2022-10-30 12:41:34.544023785 +0100 +@@ -30,7 +30,7 @@ hook called: claim_file tmpdir/func.o \[ + hook called: claim_file tmpdir/text.o \[@0/.* not claimed + #... + hook called: all symbols read. +-Sym: '_?func' Resolution: LDPR_PREVAILING_DEF_IRONLY ++Sym: '_?func' Resolution: LDPR_PREVAILING_DE.* + Sym: '_?func2' Resolution: LDPR_PREVAILING_DEF_IRONLY + #... + hook called: cleanup. +diff -rupN --no-dereference binutils-2.39/ld/testsuite/ld-plugin/plugin-9.d binutils-2.39-new/ld/testsuite/ld-plugin/plugin-9.d +--- binutils-2.39/ld/testsuite/ld-plugin/plugin-9.d 2022-10-30 12:41:32.250023774 +0100 ++++ binutils-2.39-new/ld/testsuite/ld-plugin/plugin-9.d 2022-10-30 12:41:34.544023785 +0100 +@@ -31,7 +31,7 @@ hook called: claim_file tmpdir/func.o \[ + hook called: claim_file tmpdir/text.o \[@0/.* not claimed + #... + hook called: all symbols read. +-Sym: '_?func' Resolution: LDPR_PREVAILING_DEF_IRONLY ++Sym: '_?func' Resolution: LDPR_PREVAILING_DE.* + Sym: '_?func2' Resolution: LDPR_PREVAILING_DEF_IRONLY + #... + hook called: cleanup. +diff -rupN --no-dereference binutils-2.39/ld/testsuite/ld-plugin/plugin.exp binutils-2.39-new/ld/testsuite/ld-plugin/plugin.exp +--- binutils-2.39/ld/testsuite/ld-plugin/plugin.exp 2022-10-30 12:41:32.250023774 +0100 ++++ binutils-2.39-new/ld/testsuite/ld-plugin/plugin.exp 2022-10-30 12:41:34.556023785 +0100 +@@ -119,7 +119,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 _ "" + } + +@@ -258,6 +258,10 @@ set plugin_lib_tests [list \ + $testobjfiles tmpdir/libempty.a $libs" "" "" "" {{ld plugin-30.d}} "main.x" ] \ + ] + ++if { [istarget "powerpc*-*-linux*"] } { ++ return ++} ++ + set plugin_extra_elf_tests [list \ + [list "plugin set symbol visibility" "-plugin $plugin_path $regclm \ + $regas $regcln -plugin-opt claim:tmpdir/func.o \ +diff -rupN --no-dereference binutils-2.39/ld/testsuite/ld-powerpc/group1.sym binutils-2.39-new/ld/testsuite/ld-powerpc/group1.sym +--- binutils-2.39/ld/testsuite/ld-powerpc/group1.sym 2022-07-08 11:46:48.000000000 +0200 ++++ binutils-2.39-new/ld/testsuite/ld-powerpc/group1.sym 2022-10-30 12:41:34.553023785 +0100 +@@ -1,3 +1 @@ +-#... +-.* 8 FUNC +GLOBAL DEFAULT \[: 4\] +1 foo + #pass +diff -rupN --no-dereference binutils-2.39/ld/testsuite/ld-powerpc/group3.sym binutils-2.39-new/ld/testsuite/ld-powerpc/group3.sym +--- binutils-2.39/ld/testsuite/ld-powerpc/group3.sym 2022-07-08 11:46:48.000000000 +0200 ++++ binutils-2.39-new/ld/testsuite/ld-powerpc/group3.sym 2022-10-30 12:41:34.553023785 +0100 +@@ -1,3 +1 @@ +-#... +-.* 4 FUNC +GLOBAL DEFAULT \[: 1\] +1 foo + #pass +diff -rupN --no-dereference binutils-2.39/ld/testsuite/ld-powerpc/notoc3.d binutils-2.39-new/ld/testsuite/ld-powerpc/notoc3.d +--- binutils-2.39/ld/testsuite/ld-powerpc/notoc3.d 2022-07-08 11:46:48.000000000 +0200 ++++ binutils-2.39-new/ld/testsuite/ld-powerpc/notoc3.d 2022-10-30 12:41:34.553023785 +0100 +@@ -57,7 +57,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 .* +@@ -72,7 +72,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> +@@ -91,6 +91,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.39/ld/testsuite/ld-powerpc/powerpc.exp binutils-2.39-new/ld/testsuite/ld-powerpc/powerpc.exp +--- binutils-2.39/ld/testsuite/ld-powerpc/powerpc.exp 2022-07-08 11:46:48.000000000 +0200 ++++ binutils-2.39-new/ld/testsuite/ld-powerpc/powerpc.exp 2022-10-30 12:41:34.556023785 +0100 +@@ -89,6 +89,10 @@ proc supports_ppc64 { } { + } + } + ++if { [istarget "powerpc*-*-linux*"] } { ++ return ++} ++ + # List contains test-items with 3 items followed by 2 lists: + # 0:name 1:ld early options 2:ld late options 3:assembler options + # 4:filenames of assembler files 5: action and options. 6: name of output file +diff -rupN --no-dereference binutils-2.39/ld/testsuite/ld-s390/s390.exp binutils-2.39-new/ld/testsuite/ld-s390/s390.exp +--- binutils-2.39/ld/testsuite/ld-s390/s390.exp 2022-07-08 11:46:48.000000000 +0200 ++++ binutils-2.39-new/ld/testsuite/ld-s390/s390.exp 2022-10-30 12:41:34.556023785 +0100 +@@ -26,6 +26,8 @@ if { !([istarget "s390-*-*"] || [istarge + return + } + ++return ++ + # List contains test-items with 3 items followed by 2 lists: + # 0:name 1:ld early options 2:ld late options 3:assembler options + # 4:filenames of assembler files 5: action and options. 6: name of output file +diff -rupN --no-dereference binutils-2.39/ld/testsuite/ld-scripts/crossref.exp binutils-2.39-new/ld/testsuite/ld-scripts/crossref.exp +--- binutils-2.39/ld/testsuite/ld-scripts/crossref.exp 2022-07-08 11:46:48.000000000 +0200 ++++ binutils-2.39-new/ld/testsuite/ld-scripts/crossref.exp 2022-10-30 12:41:34.551023785 +0100 +@@ -141,6 +141,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 { +@@ -181,6 +183,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 { +@@ -193,6 +197,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.39/ld/testsuite/ld-shared/shared.exp binutils-2.39-new/ld/testsuite/ld-shared/shared.exp +--- binutils-2.39/ld/testsuite/ld-shared/shared.exp 2022-07-08 11:46:48.000000000 +0200 ++++ binutils-2.39-new/ld/testsuite/ld-shared/shared.exp 2022-10-30 12:41:34.551023785 +0100 +@@ -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.39/ld/testsuite/ld-vsb/vsb.exp binutils-2.39-new/ld/testsuite/ld-vsb/vsb.exp +--- binutils-2.39/ld/testsuite/ld-vsb/vsb.exp 2022-07-08 11:46:48.000000000 +0200 ++++ binutils-2.39-new/ld/testsuite/ld-vsb/vsb.exp 2022-10-30 12:41:34.558023785 +0100 +@@ -123,6 +123,10 @@ if { [istarget *-*-linux*] + } + } + ++if { [istarget "i?86-*-*"] } { ++ set support_protected "no" ++} ++ + # The test procedure. + proc visibility_test { visibility progname testname main sh1 sh2 dat args } { + global CC_FOR_TARGET +diff -rupN --no-dereference binutils-2.39/ld/testsuite/ld-x86-64/pr22001-1b.err binutils-2.39-new/ld/testsuite/ld-x86-64/pr22001-1b.err +--- binutils-2.39/ld/testsuite/ld-x86-64/pr22001-1b.err 2022-07-08 11:46:48.000000000 +0200 ++++ binutils-2.39-new/ld/testsuite/ld-x86-64/pr22001-1b.err 2022-10-30 12:41:34.555023785 +0100 +@@ -1,2 +1,2 @@ +-.*relocation R_X86_64_32S against symbol `copy' can not be used when making a P(D|I)E object; recompile with -fPIE ++.*relocation R_X86_64_(PC32|32S) against symbol `copy' can not be used when making a P(D|I)E object; recompile with -fPIE + #... +diff -rupN --no-dereference binutils-2.39/ld/testsuite/ld-x86-64/x86-64.exp binutils-2.39-new/ld/testsuite/ld-x86-64/x86-64.exp +--- binutils-2.39/ld/testsuite/ld-x86-64/x86-64.exp 2022-07-26 09:13:10.000000000 +0200 ++++ binutils-2.39-new/ld/testsuite/ld-x86-64/x86-64.exp 2022-10-30 12:41:34.560023785 +0100 @@ -1376,14 +1376,6 @@ if { [isnative] && [check_compiler_avail "libprotected-func-2b.so" \ ] \ @@ -956,103 +1096,7 @@ diff -rup binutils.orig/ld/testsuite/ld-plugin/lto.exp binutils-2.39/ld/testsuit if { [check_ifunc_attribute_available] } { run_ld_link_exec_tests [list \ [list \ -@@ -2171,24 +2058,6 @@ if { [isnative] && [check_compiler_avail - $pltsecdump \ - "plt-main-pie-ibt-now" \ - ] \ -- [list \ -- "Build libibtplt-lib.so with -z ibtplt" \ -- "-shared -Wl,-z,ibtplt,-z,noseparate-code \ -- -Wl,-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 -Wl,-z,ibtplt,-z,now,-z,noseparate-code \ -- -Wl,-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 \ ---- binutils.orig/ld/testsuite/ld-x86-64/x86-64.exp 2022-08-11 14:06:27.033627440 +0100 -+++ binutils-2.39/ld/testsuite/ld-x86-64/x86-64.exp 2022-08-11 14:07:01.873427447 +0100 -@@ -2060,51 +2060,6 @@ if { [isnative] && [check_compiler_avail - ] \ - ] - -- run_ld_link_exec_tests [list \ -- [list \ -- "Run plt-main with -z ibtplt" \ -- "-Wl,--no-as-needed,-z,ibtplt tmpdir/plt-main1.o \ -- tmpdir/plt-main2.o tmpdir/plt-main3.o \ -- tmpdir/plt-main4.o tmpdir/libplt-lib.so" \ -- "-Wa,-mx86-used-note=yes" \ -- { plt-main5.c } \ -- "plt-main-ibt" \ -- "plt-main.out" \ -- ] \ -- [list \ -- "Run plt-main with PIE and -z ibtplt" \ -- "-Wl,--no-as-needed,-z,ibtplt -pie tmpdir/plt-main1.o \ -- tmpdir/plt-main2.o tmpdir/plt-main3.o \ -- tmpdir/plt-main4.o tmpdir/libplt-lib.so" \ -- "-Wa,-mx86-used-note=yes" \ -- { plt-main5.c } \ -- "plt-main-pie-ibt" \ -- "plt-main.out" \ -- "-fPIC" \ -- ] \ -- [list \ -- "Run plt-main with -z ibtplt -z now" \ -- "-Wl,--no-as-needed,-z,ibtplt,-z,now tmpdir/plt-main1.o \ -- tmpdir/plt-main2.o tmpdir/plt-main3.o \ -- tmpdir/plt-main4.o tmpdir/libplt-lib.so" \ -- "-Wa,-mx86-used-note=yes" \ -- { plt-main5.c } \ -- "plt-main-ibt-now" \ -- "plt-main.out" \ -- ] \ -- [list \ -- "Run plt-main with PIE and -z ibtplt -z now" \ -- "-Wl,--no-as-needed,-z,ibtplt,-z,now -pie tmpdir/plt-main1.o \ -- tmpdir/plt-main2.o tmpdir/plt-main3.o \ -- tmpdir/plt-main4.o tmpdir/libplt-lib.so" \ -- "-Wa,-mx86-used-note=yes" \ -- { plt-main5.c } \ -- "plt-main-pie-ibt-now" \ -- "plt-main.out" \ -- "-fPIC" \ -- ] \ -- ] -- - if { [check_ifunc_attribute_available] } { - run_ld_link_exec_tests [list \ - [list \ -diff -rup binutils.orig/libctf/testsuite/libctf-regression/libctf-repeat-cu.exp binutils-2.39/libctf/testsuite/libctf-regression/libctf-repeat-cu.exp ---- binutils.orig/libctf/testsuite/libctf-regression/libctf-repeat-cu.exp 2022-08-11 14:06:26.823628645 +0100 -+++ binutils-2.39/libctf/testsuite/libctf-regression/libctf-repeat-cu.exp 2022-08-11 14:09:36.272541183 +0100 -@@ -97,9 +97,8 @@ if [is_remote host] { - set comp_output [prune_warnings [run_host_cmd "$CC_FOR_TARGET" "$CFLAGS_FOR_TARGET -gctf -fPIC -shared -o tmpdir/libctf-repeat-cu-main.so $src tmpdir/a.a tmpdir/b.a tmpdir/c.a"]] - if { $comp_output != "" } { - send_log "compilation of tmpdir/libctf-repeat-cu-main.so failed" -- perror "compilation of tmpdir/libctf-repeat-cu-main.so failed" -- fail $testname -- return $comp_output -+ unsupported "compilation of tmpdir/libctf-repeat-cu-main.so failed" -+ return 0 - } - - set comp_output [prune_warnings [run_host_cmd "$OBJDUMP" "--ctf tmpdir/libctf-repeat-cu-main.so > tmpdir/dump.out"]] ---- binutils.orig/ld/testsuite/ld-x86-64/x86-64.exp 2022-08-11 14:35:37.042650489 +0100 -+++ binutils-2.39/ld/testsuite/ld-x86-64/x86-64.exp 2022-08-11 14:36:06.241485477 +0100 -@@ -2015,51 +2015,6 @@ if { [isnative] && [check_compiler_avail +@@ -2128,132 +2015,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}} } @@ -1099,334 +1143,126 @@ diff -rup binutils.orig/libctf/testsuite/libctf-regression/libctf-repeat-cu.exp - $pltsecdump \ - "plt-main-pie-ibt-now" \ - ] \ +- [list \ +- "Build libibtplt-lib.so with -z ibtplt" \ +- "-shared -Wl,-z,ibtplt,-z,noseparate-code \ +- -Wl,-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 -Wl,-z,ibtplt,-z,now,-z,noseparate-code \ +- -Wl,-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 \ +- "Run plt-main with -z ibtplt" \ +- "-Wl,--no-as-needed,-z,ibtplt tmpdir/plt-main1.o \ +- tmpdir/plt-main2.o tmpdir/plt-main3.o \ +- tmpdir/plt-main4.o tmpdir/libplt-lib.so" \ +- "-Wa,-mx86-used-note=yes" \ +- { plt-main5.c } \ +- "plt-main-ibt" \ +- "plt-main.out" \ +- ] \ +- [list \ +- "Run plt-main with PIE and -z ibtplt" \ +- "-Wl,--no-as-needed,-z,ibtplt -pie tmpdir/plt-main1.o \ +- tmpdir/plt-main2.o tmpdir/plt-main3.o \ +- tmpdir/plt-main4.o tmpdir/libplt-lib.so" \ +- "-Wa,-mx86-used-note=yes" \ +- { plt-main5.c } \ +- "plt-main-pie-ibt" \ +- "plt-main.out" \ +- "-fPIC" \ +- ] \ +- [list \ +- "Run plt-main with -z ibtplt -z now" \ +- "-Wl,--no-as-needed,-z,ibtplt,-z,now tmpdir/plt-main1.o \ +- tmpdir/plt-main2.o tmpdir/plt-main3.o \ +- tmpdir/plt-main4.o tmpdir/libplt-lib.so" \ +- "-Wa,-mx86-used-note=yes" \ +- { plt-main5.c } \ +- "plt-main-ibt-now" \ +- "plt-main.out" \ +- ] \ +- [list \ +- "Run plt-main with PIE and -z ibtplt -z now" \ +- "-Wl,--no-as-needed,-z,ibtplt,-z,now -pie tmpdir/plt-main1.o \ +- tmpdir/plt-main2.o tmpdir/plt-main3.o \ +- tmpdir/plt-main4.o tmpdir/libplt-lib.so" \ +- "-Wa,-mx86-used-note=yes" \ +- { plt-main5.c } \ +- "plt-main-pie-ibt-now" \ +- "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] } { run_ld_link_exec_tests [list \ [list \ -diff -rup binutils.orig/gprofng/testsuite/lib/display-lib.exp binutils-2.39/gprofng/testsuite/lib/display-lib.exp ---- binutils.orig/gprofng/testsuite/lib/display-lib.exp 2022-08-11 14:35:37.614647256 +0100 -+++ binutils-2.39/gprofng/testsuite/lib/display-lib.exp 2022-08-11 15:09:55.419958513 +0100 -@@ -96,9 +96,8 @@ proc run_display_test { dir cflags gprof - perror "comparison of results in $dir failed" - } else { - send_log "compilation of test program in $dir failed:\n$out\n" -- perror "compilation of test program in $dir failed" -+ unsupported "compilation of test program in $dir failed" - } -- fail $dir - return 0 +@@ -2278,7 +2039,6 @@ if { [isnative] && [check_compiler_avail + } } - pass $dir ---- binutils.orig/ld/testsuite/ld-i386/i386.exp 2022-08-12 12:02:06.175831193 +0100 -+++ binutils-2.39/ld/testsuite/ld-i386/i386.exp 2022-08-12 12:04:58.423753469 +0100 -@@ -1292,22 +1292,6 @@ if { [isnative] - {} \ - "pr28875.so" \ - ] \ -- [list \ -- "Build pr28875" \ -- "$NOPIE_LDFLAGS -Wl,--no-as-needed tmpdir/pr28875.so" \ -- "$NOPIE_CFLAGS" \ -- { pr28875b.c } \ -- {{error_output "pr28875.err"}} \ -- "pr28875" \ -- ] \ -- [list \ -- "Build pr21997-1" \ -- "$NOPIE_LDFLAGS -Wl,--no-as-needed,-z,notext tmpdir/pr21997-1.so" \ -- "$NOPIE_CFLAGS -Wa,-mx86-used-note=yes" \ -- { pr21997-1b.c } \ -- {{error_output "pr21997-1.err"}} \ -- "pr21997-1" \ -- ] \ - ] - run_ld_link_exec_tests [list \ -diff -rup binutils.orig/ld/testsuite/ld-aarch64/bti-plt-5.d binutils-2.39/ld/testsuite/ld-aarch64/bti-plt-5.d ---- binutils.orig/ld/testsuite/ld-aarch64/bti-plt-5.d 2022-08-12 12:02:05.957832557 +0100 -+++ binutils-2.39/ld/testsuite/ld-aarch64/bti-plt-5.d 2022-08-12 12:16:33.235418444 +0100 -@@ -8,21 +8,4 @@ - [^:]*: *file format elf64-.*aarch64 +- undefined_weak "$NOPIE_CFLAGS" "$NOPIE_LDFLAGS" + undefined_weak "-fPIE" "" + undefined_weak "-fPIE" "-pie" + undefined_weak "-fPIE" "-Wl,-z,nodynamic-undefined-weak" +diff -rupN --no-dereference binutils-2.39/ld/testsuite/lib/ld-lib.exp binutils-2.39-new/ld/testsuite/lib/ld-lib.exp +--- binutils-2.39/ld/testsuite/lib/ld-lib.exp 2022-07-08 11:46:48.000000000 +0200 ++++ binutils-2.39-new/ld/testsuite/lib/ld-lib.exp 2022-10-30 12:41:34.558023785 +0100 +@@ -1670,6 +1670,10 @@ proc skip_ctf_tests { } { + return 1 + } - Disassembly of section \.plt: -- --[0-9a-f]+ <.*>: --.*: d503245f bti c --.*: a9bf7bf0 stp x16, x30, \[sp, #-16\]! --.*: 90000090 adrp x16, 410000 <.*> --.*: f9421611 ldr x17, \[x16, #1064\] --.*: 9110a210 add x16, x16, #0x428 --.*: d61f0220 br x17 --.*: d503201f nop --.*: d503201f nop -- --[0-9a-f]+ <.*>: --.*: d503245f bti c --.*: 90000090 adrp x16, 410000 <.*> --.*: f9421a11 ldr x17, \[x16, #1072\] --.*: 9110c210 add x16, x16, #0x430 --.*: d61f0220 br x17 --.*: d503201f nop -+#pass -diff -rup binutils.orig/ld/testsuite/ld-aarch64/erratum843419-far-full.d binutils-2.39/ld/testsuite/ld-aarch64/erratum843419-far-full.d ---- binutils.orig/ld/testsuite/ld-aarch64/erratum843419-far-full.d 2022-08-12 12:02:05.949832607 +0100 -+++ binutils-2.39/ld/testsuite/ld-aarch64/erratum843419-far-full.d 2022-08-12 12:06:58.967999214 +0100 -@@ -8,7 +8,7 @@ Disassembly of section \.text: - - 0*400000 <_start>: - ... -- 400ffc: 90400000 adrp x0, 80400000 <__bss_end__\+0x7ffedff0> -+ 400ffc: 90400000 adrp x0, 80400000 <__bss_end__\+.*> - 401000: f9000042 str x2, \[x2\] - 401004: d2800002 mov x2, #0x0 // #0 - 401008: 14000004 b 401018 -diff -rup binutils.orig/ld/testsuite/ld-aarch64/farcall-b-plt.d binutils-2.39/ld/testsuite/ld-aarch64/farcall-b-plt.d ---- binutils.orig/ld/testsuite/ld-aarch64/farcall-b-plt.d 2022-08-12 12:02:05.959832544 +0100 -+++ binutils-2.39/ld/testsuite/ld-aarch64/farcall-b-plt.d 2022-08-12 12:08:30.966423604 +0100 -@@ -10,7 +10,7 @@ Disassembly of section .plt: - - .* <.plt>: - .*: a9bf7bf0 stp x16, x30, \[sp, #-16\]! --.*: .* adrp x16, .* <__foo_veneer\+.*> -+.*: .* adrp x16, .* <.*> - .*: .* ldr [wx]17, \[x16, #.*\] - .*: .* add [wx]16, [wx]16, #.* - .*: d61f0220 br x17 -@@ -19,7 +19,7 @@ Disassembly of section .plt: - .*: d503201f nop - - .* : --.*: .* adrp x16, .* <__foo_veneer\+.*> -+.*: .* adrp x16, .* <.*> - .*: .* ldr [wx]17, \[x16, #.*\] - .*: .* add [wx]16, [wx]16, #.* - .*: d61f0220 br x17 -@@ -35,7 +35,7 @@ Disassembly of section .text: - .*: .* nop - - .* <__foo_veneer>: --.*: .* adrp x16, 0 <.*> -+.*: .* adrp x16, .* <.*> - .*: .* add x16, x16, #.* - .*: d61f0200 br x16 - ... -diff -rup binutils.orig/ld/testsuite/ld-aarch64/farcall-bl-plt.d binutils-2.39/ld/testsuite/ld-aarch64/farcall-bl-plt.d ---- binutils.orig/ld/testsuite/ld-aarch64/farcall-bl-plt.d 2022-08-12 12:02:05.957832557 +0100 -+++ binutils-2.39/ld/testsuite/ld-aarch64/farcall-bl-plt.d 2022-08-12 12:09:02.407226875 +0100 -@@ -10,7 +10,7 @@ Disassembly of section .plt: - - .* <.plt>: - .*: a9bf7bf0 stp x16, x30, \[sp, #-16\]! --.*: .* adrp x16, .* <__foo_veneer\+.*> -+.*: .* adrp x16, .* <.*> - .*: .* ldr [wx]17, \[x16, #.*\] - .*: .* add [wx]16, [wx]16, #.* - .*: d61f0220 br x17 -@@ -19,7 +19,7 @@ Disassembly of section .plt: - .*: d503201f nop - - .* : --.*: .* adrp x16, .* <__foo_veneer\+.*> -+.*: .* adrp x16, .* <.*> - .*: .* ldr [wx]17, \[x16, #.*\] - .*: .* add [wx]16, [wx]16, #.* - .*: d61f0220 br x17 -@@ -35,7 +35,7 @@ Disassembly of section .text: - .*: .* nop - - .* <__foo_veneer>: --.*: .* adrp x16, 0 <.*> -+.*: .* adrp x16, .* <.*> - .*: .* add x16, x16, #.* - .*: d61f0200 br x16 - ... -diff -rup binutils.orig/ld/testsuite/ld-aarch64/ifunc-1-local.d binutils-2.39/ld/testsuite/ld-aarch64/ifunc-1-local.d ---- binutils.orig/ld/testsuite/ld-aarch64/ifunc-1-local.d 2022-08-12 12:02:05.952832588 +0100 -+++ binutils-2.39/ld/testsuite/ld-aarch64/ifunc-1-local.d 2022-08-12 12:09:55.750893086 +0100 -@@ -3,7 +3,4 @@ - #objdump: -dw - - #... --0+(110|180|1a0) <(__GI_)?foo>: --#... --[ \t0-9a-f]+:[ \t0-9a-f]+bl[ \t0-9a-f]+<\*ABS\*\+(0x110|0x180|0x1a0)@plt> - #pass -diff -rup binutils.orig/ld/testsuite/ld-aarch64/ifunc-1.d binutils-2.39/ld/testsuite/ld-aarch64/ifunc-1.d ---- binutils.orig/ld/testsuite/ld-aarch64/ifunc-1.d 2022-08-12 12:02:05.951832594 +0100 -+++ binutils-2.39/ld/testsuite/ld-aarch64/ifunc-1.d 2022-08-12 12:09:42.054978785 +0100 -@@ -3,7 +3,4 @@ - #objdump: -dw - - #... --0+(130|1a0|1c8) : --#... --[ \t0-9a-f]+:[ \t0-9a-f]+bl[ \t0-9a-f]+<\*ABS\*\+0x(130|1a0|1c8)@plt> - #pass -diff -rup binutils.orig/ld/testsuite/ld-aarch64/ifunc-2-local.d binutils-2.39/ld/testsuite/ld-aarch64/ifunc-2-local.d ---- binutils.orig/ld/testsuite/ld-aarch64/ifunc-2-local.d 2022-08-12 12:02:05.961832532 +0100 -+++ binutils-2.39/ld/testsuite/ld-aarch64/ifunc-2-local.d 2022-08-12 12:10:23.733718004 +0100 -@@ -3,9 +3,4 @@ - #objdump: -dw - - #... --0+(110|180|1a0) <__GI_foo>: --#... --[ \t0-9a-f]+:[ \t0-9a-f]+bl[ \t0-9a-f]+<\*ABS\*\+0x(110|180|1a0)@plt> --[ \t0-9a-f]+:[ \t0-9a-f]+adrp[ \t]+x0, 0 <.*> --[ \t0-9a-f]+:[ \t0-9a-f]+add[ \t]+x0, x0, #0x(100|170|190) - #pass -diff -rup binutils.orig/ld/testsuite/ld-aarch64/ifunc-2.d binutils-2.39/ld/testsuite/ld-aarch64/ifunc-2.d ---- binutils.orig/ld/testsuite/ld-aarch64/ifunc-2.d 2022-08-12 12:02:05.960832538 +0100 -+++ binutils-2.39/ld/testsuite/ld-aarch64/ifunc-2.d 2022-08-12 12:10:12.965785376 +0100 -@@ -3,9 +3,4 @@ - #objdump: -dw - - #... --0+(130|1a0|1c8) : --#... --[ \t0-9a-f]+:[ \t0-9a-f]+bl[ \t0-9a-f]+<\*ABS\*\+0x(130|1a0|1c8)@plt> --[ \t0-9a-f]+:[ \t0-9a-f]+adrp[ \t]+x0, 0 <.*> --[ \t0-9a-f]+:[ \t0-9a-f]+add[ \t]+x0, x0, #0x(120|190|1b8) - #pass -diff -rup binutils.orig/ld/testsuite/ld-aarch64/ifunc-21.d binutils-2.39/ld/testsuite/ld-aarch64/ifunc-21.d ---- binutils.orig/ld/testsuite/ld-aarch64/ifunc-21.d 2022-08-12 12:02:05.949832607 +0100 -+++ binutils-2.39/ld/testsuite/ld-aarch64/ifunc-21.d 2022-08-12 12:12:27.844941426 +0100 -@@ -11,16 +11,4 @@ Contents of section .text: - [0-9a-f]+ .* - Contents of section .got.plt: - [0-9a-f]+ 0+ 0+ 0+ 0+ .* -- (10298|102b8) 0+ 0+ [0-9a-f]+ [0-9a-f]+ .* -- --Disassembly of section .text: -- --.* : -- .*: d65f03c0 ret -- --.* : -- .*: 90000080 adrp x0, 10000 <.*> -- .*: .* ldr x0, \[x0, #(672|704)\] -- .*: d65f03c0 ret -- - #pass -diff -rup binutils.orig/ld/testsuite/ld-aarch64/ifunc-22.d binutils-2.39/ld/testsuite/ld-aarch64/ifunc-22.d ---- binutils.orig/ld/testsuite/ld-aarch64/ifunc-22.d 2022-08-12 12:02:05.958832551 +0100 -+++ binutils-2.39/ld/testsuite/ld-aarch64/ifunc-22.d 2022-08-12 12:12:47.461818683 +0100 -@@ -6,6 +6,4 @@ - # Ensure GOT is populated correctly in static link - - .*: file format elf64-(little|big)aarch64 -- --Contents of section \.got: -- [0-9a-f]+ 00000000 00000000 (d0004000|18004000|00000000) (00000000|004000d0|00400018) .* -+#pass -diff -rup binutils.orig/ld/testsuite/ld-aarch64/ifunc-3a.d binutils-2.39/ld/testsuite/ld-aarch64/ifunc-3a.d ---- binutils.orig/ld/testsuite/ld-aarch64/ifunc-3a.d 2022-08-12 12:02:05.962832525 +0100 -+++ binutils-2.39/ld/testsuite/ld-aarch64/ifunc-3a.d 2022-08-12 12:10:36.645637220 +0100 -@@ -4,7 +4,4 @@ - #objdump: -dw - - #... --0+(150|1d0|1e8) <__GI_foo>: --#... --[ \t0-9a-f]+:[ \t0-9a-f]+bl[ \t0-9a-f]+<\*ABS\*\+0x(150|1d0|1e8)@plt> - #pass -diff -rup binutils.orig/ld/testsuite/ld-aarch64/ifunc-7c.d binutils-2.39/ld/testsuite/ld-aarch64/ifunc-7c.d ---- binutils.orig/ld/testsuite/ld-aarch64/ifunc-7c.d 2022-08-12 12:02:05.958832551 +0100 -+++ binutils-2.39/ld/testsuite/ld-aarch64/ifunc-7c.d 2022-08-12 12:11:50.070177794 +0100 -@@ -6,14 +6,5 @@ - # Check if adrp and ldr have been relocated correctly. - - .*: file format elf.+aarch64.* -- -- --Disassembly of section \.text: -- --[0-9a-f]+ : -- [0-9a-f]+: d65f03c0 ret -- --[0-9a-f]+ <__start>: -- [0-9a-f]+: [0-9a-f]+ bl [0-9a-f]+ <\*ABS\*\+0x[0-9a-f]+@plt> -- [0-9a-f]+: [0-9a-f]+ adrp x0, [0-9]+ <__start\+0x[0-9a-f]+> -- [0-9a-f]+: [0-9a-f]+ ldr x0, \[x0, .+\] -+#... -+#pass -diff -rup binutils-2.39/ld/testsuite/ld-aarch64/bti-plt-5.d binutils.new/ld/testsuite/ld-aarch64/bti-plt-5.d ---- binutils-2.39/ld/testsuite/ld-aarch64/bti-plt-5.d 2022-08-12 13:42:02.273863855 +0100 -+++ binutils.new/ld/testsuite/ld-aarch64/bti-plt-5.d 2022-08-12 13:39:47.130684480 +0100 -@@ -8,4 +8,4 @@ - [^:]*: *file format elf64-.*aarch64 - - Disassembly of section \.plt: --#pass -+#... -diff -rup binutils-2.39/ld/testsuite/ld-aarch64/ifunc-1-local.d binutils.new/ld/testsuite/ld-aarch64/ifunc-1-local.d ---- binutils-2.39/ld/testsuite/ld-aarch64/ifunc-1-local.d 2022-08-12 13:42:02.275863843 +0100 -+++ binutils.new/ld/testsuite/ld-aarch64/ifunc-1-local.d 2022-08-12 13:39:47.124684517 +0100 -@@ -3,4 +3,4 @@ - #objdump: -dw - - #... --#pass ++ if { [istarget "i?86-*-*"] } { ++ return 1 ++ } + -diff -rup binutils-2.39/ld/testsuite/ld-aarch64/ifunc-1.d binutils.new/ld/testsuite/ld-aarch64/ifunc-1.d ---- binutils-2.39/ld/testsuite/ld-aarch64/ifunc-1.d 2022-08-12 13:42:02.275863843 +0100 -+++ binutils.new/ld/testsuite/ld-aarch64/ifunc-1.d 2022-08-12 13:39:47.119684547 +0100 -@@ -3,4 +3,4 @@ - #objdump: -dw - - #... --#pass -+ -diff -rup binutils-2.39/ld/testsuite/ld-aarch64/ifunc-2-local.d binutils.new/ld/testsuite/ld-aarch64/ifunc-2-local.d ---- binutils-2.39/ld/testsuite/ld-aarch64/ifunc-2-local.d 2022-08-12 13:42:02.276863837 +0100 -+++ binutils.new/ld/testsuite/ld-aarch64/ifunc-2-local.d 2022-08-12 13:39:47.118684553 +0100 -@@ -3,4 +3,3 @@ - #objdump: -dw - - #... --#pass -diff -rup binutils-2.39/ld/testsuite/ld-aarch64/ifunc-2.d binutils.new/ld/testsuite/ld-aarch64/ifunc-2.d ---- binutils-2.39/ld/testsuite/ld-aarch64/ifunc-2.d 2022-08-12 13:42:02.276863837 +0100 -+++ binutils.new/ld/testsuite/ld-aarch64/ifunc-2.d 2022-08-12 13:39:47.127684498 +0100 -@@ -3,4 +3,3 @@ - #objdump: -dw - - #... --#pass -diff -rup binutils-2.39/ld/testsuite/ld-aarch64/ifunc-3a.d binutils.new/ld/testsuite/ld-aarch64/ifunc-3a.d ---- binutils-2.39/ld/testsuite/ld-aarch64/ifunc-3a.d 2022-08-12 13:42:02.277863831 +0100 -+++ binutils.new/ld/testsuite/ld-aarch64/ifunc-3a.d 2022-08-12 13:39:47.125684511 +0100 -@@ -4,4 +4,3 @@ - #objdump: -dw - - #... --#pass -diff -rup binutils-2.39/ld/testsuite/ld-aarch64/ifunc-7c.d binutils.new/ld/testsuite/ld-aarch64/ifunc-7c.d ---- binutils-2.39/ld/testsuite/ld-aarch64/ifunc-7c.d 2022-08-12 13:42:02.277863831 +0100 -+++ binutils.new/ld/testsuite/ld-aarch64/ifunc-7c.d 2022-08-12 13:39:47.128684493 +0100 -@@ -7,4 +7,3 @@ - - .*: file format elf.+aarch64.* - #... --#pass ---- binutils.new/ld/testsuite/ld-aarch64/ifunc-1-local.d 2022-08-12 13:39:47.124684517 +0100 -+++ binutils-2.39/ld/testsuite/ld-aarch64/ifunc-1-local.d 2022-08-12 14:38:32.310252736 +0100 -@@ -2,5 +2,6 @@ - #ld: -shared --hash-style=sysv - #objdump: -dw - --#... -+.*: file format elf.+aarch64.* -+#pass - ---- binutils.new/ld/testsuite/ld-aarch64/ifunc-1.d 2022-08-12 13:39:47.119684547 +0100 -+++ binutils-2.39/ld/testsuite/ld-aarch64/ifunc-1.d 2022-08-12 14:38:22.118316568 +0100 -@@ -2,5 +2,6 @@ - #ld: -shared --hash-style=sysv - #objdump: -dw - --#... -+.*: file format elf.+aarch64.* -+#pass + if [check_ctf_available] { + return 0 + } +diff -rupN --no-dereference binutils-2.39/libctf/testsuite/libctf-regression/libctf-repeat-cu.exp binutils-2.39-new/libctf/testsuite/libctf-regression/libctf-repeat-cu.exp +--- binutils-2.39/libctf/testsuite/libctf-regression/libctf-repeat-cu.exp 2022-07-08 11:46:48.000000000 +0200 ++++ binutils-2.39-new/libctf/testsuite/libctf-regression/libctf-repeat-cu.exp 2022-10-30 12:41:34.559023785 +0100 +@@ -97,9 +97,8 @@ if [is_remote host] { + set comp_output [prune_warnings [run_host_cmd "$CC_FOR_TARGET" "$CFLAGS_FOR_TARGET -gctf -fPIC -shared -o tmpdir/libctf-repeat-cu-main.so $src tmpdir/a.a tmpdir/b.a tmpdir/c.a"]] + if { $comp_output != "" } { + send_log "compilation of tmpdir/libctf-repeat-cu-main.so failed" +- perror "compilation of tmpdir/libctf-repeat-cu-main.so failed" +- fail $testname +- return $comp_output ++ unsupported "compilation of tmpdir/libctf-repeat-cu-main.so failed" ++ return 0 + } + set comp_output [prune_warnings [run_host_cmd "$OBJDUMP" "--ctf tmpdir/libctf-repeat-cu-main.so > tmpdir/dump.out"]] diff --git a/binutils-version.patch b/binutils-version.patch index 2552ee3..01e7e41 100644 --- a/binutils-version.patch +++ b/binutils-version.patch @@ -1,7 +1,7 @@ -diff -rup binutils.orig/bfd/Makefile.am binutils-2.38/bfd/Makefile.am ---- binutils.orig/bfd/Makefile.am 2022-02-09 14:10:42.659300681 +0000 -+++ binutils-2.38/bfd/Makefile.am 2022-02-09 14:12:40.562532916 +0000 -@@ -977,8 +977,8 @@ DISTCLEANFILES = $(BUILD_CFILES) $(BUILD +diff -rupN --no-dereference binutils-2.39/bfd/Makefile.am binutils-2.39-new/bfd/Makefile.am +--- binutils-2.39/bfd/Makefile.am 2022-07-08 11:46:47.000000000 +0200 ++++ binutils-2.39-new/bfd/Makefile.am 2022-10-30 12:41:21.707023724 +0100 +@@ -973,8 +973,8 @@ DISTCLEANFILES += $(BUILD_CFILES) $(BUIL bfdver.h: $(srcdir)/version.h $(srcdir)/development.sh $(srcdir)/Makefile.in $(AM_V_GEN)\ bfd_version=`echo "$(VERSION)" | $(SED) -e 's/\([^\.]*\)\.*\([^\.]*\)\.*\([^\.]*\)\.*\([^\.]*\)\.*\([^\.]*\).*/\1.00\2.00\3.00\4.00\5/' -e 's/\([^\.]*\)\..*\(..\)\..*\(..\)\..*\(..\)\..*\(..\)$$/\1\2\3\4\5/'` ;\ @@ -12,7 +12,7 @@ diff -rup binutils.orig/bfd/Makefile.am binutils-2.38/bfd/Makefile.am bfd_version_package="\"$(PKGVERSION)\"" ;\ report_bugs_to="\"$(REPORT_BUGS_TO)\"" ;\ . $(srcdir)/development.sh ;\ -@@ -989,7 +989,7 @@ bfdver.h: $(srcdir)/version.h $(srcdir)/ +@@ -985,7 +985,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 -rup binutils.orig/bfd/Makefile.am binutils-2.38/bfd/Makefile.am -e "s,@report_bugs_to@,$$report_bugs_to," \ < $(srcdir)/version.h > $@; \ echo "$${bfd_soversion}" > libtool-soversion -diff -rup binutils.orig/bfd/Makefile.in binutils-2.38/bfd/Makefile.in ---- binutils.orig/bfd/Makefile.in 2022-02-09 14:10:42.653300720 +0000 -+++ binutils-2.38/bfd/Makefile.in 2022-02-09 14:19:03.362040188 +0000 -@@ -2094,8 +2094,8 @@ stmp-lcoff-h: $(LIBCOFF_H_FILES) $(MKDOC +diff -rupN --no-dereference binutils-2.39/bfd/Makefile.in binutils-2.39-new/bfd/Makefile.in +--- binutils-2.39/bfd/Makefile.in 2022-08-05 11:53:59.000000000 +0200 ++++ binutils-2.39-new/bfd/Makefile.in 2022-10-30 12:41:21.708023724 +0100 +@@ -2443,8 +2443,8 @@ stmp-lcoff-h: $(LIBCOFF_H_FILES) $(MKDOC bfdver.h: $(srcdir)/version.h $(srcdir)/development.sh $(srcdir)/Makefile.in $(AM_V_GEN)\ bfd_version=`echo "$(VERSION)" | $(SED) -e 's/\([^\.]*\)\.*\([^\.]*\)\.*\([^\.]*\)\.*\([^\.]*\)\.*\([^\.]*\).*/\1.00\2.00\3.00\4.00\5/' -e 's/\([^\.]*\)\..*\(..\)\..*\(..\)\..*\(..\)\..*\(..\)$$/\1\2\3\4\5/'` ;\ @@ -35,7 +35,7 @@ diff -rup binutils.orig/bfd/Makefile.in binutils-2.38/bfd/Makefile.in bfd_version_package="\"$(PKGVERSION)\"" ;\ report_bugs_to="\"$(REPORT_BUGS_TO)\"" ;\ . $(srcdir)/development.sh ;\ -@@ -2106,7 +2106,7 @@ bfdver.h: $(srcdir)/version.h $(srcdir)/ +@@ -2455,7 +2455,7 @@ bfdver.h: $(srcdir)/version.h $(srcdir)/ fi ;\ $(SED) -e "s,@bfd_version@,$$bfd_version," \ -e "s,@bfd_version_string@,$$bfd_version_string," \