diff --git a/.gitignore b/.gitignore deleted file mode 100644 index 4d6ee96..0000000 --- a/.gitignore +++ /dev/null @@ -1,4 +0,0 @@ -SOURCES/binutils-2.35.tar.xz -SOURCES/standards.info.gz -/binutils-2.35.tar.xz -/standards.info.gz diff --git a/README.md b/README.md new file mode 100644 index 0000000..24b9ea2 --- /dev/null +++ b/README.md @@ -0,0 +1,3 @@ +# Package Not Available +This package is not available on CentOS Stream 10. +It may be available on another branch. \ No newline at end of file diff --git a/binutils-2.19.50.0.1-output-format.sed b/binutils-2.19.50.0.1-output-format.sed deleted file mode 100644 index fd770cb..0000000 --- a/binutils-2.19.50.0.1-output-format.sed +++ /dev/null @@ -1,38 +0,0 @@ -# Generate OUTPUT_FORMAT line for .so files from the system linker output. -# Imported from glibc/Makerules. - -/ld.*[ ]-E[BL]/b f -/collect.*[ ]-E[BL]/b f -/OUTPUT_FORMAT[^)]*$/{N -s/\n[ ]*/ / -} -t o -: o -s/^.*OUTPUT_FORMAT(\([^,]*\), \1, \1).*$/OUTPUT_FORMAT(\1)/ -t q -s/^.*OUTPUT_FORMAT(\([^,]*\), \([^,]*\), \([^,]*\)).*$/\1,\2,\3/ -t s -s/^.*OUTPUT_FORMAT(\([^,)]*\).*$)/OUTPUT_FORMAT(\1)/ -t q -d -: s -s/"//g -G -s/\n// -s/^\([^,]*\),\([^,]*\),\([^,]*\),B/OUTPUT_FORMAT(\2)/p -s/^\([^,]*\),\([^,]*\),\([^,]*\),L/OUTPUT_FORMAT(\3)/p -s/^\([^,]*\),\([^,]*\),\([^,]*\)/OUTPUT_FORMAT(\1)/p -/,/s|^|*** BUG in libc/scripts/output-format.sed *** |p -q -: q -s/"//g -p -q -: f -s/^.*[ ]-E\([BL]\)[ ].*$/,\1/ -t h -s/^.*[ ]-E\([BL]\)$/,\1/ -t h -d -: h -h diff --git a/binutils-2.20.51.0.2-libtool-lib64.patch b/binutils-2.20.51.0.2-libtool-lib64.patch deleted file mode 100644 index 142fc7e..0000000 --- a/binutils-2.20.51.0.2-libtool-lib64.patch +++ /dev/null @@ -1,236 +0,0 @@ -diff -rcp ../binutils-2.20.51.0.7.original/bfd/configure ./bfd/configure ---- a/bfd/configure 2010-04-08 14:53:48.000000000 +0100 -+++ b/bfd/configure 2010-04-08 14:56:50.000000000 +0100 -@@ -10762,10 +10762,34 @@ - # before this can be enabled. - hardcode_into_libs=yes - -+ # find out which ABI we are using -+ libsuff= -+ case "$host_cpu" in -+ x86_64*|s390*|powerpc*|ppc*|sparc*) -+ echo 'int i;' > conftest.$ac_ext -+ if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 -+ (eval $ac_compile) 2>&5 -+ ac_status=$? -+ echo "$as_me:$LINENO: \$? = $ac_status" >&5 -+ (exit $ac_status); }; then -+ case `/usr/bin/file conftest.$ac_objext` in -+ *64-bit*) -+ libsuff=64 -+ if test x"$sys_lib_search_path_spec" = x"/lib /usr/lib /usr/local/lib"; then -+ sys_lib_search_path_spec="/lib${libsuff} /usr/lib${libsuff} /usr/local/lib${libsuff}" -+ fi -+ sys_lib_dlsearch_path_spec="/lib${libsuff} /usr/lib${libsuff}" -+ ;; -+ esac -+ fi -+ rm -rf conftest* -+ ;; -+ esac -+ - # Append ld.so.conf contents to the search path - if test -f /etc/ld.so.conf; then - lt_ld_extra=`awk '/^include / { system(sprintf("cd /etc; cat %s 2>/dev/null", \$2)); skip = 1; } { if (!skip) print \$0; skip = 0; }' < /etc/ld.so.conf | $SED -e 's/#.*//;/^[ ]*hwcap[ ]/d;s/[:, ]/ /g;s/=[^=]*$//;s/=[^= ]* / /g;s/"//g;/^$/d' | tr '\n' ' '` -- sys_lib_dlsearch_path_spec="/lib /usr/lib $lt_ld_extra" -+ sys_lib_dlsearch_path_spec="/lib${libsuff} /usr/lib${libsuff} $lt_ld_extra" - fi - - # We used to test for /lib/ld.so.1 and disable shared libraries on -diff -rcp ../binutils-2.20.51.0.7.original/binutils/configure ./binutils/configure ---- a/binutils/configure 2010-04-08 14:53:45.000000000 +0100 -+++ b/binutils/configure 2010-04-08 14:56:21.000000000 +0100 -@@ -10560,10 +10560,34 @@ - # before this can be enabled. - hardcode_into_libs=yes - -+ # find out which ABI we are using -+ libsuff= -+ case "$host_cpu" in -+ x86_64*|s390*|powerpc*|ppc*|sparc*) -+ echo 'int i;' > conftest.$ac_ext -+ if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 -+ (eval $ac_compile) 2>&5 -+ ac_status=$? -+ echo "$as_me:$LINENO: \$? = $ac_status" >&5 -+ (exit $ac_status); }; then -+ case `/usr/bin/file conftest.$ac_objext` in -+ *64-bit*) -+ libsuff=64 -+ if test x"$sys_lib_search_path_spec" = x"/lib /usr/lib /usr/local/lib"; then -+ sys_lib_search_path_spec="/lib${libsuff} /usr/lib${libsuff} /usr/local/lib${libsuff}" -+ fi -+ sys_lib_dlsearch_path_spec="/lib${libsuff} /usr/lib${libsuff}" -+ ;; -+ esac -+ fi -+ rm -rf conftest* -+ ;; -+ esac -+ - # Append ld.so.conf contents to the search path - if test -f /etc/ld.so.conf; then - lt_ld_extra=`awk '/^include / { system(sprintf("cd /etc; cat %s 2>/dev/null", \$2)); skip = 1; } { if (!skip) print \$0; skip = 0; }' < /etc/ld.so.conf | $SED -e 's/#.*//;/^[ ]*hwcap[ ]/d;s/[:, ]/ /g;s/=[^=]*$//;s/=[^= ]* / /g;s/"//g;/^$/d' | tr '\n' ' '` -- sys_lib_dlsearch_path_spec="/lib /usr/lib $lt_ld_extra" -+ sys_lib_dlsearch_path_spec="/lib${libsuff} /usr/lib${libsuff} $lt_ld_extra" - fi - - # We used to test for /lib/ld.so.1 and disable shared libraries on -diff -rcp ../binutils-2.20.51.0.7.original/gas/configure ./gas/configure ---- a/gas/configure 2010-04-08 14:53:47.000000000 +0100 -+++ b/gas/configure 2010-04-08 14:57:24.000000000 +0100 -@@ -10547,10 +10547,34 @@ - # before this can be enabled. - hardcode_into_libs=yes - -+ # find out which ABI we are using -+ libsuff= -+ case "$host_cpu" in -+ x86_64*|s390*|powerpc*|ppc*|sparc*) -+ echo 'int i;' > conftest.$ac_ext -+ if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 -+ (eval $ac_compile) 2>&5 -+ ac_status=$? -+ echo "$as_me:$LINENO: \$? = $ac_status" >&5 -+ (exit $ac_status); }; then -+ case `/usr/bin/file conftest.$ac_objext` in -+ *64-bit*) -+ libsuff=64 -+ if test x"$sys_lib_search_path_spec" = x"/lib /usr/lib /usr/local/lib"; then -+ sys_lib_search_path_spec="/lib${libsuff} /usr/lib${libsuff} /usr/local/lib${libsuff}" -+ fi -+ sys_lib_dlsearch_path_spec="/lib${libsuff} /usr/lib${libsuff}" -+ ;; -+ esac -+ fi -+ rm -rf conftest* -+ ;; -+ esac -+ - # Append ld.so.conf contents to the search path - if test -f /etc/ld.so.conf; then - lt_ld_extra=`awk '/^include / { system(sprintf("cd /etc; cat %s 2>/dev/null", \$2)); skip = 1; } { if (!skip) print \$0; skip = 0; }' < /etc/ld.so.conf | $SED -e 's/#.*//;/^[ ]*hwcap[ ]/d;s/[:, ]/ /g;s/=[^=]*$//;s/=[^= ]* / /g;s/"//g;/^$/d' | tr '\n' ' '` -- sys_lib_dlsearch_path_spec="/lib /usr/lib $lt_ld_extra" -+ sys_lib_dlsearch_path_spec="/lib${libsuff} /usr/lib${libsuff} $lt_ld_extra" - fi - - # We used to test for /lib/ld.so.1 and disable shared libraries on -diff -rcp ../binutils-2.20.51.0.7.original/gprof/configure ./gprof/configure ---- a/gprof/configure 2010-04-08 14:53:45.000000000 +0100 -+++ b/gprof/configure 2010-04-08 14:57:50.000000000 +0100 -@@ -10485,10 +10485,34 @@ - # before this can be enabled. - hardcode_into_libs=yes - -+ # find out which ABI we are using -+ libsuff= -+ case "$host_cpu" in -+ x86_64*|s390*|powerpc*|ppc*|sparc*) -+ echo 'int i;' > conftest.$ac_ext -+ if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 -+ (eval $ac_compile) 2>&5 -+ ac_status=$? -+ echo "$as_me:$LINENO: \$? = $ac_status" >&5 -+ (exit $ac_status); }; then -+ case `/usr/bin/file conftest.$ac_objext` in -+ *64-bit*) -+ libsuff=64 -+ if test x"$sys_lib_search_path_spec" = x"/lib /usr/lib /usr/local/lib"; then -+ sys_lib_search_path_spec="/lib${libsuff} /usr/lib${libsuff} /usr/local/lib${libsuff}" -+ fi -+ sys_lib_dlsearch_path_spec="/lib${libsuff} /usr/lib${libsuff}" -+ ;; -+ esac -+ fi -+ rm -rf conftest* -+ ;; -+ esac -+ - # Append ld.so.conf contents to the search path - if test -f /etc/ld.so.conf; then - lt_ld_extra=`awk '/^include / { system(sprintf("cd /etc; cat %s 2>/dev/null", \$2)); skip = 1; } { if (!skip) print \$0; skip = 0; }' < /etc/ld.so.conf | $SED -e 's/#.*//;/^[ ]*hwcap[ ]/d;s/[:, ]/ /g;s/=[^=]*$//;s/=[^= ]* / /g;s/"//g;/^$/d' | tr '\n' ' '` -- sys_lib_dlsearch_path_spec="/lib /usr/lib $lt_ld_extra" -+ sys_lib_dlsearch_path_spec="/lib${libsuff} /usr/lib${libsuff} $lt_ld_extra" - fi - - # We used to test for /lib/ld.so.1 and disable shared libraries on -diff -rcp ../binutils-2.20.51.0.7.original/ld/configure ./ld/configure ---- a/ld/configure 2010-04-08 14:53:44.000000000 +0100 -+++ b/ld/configure 2010-04-08 14:58:21.000000000 +0100 -@@ -10966,10 +10966,34 @@ - # before this can be enabled. - hardcode_into_libs=yes - -+ # find out which ABI we are using -+ libsuff= -+ case "$host_cpu" in -+ x86_64*|s390*|powerpc*|ppc*|sparc*) -+ echo 'int i;' > conftest.$ac_ext -+ if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 -+ (eval $ac_compile) 2>&5 -+ ac_status=$? -+ echo "$as_me:$LINENO: \$? = $ac_status" >&5 -+ (exit $ac_status); }; then -+ case `/usr/bin/file conftest.$ac_objext` in -+ *64-bit*) -+ libsuff=64 -+ if test x"$sys_lib_search_path_spec" = x"/lib /usr/lib /usr/local/lib"; then -+ sys_lib_search_path_spec="/lib${libsuff} /usr/lib${libsuff} /usr/local/lib${libsuff}" -+ fi -+ sys_lib_dlsearch_path_spec="/lib${libsuff} /usr/lib${libsuff}" -+ ;; -+ esac -+ fi -+ rm -rf conftest* -+ ;; -+ esac -+ - # Append ld.so.conf contents to the search path - if test -f /etc/ld.so.conf; then - lt_ld_extra=`awk '/^include / { system(sprintf("cd /etc; cat %s 2>/dev/null", \$2)); skip = 1; } { if (!skip) print \$0; skip = 0; }' < /etc/ld.so.conf | $SED -e 's/#.*//;/^[ ]*hwcap[ ]/d;s/[:, ]/ /g;s/=[^=]*$//;s/=[^= ]* / /g;s/"//g;/^$/d' | tr '\n' ' '` -- sys_lib_dlsearch_path_spec="/lib /usr/lib $lt_ld_extra" -+ sys_lib_dlsearch_path_spec="/lib${libsuff} /usr/lib${libsuff} $lt_ld_extra" - fi - - # We used to test for /lib/ld.so.1 and disable shared libraries on -Only in .: .#libtool.m4 -Only in .: #libtool.m4# -diff -rcp ../binutils-2.20.51.0.7.original/opcodes/configure ./opcodes/configure ---- a/opcodes/configure 2010-04-08 14:53:45.000000000 +0100 -+++ b/opcodes/configure 2010-04-08 14:59:10.000000000 +0100 -@@ -10496,10 +10496,34 @@ - # before this can be enabled. - hardcode_into_libs=yes - -+ # find out which ABI we are using -+ libsuff= -+ case "$host_cpu" in -+ x86_64*|s390*|powerpc*|ppc*|sparc*) -+ echo 'int i;' > conftest.$ac_ext -+ if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 -+ (eval $ac_compile) 2>&5 -+ ac_status=$? -+ echo "$as_me:$LINENO: \$? = $ac_status" >&5 -+ (exit $ac_status); }; then -+ case `/usr/bin/file conftest.$ac_objext` in -+ *64-bit*) -+ libsuff=64 -+ if test x"$sys_lib_search_path_spec" = x"/lib /usr/lib /usr/local/lib"; then -+ sys_lib_search_path_spec="/lib${libsuff} /usr/lib${libsuff} /usr/local/lib${libsuff}" -+ fi -+ sys_lib_dlsearch_path_spec="/lib${libsuff} /usr/lib${libsuff}" -+ ;; -+ esac -+ fi -+ rm -rf conftest* -+ ;; -+ esac -+ - # Append ld.so.conf contents to the search path - if test -f /etc/ld.so.conf; then - lt_ld_extra=`awk '/^include / { system(sprintf("cd /etc; cat %s 2>/dev/null", \$2)); skip = 1; } { if (!skip) print \$0; skip = 0; }' < /etc/ld.so.conf | $SED -e 's/#.*//;/^[ ]*hwcap[ ]/d;s/[:, ]/ /g;s/=[^=]*$//;s/=[^= ]* / /g;s/"//g;/^$/d' | tr '\n' ' '` -- sys_lib_dlsearch_path_spec="/lib /usr/lib $lt_ld_extra" -+ sys_lib_dlsearch_path_spec="/lib${libsuff} /usr/lib${libsuff} $lt_ld_extra" - fi - - # We used to test for /lib/ld.so.1 and disable shared libraries on diff --git a/binutils-2.22.52.0.4-no-config-h-check.patch b/binutils-2.22.52.0.4-no-config-h-check.patch deleted file mode 100644 index c89195a..0000000 --- a/binutils-2.22.52.0.4-no-config-h-check.patch +++ /dev/null @@ -1,28 +0,0 @@ ---- a/bfd/bfd-in.h 2012-08-02 10:56:34.561769686 +0100 -+++ b/bfd/bfd-in.h 2012-08-02 11:13:27.134797755 +0100 -@@ -25,11 +25,6 @@ - #ifndef __BFD_H_SEEN__ - #define __BFD_H_SEEN__ - --/* PR 14072: Ensure that config.h is included first. */ --#if !defined PACKAGE && !defined PACKAGE_VERSION --#error config.h must be included before this header --#endif -- - #ifdef __cplusplus - extern "C" { - #endif ---- a/bfd/bfd-in2.h 2012-08-02 10:56:34.349769680 +0100 -+++ b/bfd/bfd-in2.h 2012-08-02 11:13:40.015798113 +0100 -@@ -32,11 +32,6 @@ - #ifndef __BFD_H_SEEN__ - #define __BFD_H_SEEN__ - --/* PR 14072: Ensure that config.h is included first. */ --#if !defined PACKAGE && !defined PACKAGE_VERSION --#error config.h must be included before this header --#endif -- - #ifdef __cplusplus - extern "C" { - #endif diff --git a/binutils-2.25-set-long-long.patch b/binutils-2.25-set-long-long.patch deleted file mode 100644 index 1ea7418..0000000 --- a/binutils-2.25-set-long-long.patch +++ /dev/null @@ -1,38 +0,0 @@ -diff -up binutils-2.25.orig/bfd/configure.ac binutils-2.25/bfd/configure.ac ---- binutils-2.25.orig/bfd/configure.ac 2014-12-24 10:34:45.590491143 +0000 -+++ binutils-2.25/bfd/configure.ac 2014-12-24 10:36:12.997981992 +0000 -@@ -183,11 +183,13 @@ if test "x${ac_cv_sizeof_long}" = "x8"; - BFD_HOST_64BIT_LONG=1 - test -n "${HOST_64BIT_TYPE}" || HOST_64BIT_TYPE="long" - test -n "${HOST_U_64BIT_TYPE}" || HOST_U_64BIT_TYPE="unsigned long" --elif test "x${ac_cv_sizeof_long_long}" = "x8"; then -+fi -+if test "x${ac_cv_sizeof_long_long}" = "x8"; then - BFD_HOST_64BIT_LONG_LONG=1 - test -n "${HOST_64BIT_TYPE}" || HOST_64BIT_TYPE="long long" - test -n "${HOST_U_64BIT_TYPE}" || HOST_U_64BIT_TYPE="unsigned long long" -- if test "x${ac_cv_sizeof_void_p}" = "x8"; then -+ if test "x${ac_cv_sizeof_void_p}" = "x8" \ -+ -a "x${ac_cv_sizeof_long}" != "x8"; then - BFD_HOSTPTR_T="unsigned long long" - fi - fi -diff -up ../binutils-2.20.51.0.7.original/bfd/configure ./bfd/configure ---- a/bfd/configure 2010-04-08 15:23:58.000000000 +0100 -+++ b/bfd/configure 2010-04-08 15:24:06.000000000 +0100 -@@ -12819,11 +12819,13 @@ - BFD_HOST_64BIT_LONG=1 - test -n "${HOST_64BIT_TYPE}" || HOST_64BIT_TYPE="long" - test -n "${HOST_U_64BIT_TYPE}" || HOST_U_64BIT_TYPE="unsigned long" --elif test "x${ac_cv_sizeof_long_long}" = "x8"; then -+fi -+if test "x${ac_cv_sizeof_long_long}" = "x8"; then - BFD_HOST_64BIT_LONG_LONG=1 - test -n "${HOST_64BIT_TYPE}" || HOST_64BIT_TYPE="long long" - test -n "${HOST_U_64BIT_TYPE}" || HOST_U_64BIT_TYPE="unsigned long long" -- if test "x${ac_cv_sizeof_void_p}" = "x8"; then -+ if test "x${ac_cv_sizeof_void_p}" = "x8" \ -+ -a "x${ac_cv_sizeof_long}" != "x8"; then - BFD_HOSTPTR_T="unsigned long long" - fi - fi diff --git a/binutils-2.25-version.patch b/binutils-2.25-version.patch deleted file mode 100644 index d97e81b..0000000 --- a/binutils-2.25-version.patch +++ /dev/null @@ -1,44 +0,0 @@ ---- binutils-2.26.orig/bfd/Makefile.am 2016-01-25 10:11:33.505289018 +0000 -+++ binutils-2.26/bfd/Makefile.am 2016-01-25 10:13:23.489964145 +0000 -@@ -1043,8 +1043,8 @@ DISTCLEANFILES = $(BUILD_CFILES) $(BUILD - bfdver.h: $(srcdir)/version.h $(srcdir)/development.sh $(srcdir)/Makefile.in - @echo "creating $@" - @bfd_version=`echo "$(VERSION)" | $(SED) -e 's/\([^\.]*\)\.*\([^\.]*\)\.*\([^\.]*\)\.*\([^\.]*\)\.*\([^\.]*\).*/\1.00\2.00\3.00\4.00\5/' -e 's/\([^\.]*\)\..*\(..\)\..*\(..\)\..*\(..\)\..*\(..\)$$/\1\2\3\4\5/'` ;\ -- bfd_version_string="\"$(VERSION)\"" ;\ -- bfd_soversion="$(VERSION)" ;\ -+ bfd_version_string="\"$(VERSION)-%{release}\"" ;\ -+ bfd_soversion="$(VERSION)-%{release}" ;\ - bfd_version_package="\"$(PKGVERSION)\"" ;\ - report_bugs_to="\"$(REPORT_BUGS_TO)\"" ;\ - . $(srcdir)/development.sh ;\ -@@ -1055,7 +1055,7 @@ bfdver.h: $(srcdir)/version.h $(srcdir)/ - fi ;\ - $(SED) -e "s,@bfd_version@,$$bfd_version," \ - -e "s,@bfd_version_string@,$$bfd_version_string," \ -- -e "s,@bfd_version_package@,$$bfd_version_package," \ -+ -e "s,@bfd_version_package@,\"version \"," \ - -e "s,@report_bugs_to@,$$report_bugs_to," \ - < $(srcdir)/version.h > $@; \ - echo "$${bfd_soversion}" > libtool-soversion ---- binutils-2.26.orig/bfd/Makefile.in 2016-01-25 10:11:33.505289018 +0000 -+++ binutils-2.26/bfd/Makefile.in 2016-01-25 10:14:17.818297941 +0000 -@@ -2111,8 +2111,8 @@ stmp-lcoff-h: $(LIBCOFF_H_FILES) - bfdver.h: $(srcdir)/version.h $(srcdir)/development.sh $(srcdir)/Makefile.in - @echo "creating $@" - @bfd_version=`echo "$(VERSION)" | $(SED) -e 's/\([^\.]*\)\.*\([^\.]*\)\.*\([^\.]*\)\.*\([^\.]*\)\.*\([^\.]*\).*/\1.00\2.00\3.00\4.00\5/' -e 's/\([^\.]*\)\..*\(..\)\..*\(..\)\..*\(..\)\..*\(..\)$$/\1\2\3\4\5/'` ;\ -- bfd_version_string="\"$(VERSION)\"" ;\ -- bfd_soversion="$(VERSION)" ;\ -+ bfd_version_string="\"$(VERSION)-%{release}\"" ;\ -+ bfd_soversion="$(VERSION)-%{release}" ;\ - bfd_version_package="\"$(PKGVERSION)\"" ;\ - report_bugs_to="\"$(REPORT_BUGS_TO)\"" ;\ - . $(srcdir)/development.sh ;\ -@@ -2123,7 +2123,7 @@ bfdver.h: $(srcdir)/version.h $(srcdir)/ - fi ;\ - $(SED) -e "s,@bfd_version@,$$bfd_version," \ - -e "s,@bfd_version_string@,$$bfd_version_string," \ -- -e "s,@bfd_version_package@,$$bfd_version_package," \ -+ -e "s,@bfd_version_package@,\"version \"," \ - -e "s,@report_bugs_to@,$$report_bugs_to," \ - < $(srcdir)/version.h > $@; \ - echo "$${bfd_soversion}" > libtool-soversion diff --git a/binutils-2.27-aarch64-ifunc.patch b/binutils-2.27-aarch64-ifunc.patch deleted file mode 100644 index 562ef18..0000000 --- a/binutils-2.27-aarch64-ifunc.patch +++ /dev/null @@ -1,11 +0,0 @@ -diff -rup binutils.orig/bfd/elfnn-aarch64.c binutils-2.27/bfd/elfnn-aarch64.c ---- binutils.orig/bfd/elfnn-aarch64.c 2017-02-21 10:45:19.311956006 +0000 -+++ binutils-2.27/bfd/elfnn-aarch64.c 2017-02-21 11:55:07.517922655 +0000 -@@ -4947,6 +4947,7 @@ elfNN_aarch64_final_link_relocate (reloc - it here if it is defined in a non-shared object. */ - if (h != NULL - && h->type == STT_GNU_IFUNC -+ && (input_section->flags & SEC_ALLOC) - && h->def_regular) - { - asection *plt; diff --git a/binutils-2.28-ignore-gold-duplicates.patch b/binutils-2.28-ignore-gold-duplicates.patch deleted file mode 100644 index 346f956..0000000 --- a/binutils-2.28-ignore-gold-duplicates.patch +++ /dev/null @@ -1,14 +0,0 @@ -diff -rup binutils.orig/ld/ldmain.c binutils-2.28/ld/ldmain.c ---- binutils.orig/ld/ldmain.c 2017-06-09 09:08:26.954016429 +0100 -+++ binutils-2.28/ld/ldmain.c 2017-06-09 09:09:11.307490976 +0100 -@@ -923,6 +923,10 @@ multiple_definition (struct bfd_link_inf - obfd = h->u.def.section->owner; - break; - case bfd_link_hash_indirect: -+ /* PR 21074: The GOLD linker can produce multiple indirect -+ refences to the same symbol. These can be ignored. */ -+ if (bfd_is_ind_section (nsec)) -+ return; - osec = bfd_ind_section_ptr; - oval = 0; - obfd = NULL; diff --git a/binutils-2.29-filename-in-error-messages.patch b/binutils-2.29-filename-in-error-messages.patch deleted file mode 100644 index 60750a1..0000000 --- a/binutils-2.29-filename-in-error-messages.patch +++ /dev/null @@ -1,123 +0,0 @@ ---- binutils.orig/binutils/readelf.c 2020-07-24 14:55:25.163647522 +0100 -+++ binutils-2.35/binutils/readelf.c 2020-07-24 15:02:39.613851369 +0100 -@@ -20729,79 +20729,92 @@ process_file (char * file_name) - Filedata * filedata = NULL; - struct stat statbuf; - char armag[SARMAG]; -- bfd_boolean ret = TRUE; -+ bfd_boolean ret = FALSE; -+ char * name; -+ char * saved_program_name; -+ -+ /* Overload program_name to include file_name. Doing this means -+ that warning/error messages will positively identify the file -+ concerned even when multiple instances of readelf are running. */ -+ name = xmalloc (strlen (program_name) + strlen (file_name) + 3); -+ sprintf (name, "%s: %s", program_name, file_name); -+ saved_program_name = program_name; -+ program_name = name; - - if (stat (file_name, &statbuf) < 0) - { - if (errno == ENOENT) -- error (_("'%s': No such file\n"), file_name); -+ error (_("No such file\n")); - else -- error (_("Could not locate '%s'. System error message: %s\n"), -- file_name, strerror (errno)); -- return FALSE; -+ error (_("Could not locate file. System error message: %s\n"), -+ strerror (errno)); -+ goto done; - } - - if (! S_ISREG (statbuf.st_mode)) - { -- error (_("'%s' is not an ordinary file\n"), file_name); -- return FALSE; -+ error (_("Not an ordinary file\n")); -+ goto done; - } - - filedata = calloc (1, sizeof * filedata); - if (filedata == NULL) - { - error (_("Out of memory allocating file data structure\n")); -- return FALSE; -+ goto done; - } - - filedata->file_name = file_name; - filedata->handle = fopen (file_name, "rb"); - if (filedata->handle == NULL) - { -- error (_("Input file '%s' is not readable.\n"), file_name); -- free (filedata); -- return FALSE; -+ error (_("Not readable\n")); -+ goto done; - } - - if (fread (armag, SARMAG, 1, filedata->handle) != 1) - { -- error (_("%s: Failed to read file's magic number\n"), file_name); -+ error (_("Failed to read file's magic number\n")); - fclose (filedata->handle); -- free (filedata); -- return FALSE; -+ goto done; - } - - filedata->file_size = (bfd_size_type) statbuf.st_size; - - if (memcmp (armag, ARMAG, SARMAG) == 0) - { -- if (! process_archive (filedata, FALSE)) -- ret = FALSE; -+ if (process_archive (filedata, FALSE)) -+ ret = TRUE; - } - else if (memcmp (armag, ARMAGT, SARMAG) == 0) - { -- if ( ! process_archive (filedata, TRUE)) -- ret = FALSE; -+ if (process_archive (filedata, TRUE)) -+ ret = TRUE; - } - else - { - if (do_archive_index && !check_all) -- error (_("File %s is not an archive so its index cannot be displayed.\n"), -- file_name); -+ error (_("Not an archive so its index cannot be displayed.\n")); - - rewind (filedata->handle); - filedata->archive_file_size = filedata->archive_file_offset = 0; - -- if (! process_object (filedata)) -- ret = FALSE; -+ if (process_object (filedata)) -+ ret = TRUE; - } - -- fclose (filedata->handle); -- free (filedata->section_headers); -- free (filedata->program_headers); -- free (filedata->string_table); -- free (filedata->dump.dump_sects); -- free (filedata); -+ done: -+ if (filedata) -+ { -+ fclose (filedata->handle); -+ free (filedata->section_headers); -+ free (filedata->program_headers); -+ free (filedata->string_table); -+ free (filedata->dump.dump_sects); -+ free (filedata); -+ } -+ free (program_name); -+ program_name = saved_program_name; - - free (ba_cache.strtab); - ba_cache.strtab = NULL; diff --git a/binutils-2.29-revert-PLT-elision.patch b/binutils-2.29-revert-PLT-elision.patch deleted file mode 100644 index 746a551..0000000 --- a/binutils-2.29-revert-PLT-elision.patch +++ /dev/null @@ -1,265 +0,0 @@ -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-bnd.dd binutils-2.29.1/ld/testsuite/ld-x86-64/plt-main-bnd.dd ---- binutils.orig/ld/testsuite/ld-x86-64/plt-main-bnd.dd 2017-11-15 13:32:39.405064420 +0000 -+++ binutils-2.29.1/ld/testsuite/ld-x86-64/plt-main-bnd.dd 2017-11-15 15:06:53.694623801 +0000 -@@ -1,7 +1,4 @@ --#... --Disassembly of section .plt.got: - --[a-f0-9]+ <[a-z_]+@plt>: --[ ]*[a-f0-9]+: f2 ff 25 .. .. 20 00 bnd jmpq \*0x20....\(%rip\) # ...... <.*> -+#... - [ ]*[a-f0-9]+: 90 nop - #pass -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 - plt_entry_size = htab->plt.plt_entry_size; - - resolved_to_zero = UNDEFINED_WEAK_RESOLVED_TO_ZERO (info, eh); -- -+#if 0 - /* We can't use the GOT PLT if pointer equality is needed since - finish_dynamic_symbol won't clear symbol value and the dynamic - linker won't update the GOT slot. We will get into an infinite -@@ -125,7 +125,7 @@ elf_x86_allocate_dynrelocs (struct elf_l - /* Use the GOT PLT. */ - eh->plt_got.refcount = 1; - } -- -+#endif - /* Since STT_GNU_IFUNC symbol must go through PLT, we handle it - here if it is defined and referenced in a non-shared object. */ - if (h->type == STT_GNU_IFUNC ---- binutils.orig/ld/testsuite/ld-i386/pr20830.d 2018-07-09 09:49:51.277239857 +0100 -+++ binutils-2.30.90/ld/testsuite/ld-i386/pr20830.d 2018-07-09 10:32:41.113356733 +0100 -@@ -19,7 +19,7 @@ Contents of the .eh_frame section: - DW_CFA_offset: r8 \(eip\) at cfa-4 - DW_CFA_nop - DW_CFA_nop -- -+#pass - 0+18 00000010 0000001c FDE cie=00000000 pc=00000128..00000133 - DW_CFA_nop - DW_CFA_nop ---- binutils.orig/ld/testsuite/ld-x86-64/plt-main-ibt.dd 2020-07-24 14:55:25.370646189 +0100 -+++ binutils-2.35/ld/testsuite/ld-x86-64/plt-main-ibt.dd 2020-07-24 15:06:58.124189348 +0100 -@@ -1,7 +1,3 @@ - #... --Disassembly of section .plt.got: -- --[a-f0-9]+ <[_a-z]+@plt>: - [ ]*[a-f0-9]+: f3 0f 1e fa endbr64 --[ ]*[a-f0-9]+: f2 ff 25 .. .. 20 00 bnd jmpq \*0x20....\(%rip\) # ...... <.*> - #pass diff --git a/binutils-CVE-2019-1010204.patch b/binutils-CVE-2019-1010204.patch deleted file mode 100644 index 56434b1..0000000 --- a/binutils-CVE-2019-1010204.patch +++ /dev/null @@ -1,15 +0,0 @@ ---- binutils.orig/gold/fileread.cc 2019-08-06 14:22:08.669313110 +0100 -+++ binutils-2.32/gold/fileread.cc 2019-08-06 14:22:28.799177543 +0100 -@@ -381,6 +381,12 @@ File_read::do_read(off_t start, section_ - ssize_t bytes; - if (this->whole_file_view_ != NULL) - { -+ // See PR 23765 for an example of a testcase that triggers this error. -+ if (((ssize_t) start) < 0) -+ gold_fatal(_("%s: read failed, starting offset (%#llx) less than zero"), -+ this->filename().c_str(), -+ static_cast(start)); -+ - bytes = this->size_ - start; - if (static_cast(bytes) >= size) - { diff --git a/binutils-CVE-2021-20197.patch b/binutils-CVE-2021-20197.patch deleted file mode 100644 index 4e9be45..0000000 --- a/binutils-CVE-2021-20197.patch +++ /dev/null @@ -1,778 +0,0 @@ -diff -rup binutils.orig/bfd/bfd-in2.h binutils-2.35.1/bfd/bfd-in2.h ---- binutils.orig/bfd/bfd-in2.h 2021-01-29 11:14:51.848568548 +0000 -+++ binutils-2.35.1/bfd/bfd-in2.h 2021-01-29 11:15:33.431322133 +0000 -@@ -583,6 +583,8 @@ bfd *bfd_openr (const char *filename, co - - bfd *bfd_fdopenr (const char *filename, const char *target, int fd); - -+bfd *bfd_fdopenw (const char *filename, const char *target, int fd); -+ - bfd *bfd_openstreamr (const char * filename, const char * target, - void * stream); - -diff -rup binutils.orig/bfd/opncls.c binutils-2.35.1/bfd/opncls.c ---- binutils.orig/bfd/opncls.c 2021-01-29 11:14:51.846568560 +0000 -+++ binutils-2.35.1/bfd/opncls.c 2021-01-29 11:15:33.431322133 +0000 -@@ -395,6 +395,39 @@ bfd_fdopenr (const char *filename, const - - /* - FUNCTION -+ bfd_fdopenw -+ -+SYNOPSIS -+ bfd *bfd_fdopenw (const char *filename, const char *target, int fd); -+ -+DESCRIPTION -+ <> is exactly like <> with the exception that -+ the resulting BFD is suitable for output. -+*/ -+ -+bfd * -+bfd_fdopenw (const char *filename, const char *target, int fd) -+{ -+ bfd *out = bfd_fdopenr (filename, target, fd); -+ -+ if (out != NULL) -+ { -+ if (!bfd_write_p (out)) -+ { -+ close (fd); -+ _bfd_delete_bfd (out); -+ out = NULL; -+ bfd_set_error (bfd_error_invalid_operation); -+ } -+ else -+ out->direction = write_direction; -+ } -+ -+ return out; -+} -+ -+/* -+FUNCTION - bfd_openstreamr - - SYNOPSIS -diff -rup binutils.orig/binutils/ar.c binutils-2.35.1/binutils/ar.c ---- binutils.orig/binutils/ar.c 2021-01-29 11:14:51.344571539 +0000 -+++ binutils-2.35.1/binutils/ar.c 2021-01-29 11:15:56.174187367 +0000 -@@ -25,6 +25,7 @@ - - #include "sysdep.h" - #include "bfd.h" -+#include "libbfd.h" - #include "libiberty.h" - #include "progress.h" - #include "getopt.h" -@@ -1195,20 +1196,26 @@ write_archive (bfd *iarch) - bfd *obfd; - char *old_name, *new_name; - bfd *contents_head = iarch->archive_next; -+ int ofd = -1; -+ struct stat target_stat; -+ bfd_boolean skip_stat = FALSE; - - old_name = (char *) xmalloc (strlen (bfd_get_filename (iarch)) + 1); - strcpy (old_name, bfd_get_filename (iarch)); -- new_name = make_tempname (old_name); -+ new_name = make_tempname (old_name, &ofd); - - if (new_name == NULL) - bfd_fatal (_("could not create temporary file whilst writing archive")); - - output_filename = new_name; - -- obfd = bfd_openw (new_name, bfd_get_target (iarch)); -+ obfd = bfd_fdopenw (new_name, bfd_get_target (iarch), ofd); - - if (obfd == NULL) -- bfd_fatal (old_name); -+ { -+ close (ofd); -+ bfd_fatal (old_name); -+ } - - output_bfd = obfd; - -@@ -1237,6 +1244,14 @@ write_archive (bfd *iarch) - if (!bfd_set_archive_head (obfd, contents_head)) - bfd_fatal (old_name); - -+#if !defined (_WIN32) || defined (__CYGWIN32__) -+ ofd = dup (ofd); -+ if (iarch == NULL || iarch->iostream == NULL) -+ skip_stat = TRUE; -+ else if (ofd == -1 || fstat (fileno (iarch->iostream), &target_stat) != 0) -+ bfd_fatal (old_name); -+#endif -+ - if (!bfd_close (obfd)) - bfd_fatal (old_name); - -@@ -1246,7 +1261,7 @@ write_archive (bfd *iarch) - /* We don't care if this fails; we might be creating the archive. */ - bfd_close (iarch); - -- if (smart_rename (new_name, old_name, 0) != 0) -+ if (smart_rename (new_name, old_name, ofd, skip_stat ? NULL : &target_stat, 0) != 0) - xexit (1); - free (old_name); - free (new_name); -diff -rup binutils.orig/binutils/arsup.c binutils-2.35.1/binutils/arsup.c ---- binutils.orig/binutils/arsup.c 2021-01-29 11:14:51.350571503 +0000 -+++ binutils-2.35.1/binutils/arsup.c 2021-01-29 11:15:56.174187367 +0000 -@@ -345,13 +345,25 @@ ar_save (void) - else - { - char *ofilename = xstrdup (bfd_get_filename (obfd)); -+ bfd_boolean skip_stat = FALSE; -+ struct stat target_stat; -+ int ofd = -1; - - if (deterministic > 0) - obfd->flags |= BFD_DETERMINISTIC_OUTPUT; - -+#if !defined (_WIN32) || defined (__CYGWIN32__) -+ /* It's OK to fail; at worst it will result in SMART_RENAME using a slow -+ copy fallback to write the output. */ -+ ofd = dup (fileno (obfd->iostream)); -+ if (lstat (real_name, &target_stat) != 0) -+ skip_stat = TRUE; -+#endif -+ - bfd_close (obfd); - -- smart_rename (ofilename, real_name, 0); -+ smart_rename (ofilename, real_name, ofd, -+ skip_stat ? NULL : &target_stat, 0); - obfd = 0; - free (ofilename); - } -diff -rup binutils.orig/binutils/bucomm.c binutils-2.35.1/binutils/bucomm.c ---- binutils.orig/binutils/bucomm.c 2021-01-29 11:14:51.422571073 +0000 -+++ binutils-2.35.1/binutils/bucomm.c 2021-01-29 11:15:33.431322133 +0000 -@@ -532,7 +532,7 @@ template_in_dir (const char *path) - as FILENAME. */ - - char * --make_tempname (const char *filename) -+make_tempname (const char *filename, int *ofd) - { - char *tmpname = template_in_dir (filename); - int fd; -@@ -550,7 +550,7 @@ make_tempname (const char *filename) - free (tmpname); - return NULL; - } -- close (fd); -+ *ofd = fd; - return tmpname; - } - -diff -rup binutils.orig/binutils/bucomm.h binutils-2.35.1/binutils/bucomm.h ---- binutils.orig/binutils/bucomm.h 2021-01-29 11:14:51.350571503 +0000 -+++ binutils-2.35.1/binutils/bucomm.h 2021-01-29 11:15:56.174187367 +0000 -@@ -51,7 +51,7 @@ int display_info (void); - - void print_arelt_descr (FILE *, bfd *, bfd_boolean, bfd_boolean); - --char *make_tempname (const char *); -+char *make_tempname (const char *, int *); - char *make_tempdir (const char *); - - bfd_vma parse_vma (const char *, const char *); -@@ -71,7 +71,8 @@ extern void print_version (const char *) - /* In rename.c. */ - extern void set_times (const char *, const struct stat *); - --extern int smart_rename (const char *, const char *, int); -+extern int smart_rename (const char *, const char *, int, struct stat *, int); -+ - - /* In libiberty. */ - void *xmalloc (size_t); -diff -rup binutils.orig/binutils/objcopy.c binutils-2.35.1/binutils/objcopy.c ---- binutils.orig/binutils/objcopy.c 2021-01-29 11:14:51.342571551 +0000 -+++ binutils-2.35.1/binutils/objcopy.c 2021-01-29 11:15:56.175187361 +0000 -@@ -20,6 +20,7 @@ - - #include "sysdep.h" - #include "bfd.h" -+#include "libbfd.h" - #include "progress.h" - #include "getopt.h" - #include "libiberty.h" -@@ -3711,9 +3712,9 @@ set_long_section_mode (bfd *output_bfd, - /* The top-level control. */ - - static void --copy_file (const char *input_filename, const char *output_filename, -- const char *input_target, const char *output_target, -- const bfd_arch_info_type *input_arch) -+copy_file (const char *input_filename, const char *output_filename, int ofd, -+ struct stat *in_stat, const char *input_target, -+ const char *output_target, const bfd_arch_info_type *input_arch) - { - bfd *ibfd; - char **obj_matching; -@@ -3732,7 +3733,7 @@ copy_file (const char *input_filename, c - /* To allow us to do "strip *" without dying on the first - non-object file, failures are nonfatal. */ - ibfd = bfd_openr (input_filename, input_target); -- if (ibfd == NULL) -+ if (ibfd == NULL || fstat (fileno (ibfd->iostream), in_stat) != 0) - { - bfd_nonfatal_message (input_filename, NULL, NULL, NULL); - status = 1; -@@ -3786,9 +3787,14 @@ copy_file (const char *input_filename, c - else - force_output_target = TRUE; - -- obfd = bfd_openw (output_filename, output_target); -+ if (ofd >= 0) -+ obfd = bfd_fdopenw (output_filename, output_target, ofd); -+ else -+ obfd = bfd_openw (output_filename, output_target); -+ - if (obfd == NULL) - { -+ close (ofd); - bfd_nonfatal_message (output_filename, NULL, NULL, NULL); - status = 1; - return; -@@ -3816,13 +3822,19 @@ copy_file (const char *input_filename, c - if (output_target == NULL) - output_target = bfd_get_target (ibfd); - -- obfd = bfd_openw (output_filename, output_target); -+ if (ofd >= 0) -+ obfd = bfd_fdopenw (output_filename, output_target, ofd); -+ else -+ obfd = bfd_openw (output_filename, output_target); -+ - if (obfd == NULL) - { -+ close (ofd); - bfd_nonfatal_message (output_filename, NULL, NULL, NULL); - status = 1; - return; - } -+ - /* This is a no-op on non-Coff targets. */ - set_long_section_mode (obfd, ibfd, long_section_names); - -@@ -4786,6 +4798,8 @@ strip_main (int argc, char *argv[]) - int hold_status = status; - struct stat statbuf; - char *tmpname; -+ int tmpfd = -1; -+ int copyfd = -1; - - if (get_file_size (argv[i]) < 1) - { -@@ -4793,18 +4807,18 @@ strip_main (int argc, char *argv[]) - continue; - } - -- if (preserve_dates) -- /* No need to check the return value of stat(). -- It has already been checked in get_file_size(). */ -- stat (argv[i], &statbuf); -- - if (output_file == NULL - || filename_cmp (argv[i], output_file) == 0) -- tmpname = make_tempname (argv[i]); -+ tmpname = make_tempname (argv[i], &tmpfd); - else - tmpname = output_file; - -- if (tmpname == NULL) -+ if (tmpname == NULL -+#if !defined (_WIN32) || defined (__CYGWIN32__) -+ /* Retain a copy of TMPFD since we will need it for SMART_RENAME. */ -+ || (tmpfd >= 0 && (copyfd = dup (tmpfd)) == -1) -+#endif -+ ) - { - bfd_nonfatal_message (argv[i], NULL, NULL, - _("could not create temporary file to hold stripped copy")); -@@ -4813,7 +4827,8 @@ strip_main (int argc, char *argv[]) - } - - status = 0; -- copy_file (argv[i], tmpname, input_target, output_target, NULL); -+ copy_file (argv[i], tmpname, tmpfd, &statbuf, input_target, -+ output_target, NULL); - if (status == 0) - { - if (preserve_dates) -@@ -4821,12 +4836,18 @@ strip_main (int argc, char *argv[]) - if (output_file != tmpname) - status = (smart_rename (tmpname, - output_file ? output_file : argv[i], -- preserve_dates) != 0); -+ copyfd, &statbuf, preserve_dates) != 0); - if (status == 0) - status = hold_status; - } - else -- unlink_if_ordinary (tmpname); -+ { -+#if !defined (_WIN32) || defined (__CYGWIN32__) -+ if (copyfd >= 0) -+ close (copyfd); -+#endif -+ unlink_if_ordinary (tmpname); -+ } - if (output_file != tmpname) - free (tmpname); - } -@@ -5033,7 +5054,8 @@ copy_main (int argc, char *argv[]) - bfd_boolean formats_info = FALSE; - bfd_boolean use_globalize = FALSE; - bfd_boolean use_keep_global = FALSE; -- int c; -+ int c, tmpfd = -1; -+ int copyfd = -1; - struct stat statbuf; - const bfd_arch_info_type *input_arch = NULL; - -@@ -5870,34 +5892,43 @@ copy_main (int argc, char *argv[]) - convert_efi_target (efi); - } - -- if (preserve_dates) -- if (stat (input_filename, & statbuf) < 0) -- fatal (_("warning: could not locate '%s'. System error message: %s"), -- input_filename, strerror (errno)); -- - /* If there is no destination file, or the source and destination files - are the same, then create a temp and rename the result into the input. */ - if (output_filename == NULL - || filename_cmp (input_filename, output_filename) == 0) -- tmpname = make_tempname (input_filename); -+ tmpname = make_tempname (input_filename, &tmpfd); - else - tmpname = output_filename; - -- if (tmpname == NULL) -- fatal (_("warning: could not create temporary file whilst copying '%s', (error: %s)"), -- input_filename, strerror (errno)); -+ if (tmpname == NULL -+#if !defined (_WIN32) || defined (__CYGWIN32__) -+ /* Retain a copy of TMPFD since we will need it for SMART_RENAME. */ -+ || (tmpfd >= 0 && (copyfd = dup (tmpfd)) == -1) -+#endif -+ ) -+ { -+ fatal (_("warning: could not create temporary file whilst copying '%s', (error: %s)"), -+ input_filename, strerror (errno)); -+ } - -- copy_file (input_filename, tmpname, input_target, output_target, input_arch); -+ copy_file (input_filename, tmpname, tmpfd, &statbuf, input_target, -+ output_target, input_arch); - if (status == 0) - { - if (preserve_dates) - set_times (tmpname, &statbuf); - if (tmpname != output_filename) -- status = (smart_rename (tmpname, input_filename, -+ status = (smart_rename (tmpname, input_filename, copyfd, &statbuf, - preserve_dates) != 0); - } - else -- unlink_if_ordinary (tmpname); -+ { -+#if !defined (_WIN32) || defined (__CYGWIN32__) -+ if (copyfd >= 0) -+ close (copyfd); -+#endif -+ unlink_if_ordinary (tmpname); -+ } - - if (tmpname != output_filename) - free (tmpname); -diff -rup binutils.orig/binutils/rename.c binutils-2.35.1/binutils/rename.c ---- binutils.orig/binutils/rename.c 2021-01-29 11:14:51.422571073 +0000 -+++ binutils-2.35.1/binutils/rename.c 2021-01-29 11:15:56.175187361 +0000 -@@ -131,17 +131,55 @@ set_times (const char *destination, cons - #endif - #endif - --/* Rename FROM to TO, copying if TO is a link. -- Return 0 if ok, -1 if error. */ -+#if !defined (_WIN32) || defined (__CYGWIN32__) -+/* Try to preserve the permission bits and ownership of an existing file when -+ rename overwrites it. FD is the file being renamed and TARGET_STAT has the -+ status of the file that was overwritten. */ -+static void -+try_preserve_permissions (int fd, struct stat *target_stat) -+{ -+ struct stat from_stat; -+ int ret = 0; -+ -+ if (fstat (fd, &from_stat) != 0) -+ return; -+ -+ int from_mode = from_stat.st_mode & 0777; -+ int to_mode = target_stat->st_mode & 0777; -+ -+ /* Fix up permissions before we potentially lose ownership with fchown. -+ Clear the setxid bits because in case the fchown below fails then we don't -+ want to end up with a sxid file owned by the invoking user. If the user -+ hasn't changed or if fchown succeeded, we add back the sxid bits at the -+ end. */ -+ if (from_mode != to_mode) -+ fchmod (fd, to_mode); -+ -+ /* Fix up ownership, this will clear the setxid bits. */ -+ if (from_stat.st_uid != target_stat->st_uid -+ || from_stat.st_gid != target_stat->st_gid) -+ ret = fchown (fd, target_stat->st_uid, target_stat->st_gid); -+ -+ /* Fix up the sxid bits if either the fchown wasn't needed or it -+ succeeded. */ -+ if (ret == 0) -+ fchmod (fd, target_stat->st_mode & 07777); -+} -+#endif -+ -+/* Rename FROM to TO, copying if TO is either a link or is not a regular file. -+ FD is an open file descriptor pointing to FROM that we can use to safely fix -+ up permissions of the file after renaming. TARGET_STAT has the file status -+ that is used to fix up permissions and timestamps after rename. Return 0 if -+ ok, -1 if error and FD is closed before returning. */ - - int --smart_rename (const char *from, const char *to, int preserve_dates ATTRIBUTE_UNUSED) -+smart_rename (const char *from, const char *to, int fd ATTRIBUTE_UNUSED, -+ struct stat *target_stat ATTRIBUTE_UNUSED, -+ int preserve_dates ATTRIBUTE_UNUSED) - { -- bfd_boolean exists; -- struct stat s; - int ret = 0; -- -- exists = lstat (to, &s) == 0; -+ bfd_boolean exists = target_stat != NULL; - - #if defined (_WIN32) && !defined (__CYGWIN32__) - /* Win32, unlike unix, will not erase `to' in `rename(from, to)' but -@@ -158,36 +196,35 @@ smart_rename (const char *from, const ch - unlink (from); - } - #else -- /* Use rename only if TO is not a symbolic link and has -- only one hard link, and we have permission to write to it. */ -+ /* Avoid a full copy and use rename if we can fix up permissions of the -+ file after renaming, i.e.: -+ -+ - TO is not a symbolic link -+ - TO is a regular file with only one hard link -+ - We have permission to write to TO -+ - FD is available to safely fix up permissions to be the same as the file -+ we overwrote with the rename. -+ -+ Note though that the actual file on disk that TARGET_STAT describes may -+ have changed and we're only trying to preserve the status we know about. -+ At no point do we try to interact with the new file changes, so there can -+ only be two outcomes, i.e. either the external file change survives -+ without knowledge of our change (if it happens after the rename syscall) -+ or our rename and permissions fixup survive without any knowledge of the -+ external change. */ - if (! exists -- || (!S_ISLNK (s.st_mode) -- && S_ISREG (s.st_mode) -- && (s.st_mode & S_IWUSR) -- && s.st_nlink == 1) -+ || (fd >= 0 -+ && !S_ISLNK (target_stat->st_mode) -+ && S_ISREG (target_stat->st_mode) -+ && (target_stat->st_mode & S_IWUSR) -+ && target_stat->st_nlink == 1) - ) - { - ret = rename (from, to); - if (ret == 0) - { - if (exists) -- { -- /* Try to preserve the permission bits and ownership of -- TO. First get the mode right except for the setuid -- bit. Then change the ownership. Then fix the setuid -- bit. We do the chmod before the chown because if the -- chown succeeds, and we are a normal user, we won't be -- able to do the chmod afterward. We don't bother to -- fix the setuid bit first because that might introduce -- a fleeting security problem, and because the chown -- will clear the setuid bit anyhow. We only fix the -- setuid bit if the chown succeeds, because we don't -- want to introduce an unexpected setuid file owned by -- the user running objcopy. */ -- chmod (to, s.st_mode & 0777); -- if (chown (to, s.st_uid, s.st_gid) >= 0) -- chmod (to, s.st_mode & 07777); -- } -+ try_preserve_permissions (fd, target_stat); - } - else - { -@@ -203,9 +240,11 @@ smart_rename (const char *from, const ch - non_fatal (_("unable to copy file '%s'; reason: %s"), to, strerror (errno)); - - if (preserve_dates) -- set_times (to, &s); -+ set_times (to, target_stat); - unlink (from); - } -+ if (fd >= 0) -+ close (fd); - #endif /* _WIN32 && !__CYGWIN32__ */ - - return ret; -diff -rup binutils.orig/binutils/ar.c binutils-2.35.1/binutils/ar.c ---- binutils.orig/binutils/ar.c 2021-02-02 13:01:42.257734944 +0000 -+++ binutils-2.35.1/binutils/ar.c 2021-02-02 13:11:13.340958352 +0000 -@@ -25,7 +25,6 @@ - - #include "sysdep.h" - #include "bfd.h" --#include "libbfd.h" - #include "libiberty.h" - #include "progress.h" - #include "getopt.h" -@@ -1082,7 +1081,7 @@ open_output_file (bfd * abfd) - output_filename, base); - output_filename = base; - } -- -+ - if (output_dir) - { - size_t len = strlen (output_dir); -@@ -1099,7 +1098,7 @@ open_output_file (bfd * abfd) - - if (verbose) - printf ("x - %s\n", output_filename); -- -+ - FILE * ostream = fopen (output_filename, FOPEN_WB); - if (ostream == NULL) - { -@@ -1198,10 +1197,8 @@ write_archive (bfd *iarch) - bfd *contents_head = iarch->archive_next; - int ofd = -1; - struct stat target_stat; -- bfd_boolean skip_stat = FALSE; - -- old_name = (char *) xmalloc (strlen (bfd_get_filename (iarch)) + 1); -- strcpy (old_name, bfd_get_filename (iarch)); -+ old_name = xstrdup (bfd_get_filename (iarch)); - new_name = make_tempname (old_name, &ofd); - - if (new_name == NULL) -@@ -1246,11 +1243,9 @@ write_archive (bfd *iarch) - - #if !defined (_WIN32) || defined (__CYGWIN32__) - ofd = dup (ofd); -- if (iarch == NULL || iarch->iostream == NULL) -- skip_stat = TRUE; -- else if (ofd == -1 || fstat (fileno (iarch->iostream), &target_stat) != 0) -- bfd_fatal (old_name); - #endif -+ if (ofd == -1 || bfd_stat (iarch, &target_stat) != 0) -+ bfd_fatal (old_name); - - if (!bfd_close (obfd)) - bfd_fatal (old_name); -@@ -1261,7 +1256,7 @@ write_archive (bfd *iarch) - /* We don't care if this fails; we might be creating the archive. */ - bfd_close (iarch); - -- if (smart_rename (new_name, old_name, ofd, skip_stat ? NULL : &target_stat, 0) != 0) -+ if (smart_rename (new_name, old_name, ofd, &target_stat, 0) != 0) - xexit (1); - free (old_name); - free (new_name); -Only in binutils-2.35.1/binutils/: ar.c.orig -Only in binutils-2.35.1/binutils/: ar.c.rej -diff -rup binutils.orig/binutils/arsup.c binutils-2.35.1/binutils/arsup.c ---- binutils.orig/binutils/arsup.c 2021-02-02 13:01:42.208735269 +0000 -+++ binutils-2.35.1/binutils/arsup.c 2021-02-02 13:11:55.725678308 +0000 -@@ -42,6 +42,8 @@ extern int deterministic; - - static bfd *obfd; - static char *real_name; -+static char *temp_name; -+static int real_ofd; - static FILE *outfile; - - static void -@@ -149,27 +151,24 @@ maybequit (void) - void - ar_open (char *name, int t) - { -- char *tname; -- const char *bname = lbasename (name); -- real_name = name; -- -- /* Prepend tmp- to the beginning, to avoid file-name clashes after -- truncation on filesystems with limited namespaces (DOS). */ -- if (asprintf (&tname, "%.*stmp-%s", (int) (bname - name), name, bname) == -1) -+ real_name = xstrdup (name); -+ temp_name = make_tempname (real_name, &real_ofd); -+ -+ if (temp_name == NULL) - { -- fprintf (stderr, _("%s: Can't allocate memory for temp name (%s)\n"), -+ fprintf (stderr, _("%s: Can't open temporary file (%s)\n"), - program_name, strerror(errno)); - maybequit (); - return; - } - -- obfd = bfd_openw (tname, NULL); -+ obfd = bfd_fdopenw (temp_name, NULL, real_ofd); - - if (!obfd) - { - fprintf (stderr, - _("%s: Can't open output archive %s\n"), -- program_name, tname); -+ program_name, temp_name); - - maybequit (); - } -@@ -344,10 +343,9 @@ ar_save (void) - } - else - { -- char *ofilename = xstrdup (bfd_get_filename (obfd)); - bfd_boolean skip_stat = FALSE; - struct stat target_stat; -- int ofd = -1; -+ int ofd = real_ofd; - - if (deterministic > 0) - obfd->flags |= BFD_DETERMINISTIC_OUTPUT; -@@ -355,17 +353,18 @@ ar_save (void) - #if !defined (_WIN32) || defined (__CYGWIN32__) - /* It's OK to fail; at worst it will result in SMART_RENAME using a slow - copy fallback to write the output. */ -- ofd = dup (fileno (obfd->iostream)); -- if (lstat (real_name, &target_stat) != 0) -- skip_stat = TRUE; -+ ofd = dup (ofd); - #endif -- - bfd_close (obfd); - -- smart_rename (ofilename, real_name, ofd, -+ if (ofd == -1 || fstat (ofd, &target_stat) != 0) -+ skip_stat = TRUE; -+ -+ smart_rename (temp_name, real_name, ofd, - skip_stat ? NULL : &target_stat, 0); - obfd = 0; -- free (ofilename); -+ free (temp_name); -+ free (real_name); - } - } - -Only in binutils-2.35.1/binutils/: arsup.c.orig -Only in binutils-2.35.1/binutils/: arsup.c.rej -diff -rup binutils.orig/binutils/objcopy.c binutils-2.35.1/binutils/objcopy.c ---- binutils.orig/binutils/objcopy.c 2021-02-02 13:01:42.214735229 +0000 -+++ binutils-2.35.1/binutils/objcopy.c 2021-02-02 13:13:27.613071192 +0000 -@@ -20,7 +20,6 @@ - - #include "sysdep.h" - #include "bfd.h" --#include "libbfd.h" - #include "progress.h" - #include "getopt.h" - #include "libiberty.h" -@@ -3733,7 +3732,7 @@ copy_file (const char *input_filename, c - /* To allow us to do "strip *" without dying on the first - non-object file, failures are nonfatal. */ - ibfd = bfd_openr (input_filename, input_target); -- if (ibfd == NULL || fstat (fileno (ibfd->iostream), in_stat) != 0) -+ if (ibfd == NULL || bfd_stat (ibfd, in_stat) != 0) - { - bfd_nonfatal_message (input_filename, NULL, NULL, NULL); - status = 1; -Only in binutils-2.35.1/binutils/: objcopy.c.orig -Only in binutils-2.35.1/binutils/: objcopy.c.rej ---- binutils.orig/binutils/arsup.c 2021-02-04 10:42:03.265729780 +0000 -+++ binutils-2.35.1/binutils/arsup.c 2021-02-04 10:45:48.439166658 +0000 -@@ -357,8 +357,21 @@ ar_save (void) - #endif - bfd_close (obfd); - -- if (ofd == -1 || fstat (ofd, &target_stat) != 0) -- skip_stat = TRUE; -+ if (lstat (real_name, &target_stat) != 0) -+ { -+ /* The temp file created in ar_open has mode 0600 as per mkstemp. -+ Create the real empty output file here so smart_rename will -+ update the mode according to the process umask. */ -+ obfd = bfd_openw (real_name, NULL); -+ if (obfd == NULL -+ || bfd_stat (obfd, &target_stat) != 0) -+ skip_stat = TRUE; -+ if (obfd != NULL) -+ { -+ bfd_set_format (obfd, bfd_archive); -+ bfd_close (obfd); -+ } -+ } - - smart_rename (temp_name, real_name, ofd, - skip_stat ? NULL : &target_stat, 0); ---- binutils.orig/binutils/rename.c 2021-02-08 11:02:58.767933783 +0000 -+++ binutils-2.35.1/binutils/rename.c 2021-02-08 11:20:37.539179363 +0000 -@@ -179,7 +179,10 @@ smart_rename (const char *from, const ch - int preserve_dates ATTRIBUTE_UNUSED) - { - int ret = 0; -- bfd_boolean exists = target_stat != NULL; -+ struct stat to_stat; -+ bfd_boolean exists; -+ -+ exists = lstat (to, &to_stat) == 0; - - #if defined (_WIN32) && !defined (__CYGWIN32__) - /* Win32, unlike unix, will not erase `to' in `rename(from, to)' but -@@ -214,16 +217,16 @@ smart_rename (const char *from, const ch - external change. */ - if (! exists - || (fd >= 0 -- && !S_ISLNK (target_stat->st_mode) -- && S_ISREG (target_stat->st_mode) -- && (target_stat->st_mode & S_IWUSR) -- && target_stat->st_nlink == 1) -+ && !S_ISLNK (to_stat.st_mode) -+ && S_ISREG (to_stat.st_mode) -+ && (to_stat.st_mode & S_IWUSR) -+ && to_stat.st_nlink == 1) - ) - { - ret = rename (from, to); - if (ret == 0) - { -- if (exists) -+ if (exists && target_stat != NULL) - try_preserve_permissions (fd, target_stat); - } - else -@@ -239,7 +242,7 @@ smart_rename (const char *from, const ch - if (ret != 0) - non_fatal (_("unable to copy file '%s'; reason: %s"), to, strerror (errno)); - -- if (preserve_dates) -+ if (preserve_dates && target_stat != NULL) - set_times (to, target_stat); - unlink (from); - } diff --git a/binutils-PELC-licence-corrections.patch b/binutils-PELC-licence-corrections.patch deleted file mode 100644 index e6bf2fe..0000000 --- a/binutils-PELC-licence-corrections.patch +++ /dev/null @@ -1,9 +0,0 @@ ---- binutils.orig/gold/ftruncate.c 2020-07-24 15:12:47.000947859 +0100 -+++ binutils-2.35/gold/ftruncate.c 2020-07-24 15:19:17.602438295 +0100 -@@ -1,5 +1,4 @@ --/* ftruncate emulations that work on some System V's. -- This file is in the public domain. */ -+/* ftruncate emulations that work on some System V's. */ - - /* Copyright (C) 2012-2020 Free Software Foundation, Inc. - diff --git a/binutils-PPC-dcbt.patch b/binutils-PPC-dcbt.patch deleted file mode 100644 index deef8c5..0000000 --- a/binutils-PPC-dcbt.patch +++ /dev/null @@ -1,144 +0,0 @@ -diff -rup binutils.orig/gas/testsuite/gas/ppc/power4_32.d binutils-2.35/gas/testsuite/gas/ppc/power4_32.d ---- binutils.orig/gas/testsuite/gas/ppc/power4_32.d 2022-01-25 13:39:48.063563099 +0000 -+++ binutils-2.35/gas/testsuite/gas/ppc/power4_32.d 2022-01-25 13:48:30.857981751 +0000 -@@ -41,7 +41,7 @@ Disassembly of section \.text: - 7c: (7c 01 17 ec|ec 17 01 7c) dcbz r1,r2 - 80: (7c 23 27 ec|ec 27 23 7c) dcbzl r3,r4 - 84: (7c 05 37 ec|ec 37 05 7c) dcbz r5,r6 -- 88: (7c 05 32 2c|2c 32 05 7c) dcbt r5,r6 -- 8c: (7c 05 32 2c|2c 32 05 7c) dcbt r5,r6 -- 90: (7d 05 32 2c|2c 32 05 7d) dcbt r5,r6,8 -+ 88: (7c 05 32 2c|2c 32 05 7c) dcbtct r5,r6 -+ 8c: (7c 05 32 2c|2c 32 05 7c) dcbtct r5,r6 -+ 90: (7d 05 32 2c|2c 32 05 7d) dcbtds r5,r6 - #pass -diff -rup binutils.orig/opcodes/ppc-opc.c binutils-2.35/opcodes/ppc-opc.c ---- binutils.orig/opcodes/ppc-opc.c 2022-01-25 13:39:47.650565929 +0000 -+++ binutils-2.35/opcodes/ppc-opc.c 2022-01-25 13:47:09.056542122 +0000 -@@ -2205,6 +2205,74 @@ extract_sxl (uint64_t insn, - return 1; - return (insn >> 11) & 0x1; - } -+ -+/* The list of embedded processors that use the embedded operand ordering -+ for the 3 operand dcbt and dcbtst instructions. */ -+#define DCBT_EO (PPC_OPCODE_E500 | PPC_OPCODE_E500MC | PPC_OPCODE_476 \ -+ | PPC_OPCODE_A2) -+ -+/* ISA 2.03 and later specify extended mnemonics dcbtct, dcbtds, and -+ dcbtstct, dcbtstds with a note saying these should be used in new -+ programs rather than the base mnemonics "so that it can be coded -+ with TH as the last operand for all categories". For that reason -+ the extended mnemonics are enabled in the assembler for the -+ embedded processors, but not for the disassembler so as to display -+ the embedded dcbt or dcbtst expected form with TH first for -+ embedded programmers. */ -+ -+static uint64_t -+insert_thct (uint64_t insn, -+ int64_t value, -+ ppc_cpu_t dialect ATTRIBUTE_UNUSED, -+ const char **errmsg) -+{ -+ if ((uint64_t) value > 7) -+ *errmsg = _("invalid TH value"); -+ return insn | ((value & 7) << 21); -+} -+ -+static int64_t -+extract_thct (uint64_t insn, -+ ppc_cpu_t dialect, -+ int *invalid) -+{ -+ /* Missing optional operands have a value of 0. */ -+ if (*invalid < 0) -+ return 0; -+ -+ int64_t value = (insn >> 21) & 0x1f; -+ if (value > 7 || (dialect & DCBT_EO) != 0) -+ *invalid = 1; -+ -+ return value; -+} -+ -+static uint64_t -+insert_thds (uint64_t insn, -+ int64_t value, -+ ppc_cpu_t dialect ATTRIBUTE_UNUSED, -+ const char **errmsg) -+{ -+ if (value < 8 || value > 15) -+ *errmsg = _("invalid TH value"); -+ return insn | ((value & 0x1f) << 21); -+} -+ -+static int64_t -+extract_thds (uint64_t insn, -+ ppc_cpu_t dialect, -+ int *invalid) -+{ -+ /* Missing optional operands have a value of 8. */ -+ if (*invalid < 0) -+ return 8; -+ -+ int64_t value = (insn >> 21) & 0x1f; -+ if (value < 8 || value > 15 || (dialect & DCBT_EO) != 0) -+ *invalid = 1; -+ -+ return value; -+} - - /* The operands table. - -@@ -2402,10 +2470,18 @@ const struct powerpc_operand powerpc_ope - #define MO CT - { 0x1f, 21, NULL, NULL, PPC_OPERAND_OPTIONAL }, - -+ /* The TH field in dcbtct. */ -+#define THCT CT + 1 -+ { 0x1f, 21, insert_thct, extract_thct, PPC_OPERAND_OPTIONAL }, -+ -+ /* The TH field in dcbtds. */ -+#define THDS THCT + 1 -+ { 0x1f, 21, insert_thds, extract_thds, PPC_OPERAND_OPTIONAL }, -+ - /* The D field in a D form instruction. This is a displacement off - a register, and implies that the next operand is a register in - parentheses. */ --#define D CT + 1 -+#define D THDS + 1 - { 0xffff, 0, NULL, NULL, PPC_OPERAND_PARENS | PPC_OPERAND_SIGNED }, - - /* The D8 field in a D form instruction. This is a displacement off -@@ -4211,12 +4287,6 @@ const unsigned int num_powerpc_operands - #define PPCHTM PPC_OPCODE_POWER8 - #define E200Z4 PPC_OPCODE_E200Z4 - #define PPCLSP PPC_OPCODE_LSP --/* The list of embedded processors that use the embedded operand ordering -- for the 3 operand dcbt and dcbtst instructions. */ --#define DCBT_EO (PPC_OPCODE_E500 | PPC_OPCODE_E500MC | PPC_OPCODE_476 \ -- | PPC_OPCODE_A2) -- -- - - /* The opcode table. - -@@ -6592,6 +6662,8 @@ const struct powerpc_opcode powerpc_opco - {"mtvsrwz", X(31,243), XX1RB_MASK, PPCVSX2, 0, {XT6, RA}}, - - {"dcbtstt", XRT(31,246,0x10), XRT_MASK, POWER7, 0, {RA0, RB}}, -+{"dcbtstct", X(31,246), X_MASK, POWER4, 0, {RA0, RB, THCT}}, -+{"dcbtstds", X(31,246), X_MASK, POWER4, 0, {RA0, RB, THDS}}, - {"dcbtst", X(31,246), X_MASK, POWER4, DCBT_EO, {RA0, RB, CT}}, - {"dcbtst", X(31,246), X_MASK, DCBT_EO, 0, {CT, RA0, RB}}, - {"dcbtst", X(31,246), X_MASK, PPC, POWER4|DCBT_EO, {RA0, RB}}, -@@ -6643,6 +6715,9 @@ const struct powerpc_opcode powerpc_opco - {"lscbx.", XRC(31,277,1), X_MASK, M601, 0, {RT, RA, RB}}, - - {"dcbtt", XRT(31,278,0x10), XRT_MASK, POWER7, 0, {RA0, RB}}, -+{"dcbna", XRT(31,278,0x11), XRT_MASK, POWER10, 0, {RA0, RB}}, -+{"dcbtct", X(31,278), X_MASK, POWER4, 0, {RA0, RB, THCT}}, -+{"dcbtds", X(31,278), X_MASK, POWER4, 0, {RA0, RB, THDS}}, - {"dcbt", X(31,278), X_MASK, POWER4, DCBT_EO, {RA0, RB, CT}}, - {"dcbt", X(31,278), X_MASK, DCBT_EO, 0, {CT, RA0, RB}}, - {"dcbt", X(31,278), X_MASK, PPC, POWER4|DCBT_EO, {RA0, RB}}, diff --git a/binutils-aarch64-ld-testsuite-fixes.patch b/binutils-aarch64-ld-testsuite-fixes.patch deleted file mode 100644 index 45eeb7a..0000000 --- a/binutils-aarch64-ld-testsuite-fixes.patch +++ /dev/null @@ -1,200 +0,0 @@ -diff -rup binutils.orig/ld/testsuite/ld-aarch64/variant_pcs-now.d binutils-2.35/ld/testsuite/ld-aarch64/variant_pcs-now.d ---- binutils.orig/ld/testsuite/ld-aarch64/variant_pcs-now.d 2020-07-28 13:07:26.192507117 +0100 -+++ binutils-2.35/ld/testsuite/ld-aarch64/variant_pcs-now.d 2020-07-28 13:09:47.205905999 +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 - 1: 0000000000000000 0 NOTYPE GLOBAL DEFAULT UND f_base_global_default_undef -- 2: 0000000000000000 0 NOTYPE GLOBAL DEFAULT \[VARIANT_PCS\] UND f_spec_global_default_undef -- 3: 0000000000008000 0 IFUNC GLOBAL DEFAULT \[VARIANT_PCS\] 1 f_spec_global_default_ifunc -+ 2: 0000000000000000 0 NOTYPE GLOBAL DEFAULT .* -+ 3: 0000000000008000 0 IFUNC GLOBAL DEFAULT .* - 4: 0000000000008000 0 NOTYPE GLOBAL DEFAULT 1 f_base_global_default_def -- 5: 0000000000008000 0 NOTYPE GLOBAL DEFAULT \[VARIANT_PCS\] 1 f_spec_global_default_def -+ 5: 0000000000008000 0 NOTYPE GLOBAL DEFAULT .* - 6: 0000000000008000 0 IFUNC GLOBAL DEFAULT 1 f_base_global_default_ifunc - - Symbol table '\.symtab' contains 35 entries: -@@ -41,28 +41,28 @@ Symbol table '\.symtab' contains 35 entr - 7: 00000000000111c8 0 SECTION LOCAL DEFAULT 7 - 8: 0000000000011270 0 SECTION LOCAL DEFAULT 8 - 9: 0000000000000000 0 FILE LOCAL DEFAULT ABS .*variant_pcs-1\.o -- 10: 0000000000008000 0 NOTYPE LOCAL DEFAULT \[VARIANT_PCS\] 1 f_spec_local -- 11: 0000000000008000 0 IFUNC LOCAL DEFAULT \[VARIANT_PCS\] 1 f_spec_local_ifunc -+ 10: 0000000000008000 0 NOTYPE LOCAL DEFAULT .* -+ 11: 0000000000008000 0 IFUNC LOCAL DEFAULT .* - 12: 0000000000008000 0 IFUNC LOCAL DEFAULT 1 f_base_local_ifunc - 13: 0000000000008000 0 NOTYPE LOCAL DEFAULT 1 f_base_local - 14: 0000000000008000 0 NOTYPE LOCAL DEFAULT 1 \$x - 15: 0000000000000000 0 FILE LOCAL DEFAULT ABS .*variant_pcs-2\.o -- 16: 0000000000008038 0 NOTYPE LOCAL DEFAULT \[VARIANT_PCS\] 1 f_spec_local2 -- 17: 0000000000008038 0 IFUNC LOCAL DEFAULT \[VARIANT_PCS\] 1 f_spec_local2_ifunc -+ 16: 0000000000008038 0 NOTYPE LOCAL DEFAULT .* -+ 17: 0000000000008038 0 IFUNC LOCAL DEFAULT .* - 18: 0000000000008038 0 IFUNC LOCAL DEFAULT 1 f_base_local2_ifunc - 19: 0000000000008038 0 NOTYPE LOCAL DEFAULT 1 f_base_local2 - 20: 0000000000008038 0 NOTYPE LOCAL DEFAULT 1 \$x - 21: 0000000000000000 0 FILE LOCAL DEFAULT ABS - 22: 0000000000009080 0 OBJECT LOCAL DEFAULT ABS _DYNAMIC -- 23: 0000000000008000 0 NOTYPE LOCAL DEFAULT \[VARIANT_PCS\] 1 f_spec_global_hidden_def -+ 23: 0000000000008000 0 NOTYPE LOCAL DEFAULT .* - 24: 0000000000008000 0 IFUNC LOCAL DEFAULT 1 f_base_global_hidden_ifunc - 25: 0000000000008000 0 NOTYPE LOCAL DEFAULT 1 f_base_global_hidden_def - 26: 0000000000009000 0 OBJECT LOCAL DEFAULT ABS _GLOBAL_OFFSET_TABLE_ -- 27: 0000000000008000 0 IFUNC LOCAL DEFAULT \[VARIANT_PCS\] 1 f_spec_global_hidden_ifunc -+ 27: 0000000000008000 0 IFUNC LOCAL DEFAULT .* - 28: 0000000000008070 0 NOTYPE LOCAL DEFAULT 2 \$x - 29: 0000000000000000 0 NOTYPE GLOBAL DEFAULT UND f_base_global_default_undef -- 30: 0000000000000000 0 NOTYPE GLOBAL DEFAULT \[VARIANT_PCS\] UND f_spec_global_default_undef -- 31: 0000000000008000 0 IFUNC GLOBAL DEFAULT \[VARIANT_PCS\] 1 f_spec_global_default_ifunc -+ 30: 0000000000000000 0 NOTYPE GLOBAL DEFAULT .* -+ 31: 0000000000008000 0 IFUNC GLOBAL DEFAULT .* - 32: 0000000000008000 0 NOTYPE GLOBAL DEFAULT 1 f_base_global_default_def -- 33: 0000000000008000 0 NOTYPE GLOBAL DEFAULT \[VARIANT_PCS\] 1 f_spec_global_default_def -+ 33: 0000000000008000 0 NOTYPE GLOBAL DEFAULT .* - 34: 0000000000008000 0 IFUNC GLOBAL DEFAULT 1 f_base_global_default_ifunc -diff -rup binutils.orig/ld/testsuite/ld-aarch64/variant_pcs-r.d binutils-2.35/ld/testsuite/ld-aarch64/variant_pcs-r.d ---- binutils.orig/ld/testsuite/ld-aarch64/variant_pcs-r.d 2020-07-28 13:07:26.184507150 +0100 -+++ binutils-2.35/ld/testsuite/ld-aarch64/variant_pcs-r.d 2020-07-28 13:08:20.069277447 +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 - 4: 0000000000000000 0 FILE LOCAL DEFAULT ABS .*variant_pcs-1\.o -- 5: 0000000000000000 0 NOTYPE LOCAL DEFAULT \[VARIANT_PCS\] 1 f_spec_local -- 6: 0000000000000000 0 IFUNC LOCAL DEFAULT \[VARIANT_PCS\] 1 f_spec_local_ifunc -+ 5: 0000000000000000 0 NOTYPE LOCAL DEFAULT .* -+ 6: 0000000000000000 0 IFUNC LOCAL DEFAULT .* - 7: 0000000000000000 0 IFUNC LOCAL DEFAULT 1 f_base_local_ifunc - 8: 0000000000000000 0 NOTYPE LOCAL DEFAULT 1 f_base_local - 9: 0000000000000000 0 NOTYPE LOCAL DEFAULT 1 \$x - 10: 0000000000000000 0 FILE LOCAL DEFAULT ABS .*variant_pcs-2\.o -- 11: 0000000000000038 0 NOTYPE LOCAL DEFAULT \[VARIANT_PCS\] 1 f_spec_local2 -- 12: 0000000000000038 0 IFUNC LOCAL DEFAULT \[VARIANT_PCS\] 1 f_spec_local2_ifunc -+ 11: 0000000000000038 0 NOTYPE LOCAL DEFAULT .* -+ 12: 0000000000000038 0 IFUNC LOCAL DEFAULT .* - 13: 0000000000000038 0 IFUNC LOCAL DEFAULT 1 f_base_local2_ifunc - 14: 0000000000000038 0 NOTYPE LOCAL DEFAULT 1 f_base_local2 - 15: 0000000000000038 0 NOTYPE LOCAL DEFAULT 1 \$x - 16: 0000000000000000 0 NOTYPE GLOBAL DEFAULT UND f_base_global_default_undef -- 17: 0000000000000000 0 NOTYPE GLOBAL DEFAULT \[VARIANT_PCS\] UND f_spec_global_default_undef -- 18: 0000000000000000 0 NOTYPE GLOBAL HIDDEN \[VARIANT_PCS\] 1 f_spec_global_hidden_def -+ 17: 0000000000000000 0 NOTYPE GLOBAL DEFAULT .* -+ 18: 0000000000000000 0 NOTYPE GLOBAL HIDDEN .* - 19: 0000000000000000 0 IFUNC GLOBAL HIDDEN 1 f_base_global_hidden_ifunc -- 20: 0000000000000000 0 IFUNC GLOBAL DEFAULT \[VARIANT_PCS\] 1 f_spec_global_default_ifunc -+ 20: 0000000000000000 0 IFUNC GLOBAL DEFAULT .* - 21: 0000000000000000 0 NOTYPE GLOBAL HIDDEN 1 f_base_global_hidden_def -- 22: 0000000000000000 0 IFUNC GLOBAL HIDDEN \[VARIANT_PCS\] 1 f_spec_global_hidden_ifunc -+ 22: 0000000000000000 0 IFUNC GLOBAL HIDDEN .* - 23: 0000000000000000 0 NOTYPE GLOBAL DEFAULT 1 f_base_global_default_def -- 24: 0000000000000000 0 NOTYPE GLOBAL DEFAULT \[VARIANT_PCS\] 1 f_spec_global_default_def -+ 24: 0000000000000000 0 NOTYPE GLOBAL DEFAULT .* - 25: 0000000000000000 0 IFUNC GLOBAL DEFAULT 1 f_base_global_default_ifunc -diff -rup binutils.orig/ld/testsuite/ld-aarch64/variant_pcs-shared.d binutils-2.35/ld/testsuite/ld-aarch64/variant_pcs-shared.d ---- binutils.orig/ld/testsuite/ld-aarch64/variant_pcs-shared.d 2020-07-28 13:07:26.183507154 +0100 -+++ binutils-2.35/ld/testsuite/ld-aarch64/variant_pcs-shared.d 2020-07-28 13:09:00.519105015 +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 - 1: 0000000000000000 0 NOTYPE GLOBAL DEFAULT UND f_base_global_default_undef -- 2: 0000000000000000 0 NOTYPE GLOBAL DEFAULT \[VARIANT_PCS\] UND f_spec_global_default_undef -- 3: 0000000000008000 0 IFUNC GLOBAL DEFAULT \[VARIANT_PCS\] 1 f_spec_global_default_ifunc -+ 2: 0000000000000000 0 NOTYPE GLOBAL DEFAULT .* -+ 3: 0000000000008000 0 IFUNC GLOBAL DEFAULT .* - 4: 0000000000008000 0 NOTYPE GLOBAL DEFAULT 1 f_base_global_default_def -- 5: 0000000000008000 0 NOTYPE GLOBAL DEFAULT \[VARIANT_PCS\] 1 f_spec_global_default_def -+ 5: 0000000000008000 0 NOTYPE GLOBAL DEFAULT .* - 6: 0000000000008000 0 IFUNC GLOBAL DEFAULT 1 f_base_global_default_ifunc - - Symbol table '\.symtab' contains 35 entries: -@@ -41,28 +41,28 @@ Symbol table '\.symtab' contains 35 entr - 7: 00000000000111c8 0 SECTION LOCAL DEFAULT 7 - 8: 0000000000011270 0 SECTION LOCAL DEFAULT 8 - 9: 0000000000000000 0 FILE LOCAL DEFAULT ABS .*variant_pcs-1\.o -- 10: 0000000000008000 0 NOTYPE LOCAL DEFAULT \[VARIANT_PCS\] 1 f_spec_local -- 11: 0000000000008000 0 IFUNC LOCAL DEFAULT \[VARIANT_PCS\] 1 f_spec_local_ifunc -+ 10: 0000000000008000 0 NOTYPE LOCAL DEFAULT .* -+ 11: 0000000000008000 0 IFUNC LOCAL DEFAULT .* - 12: 0000000000008000 0 IFUNC LOCAL DEFAULT 1 f_base_local_ifunc - 13: 0000000000008000 0 NOTYPE LOCAL DEFAULT 1 f_base_local - 14: 0000000000008000 0 NOTYPE LOCAL DEFAULT 1 \$x - 15: 0000000000000000 0 FILE LOCAL DEFAULT ABS .*variant_pcs-2\.o -- 16: 0000000000008038 0 NOTYPE LOCAL DEFAULT \[VARIANT_PCS\] 1 f_spec_local2 -- 17: 0000000000008038 0 IFUNC LOCAL DEFAULT \[VARIANT_PCS\] 1 f_spec_local2_ifunc -+ 16: 0000000000008038 0 NOTYPE LOCAL DEFAULT .* -+ 17: 0000000000008038 0 IFUNC LOCAL DEFAULT .* - 18: 0000000000008038 0 IFUNC LOCAL DEFAULT 1 f_base_local2_ifunc - 19: 0000000000008038 0 NOTYPE LOCAL DEFAULT 1 f_base_local2 - 20: 0000000000008038 0 NOTYPE LOCAL DEFAULT 1 \$x - 21: 0000000000000000 0 FILE LOCAL DEFAULT ABS - 22: 0000000000009080 0 OBJECT LOCAL DEFAULT ABS _DYNAMIC -- 23: 0000000000008000 0 NOTYPE LOCAL DEFAULT \[VARIANT_PCS\] 1 f_spec_global_hidden_def -+ 23: 0000000000008000 0 NOTYPE LOCAL DEFAULT .* - 24: 0000000000008000 0 IFUNC LOCAL DEFAULT 1 f_base_global_hidden_ifunc - 25: 0000000000008000 0 NOTYPE LOCAL DEFAULT 1 f_base_global_hidden_def - 26: 0000000000009000 0 OBJECT LOCAL DEFAULT ABS _GLOBAL_OFFSET_TABLE_ -- 27: 0000000000008000 0 IFUNC LOCAL DEFAULT \[VARIANT_PCS\] 1 f_spec_global_hidden_ifunc -+ 27: 0000000000008000 0 IFUNC LOCAL DEFAULT .* - 28: 0000000000008070 0 NOTYPE LOCAL DEFAULT 2 \$x - 29: 0000000000000000 0 NOTYPE GLOBAL DEFAULT UND f_base_global_default_undef -- 30: 0000000000000000 0 NOTYPE GLOBAL DEFAULT \[VARIANT_PCS\] UND f_spec_global_default_undef -- 31: 0000000000008000 0 IFUNC GLOBAL DEFAULT \[VARIANT_PCS\] 1 f_spec_global_default_ifunc -+ 30: 0000000000000000 0 NOTYPE GLOBAL DEFAULT .* -+ 31: 0000000000008000 0 IFUNC GLOBAL DEFAULT .* - 32: 0000000000008000 0 NOTYPE GLOBAL DEFAULT 1 f_base_global_default_def -- 33: 0000000000008000 0 NOTYPE GLOBAL DEFAULT \[VARIANT_PCS\] 1 f_spec_global_default_def -+ 33: 0000000000008000 0 NOTYPE GLOBAL DEFAULT .* - 34: 0000000000008000 0 IFUNC GLOBAL DEFAULT 1 f_base_global_default_ifunc -diff -rup binutils.orig/ld/testsuite/ld-plugin/plugin-12.d binutils-2.35/ld/testsuite/ld-plugin/plugin-12.d ---- binutils.orig/ld/testsuite/ld-plugin/plugin-12.d 2020-07-28 13:07:26.246506887 +0100 -+++ binutils-2.35/ld/testsuite/ld-plugin/plugin-12.d 2020-07-28 13:10:51.694631104 +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 `func' definition: DEF, visibility: DEFAULT, resolution: PREVAILING_DE.* -+.*: symbol `func1' definition: DEF, visibility: PROTECTED, resolution: PREVAILING_DE.* -+.*: symbol `func2' definition: DEF, visibility: INTERNAL, resolution: PREVAILING_DE.* -+.*: symbol `func3' definition: DEF, visibility: HIDDEN, resolution: PREVAILING_DE.* - #pass -diff -rup binutils.orig/ld/testsuite/ld-elf/indirect.exp binutils-2.35/ld/testsuite/ld-elf/indirect.exp ---- binutils.orig/ld/testsuite/ld-elf/indirect.exp 2020-07-28 13:37:46.473794149 +0100 -+++ binutils-2.35/ld/testsuite/ld-elf/indirect.exp 2020-07-28 14:10:44.867990380 +0100 -@@ -229,7 +229,7 @@ set pie_tests { - - run_ld_link_exec_tests $pie_tests - --foreach t [list indirect5c indirect5d indirect6c indirect6d] { -+foreach t [list indirect6c indirect6d] { - set testname [concat $t "dynsym"] - if { [check_dynamic_syms tmpdir/$t] } { - pass $testname -diff -rup binutils.orig/ld/testsuite/ld-plugin/plugin-12.d binutils-2.35/ld/testsuite/ld-plugin/plugin-12.d ---- binutils.orig/ld/testsuite/ld-plugin/plugin-12.d 2020-07-28 13:37:46.393794486 +0100 -+++ binutils-2.35/ld/testsuite/ld-plugin/plugin-12.d 2020-07-28 14:14:14.632159645 +0100 -@@ -1,6 +1,6 @@ - #... --.*: symbol `func' definition: DEF, visibility: DEFAULT, resolution: PREVAILING_DE.* --.*: symbol `func1' definition: DEF, visibility: PROTECTED, resolution: PREVAILING_DE.* --.*: symbol `func2' definition: DEF, visibility: INTERNAL, resolution: PREVAILING_DE.* --.*: symbol `func3' definition: DEF, visibility: HIDDEN, resolution: PREVAILING_DE.* -+.*func' definition: DEF, visibility: DEFAULT, resolution: PREVAILING_DE.* -+.*func1' definition: DEF, visibility: PROTECTED, resolution: PREVAILING_DE.* -+.*func2' definition: DEF, visibility: INTERNAL, resolution: PREVAILING_DE.* -+.*func3' definition: DEF, visibility: HIDDEN, resolution: PREVAILING_DE.* - #pass -diff -rup binutils.orig/ld/testsuite/ld-plugin/plugin.exp binutils-2.35/ld/testsuite/ld-plugin/plugin.exp ---- binutils.orig/ld/testsuite/ld-plugin/plugin.exp 2020-07-28 15:07:51.601384963 +0100 -+++ binutils-2.35/ld/testsuite/ld-plugin/plugin.exp 2020-07-28 15:11:38.753471155 +0100 -@@ -301,6 +301,9 @@ if { !$can_compile || $failed_compile } - run_ld_link_tests $plugin_tests - - if { [is_elf_format] \ -+ && ![istarget "aarch64*-*-*"] \ -+ && ![istarget "s390*-*-*"] \ -+ && ![istarget "i686*-*-*"] \ - && [ld_compile "$CC $CFLAGS" $srcdir/$subdir/func1p.c tmpdir/func1p.o] \ - && [ld_compile "$CC $CFLAGS" $srcdir/$subdir/func2i.c tmpdir/func2i.o] \ - && [ld_compile "$CC $CFLAGS" $srcdir/$subdir/func3h.c tmpdir/func3h.o] } { diff --git a/binutils-aarch64-plt-sh_entsize.patch b/binutils-aarch64-plt-sh_entsize.patch deleted file mode 100644 index 41912f1..0000000 --- a/binutils-aarch64-plt-sh_entsize.patch +++ /dev/null @@ -1,27 +0,0 @@ -diff -rup binutils.orig/bfd/elfnn-aarch64.c binutils-2.35/bfd/elfnn-aarch64.c ---- binutils.orig/bfd/elfnn-aarch64.c 2020-07-30 17:20:30.607580720 +0100 -+++ binutils-2.35/bfd/elfnn-aarch64.c 2020-07-30 17:22:45.629741124 +0100 -@@ -9513,8 +9513,10 @@ elfNN_aarch64_init_small_plt0_entry (bfd - - memcpy (htab->root.splt->contents, htab->plt0_entry, - htab->plt_header_size); -- elf_section_data (htab->root.splt->output_section)->this_hdr.sh_entsize = -- htab->plt_header_size; -+ /* PR 26312: Explicitly set the sh_entsize to 0 so that -+ consumers do not think that the section contains fixed -+ sized objects. */ -+ elf_section_data (htab->root.splt->output_section)->this_hdr.sh_entsize = 0; - - plt_got_2nd_ent = (htab->root.sgotplt->output_section->vma - + htab->root.sgotplt->output_offset -@@ -9616,10 +9618,6 @@ elfNN_aarch64_finish_dynamic_sections (b - { - elfNN_aarch64_init_small_plt0_entry (output_bfd, htab); - -- elf_section_data (htab->root.splt->output_section)-> -- this_hdr.sh_entsize = htab->plt_entry_size; -- -- - if (htab->root.tlsdesc_plt && !(info->flags & DF_BIND_NOW)) - { - BFD_ASSERT (htab->root.tlsdesc_got != (bfd_vma)-1); diff --git a/binutils-add-sym-cache-to-elf-link-hash.patch b/binutils-add-sym-cache-to-elf-link-hash.patch deleted file mode 100644 index 85b2006..0000000 --- a/binutils-add-sym-cache-to-elf-link-hash.patch +++ /dev/null @@ -1,1981 +0,0 @@ -diff -rup binutils.orig/bfd/elf-bfd.h binutils-2.35/bfd/elf-bfd.h ---- binutils.orig/bfd/elf-bfd.h 2020-07-30 15:04:05.366466702 +0100 -+++ binutils-2.35/bfd/elf-bfd.h 2020-07-30 15:04:16.707393960 +0100 -@@ -549,6 +549,16 @@ enum elf_target_os - is_nacl /* Native Client. */ - }; - -+/* Used by bfd_sym_from_r_symndx to cache a small number of local -+ symbols. */ -+#define LOCAL_SYM_CACHE_SIZE 32 -+struct sym_cache -+{ -+ bfd *abfd; -+ unsigned long indx[LOCAL_SYM_CACHE_SIZE]; -+ Elf_Internal_Sym sym[LOCAL_SYM_CACHE_SIZE]; -+}; -+ - /* ELF linker hash table. */ - - struct elf_link_hash_table -@@ -676,6 +686,9 @@ struct elf_link_hash_table - /* A linked list of dynamic BFD's loaded in the link. */ - struct elf_link_loaded_list *dyn_loaded; - -+ /* Small local sym cache. */ -+ struct sym_cache sym_cache; -+ - /* Short-cuts to get to dynamic linker sections. */ - asection *sgot; - asection *sgotplt; -@@ -717,16 +730,6 @@ struct elf_link_hash_table - /* Returns TRUE if the hash table is a struct elf_link_hash_table. */ - #define is_elf_hash_table(htab) \ - (((struct bfd_link_hash_table *) (htab))->type == bfd_link_elf_hash_table) -- --/* Used by bfd_sym_from_r_symndx to cache a small number of local -- symbols. */ --#define LOCAL_SYM_CACHE_SIZE 32 --struct sym_cache --{ -- bfd *abfd; -- unsigned long indx[LOCAL_SYM_CACHE_SIZE]; -- Elf_Internal_Sym sym[LOCAL_SYM_CACHE_SIZE]; --}; - - /* Constant information held for an ELF backend. */ - -diff -rup binutils.orig/bfd/elf32-arm.c binutils-2.35/bfd/elf32-arm.c ---- binutils.orig/bfd/elf32-arm.c 2020-07-30 15:04:05.376466638 +0100 -+++ binutils-2.35/bfd/elf32-arm.c 2020-07-30 15:04:16.708393953 +0100 -@@ -3390,9 +3390,6 @@ struct elf32_arm_link_hash_table - bfd_vma offset; - } tls_ldm_got; - -- /* Small local sym cache. */ -- struct sym_cache sym_cache; -- - /* For convenience in allocate_dynrelocs. */ - bfd * obfd; - -@@ -15316,7 +15313,7 @@ elf32_arm_check_relocs (bfd *abfd, struc - if (r_symndx < symtab_hdr->sh_info) - { - /* A local symbol. */ -- isym = bfd_sym_from_r_symndx (&htab->sym_cache, -+ isym = bfd_sym_from_r_symndx (&htab->root.sym_cache, - abfd, r_symndx); - if (isym == NULL) - return FALSE; -@@ -16871,7 +16868,8 @@ elf32_arm_size_dynamic_sections (bfd * o - s->size += 4; - } - -- isym = bfd_sym_from_r_symndx (&htab->sym_cache, ibfd, symndx); -+ isym = bfd_sym_from_r_symndx (&htab->root.sym_cache, ibfd, -+ symndx); - if (isym == NULL) - return FALSE; - -diff -rup binutils.orig/bfd/elf32-bfin.c binutils-2.35/bfd/elf32-bfin.c ---- binutils.orig/bfd/elf32-bfin.c 2020-07-30 15:04:05.377466632 +0100 -+++ binutils-2.35/bfd/elf32-bfin.c 2020-07-30 15:04:16.709393947 +0100 -@@ -4791,16 +4791,6 @@ struct bfin_link_hash_entry - struct bfin_pcrel_relocs_copied *pcrel_relocs_copied; - }; - --/* bfin ELF linker hash table. */ -- --struct bfin_link_hash_table --{ -- struct elf_link_hash_table root; -- -- /* Small local sym cache. */ -- struct sym_cache sym_cache; --}; -- - #define bfin_hash_entry(ent) ((struct bfin_link_hash_entry *) (ent)) - - static struct bfd_hash_entry * -@@ -4829,15 +4819,14 @@ bfin_link_hash_newfunc (struct bfd_hash_ - static struct bfd_link_hash_table * - bfin_link_hash_table_create (bfd * abfd) - { -- struct bfin_link_hash_table *ret; -- size_t amt = sizeof (struct bfin_link_hash_table); -+ struct elf_link_hash_table *ret; -+ size_t amt = sizeof (struct elf_link_hash_table); - - ret = bfd_zmalloc (amt); - if (ret == NULL) - return NULL; - -- if (!_bfd_elf_link_hash_table_init (&ret->root, abfd, -- bfin_link_hash_newfunc, -+ if (!_bfd_elf_link_hash_table_init (ret, abfd, bfin_link_hash_newfunc, - sizeof (struct elf_link_hash_entry), - BFIN_ELF_DATA)) - { -@@ -4845,9 +4834,7 @@ bfin_link_hash_table_create (bfd * abfd) - return NULL; - } - -- ret->sym_cache.abfd = NULL; -- -- return &ret->root.root; -+ return &ret->root; - } - - /* The size in bytes of an entry in the procedure linkage table. */ -@@ -5418,10 +5405,6 @@ struct bfd_elf_special_section const elf - - #define bfd_elf32_bfd_is_local_label_name \ - bfin_is_local_label_name --#define bfin_hash_table(p) \ -- ((struct bfin_link_hash_table *) (p)->hash) -- -- - - #define elf_backend_create_dynamic_sections \ - _bfd_elf_create_dynamic_sections -diff -rup binutils.orig/bfd/elf32-csky.c binutils-2.35/bfd/elf32-csky.c ---- binutils.orig/bfd/elf32-csky.c 2020-07-30 15:04:05.378466625 +0100 -+++ binutils-2.35/bfd/elf32-csky.c 2020-07-30 15:04:16.709393947 +0100 -@@ -1208,9 +1208,6 @@ struct csky_elf_link_hash_table - { - struct elf_link_hash_table elf; - -- /* Small local sym cache. */ -- struct sym_cache sym_cache; -- - /* Data for R_CKCORE_TLS_LDM32 relocations. */ - union - { -@@ -2477,7 +2474,7 @@ csky_elf_check_relocs (bfd * abfd, - if (r_symndx < symtab_hdr->sh_info) - { - /* A local symbol. */ -- isym = bfd_sym_from_r_symndx (&htab->sym_cache, -+ isym = bfd_sym_from_r_symndx (&htab->elf.sym_cache, - abfd, r_symndx); - if (isym == NULL) - return FALSE; -@@ -2584,7 +2581,7 @@ csky_elf_check_relocs (bfd * abfd, - asection *s; - Elf_Internal_Sym *loc_isym; - -- loc_isym = bfd_sym_from_r_symndx (&htab->sym_cache, -+ loc_isym = bfd_sym_from_r_symndx (&htab->elf.sym_cache, - abfd, r_symndx); - if (loc_isym == NULL) - return FALSE; -diff -rup binutils.orig/bfd/elf32-hppa.c binutils-2.35/bfd/elf32-hppa.c ---- binutils.orig/bfd/elf32-hppa.c 2020-07-30 15:04:05.368466689 +0100 -+++ binutils-2.35/bfd/elf32-hppa.c 2020-07-30 15:04:16.709393947 +0100 -@@ -286,9 +286,6 @@ struct elf32_hppa_link_hash_table - /* Set if we need a .plt stub to support lazy dynamic linking. */ - unsigned int need_plt_stub:1; - -- /* Small local sym cache. */ -- struct sym_cache sym_cache; -- - /* Data for LDM relocations. */ - union - { -@@ -1465,7 +1462,7 @@ elf32_hppa_check_relocs (bfd *abfd, - void *vpp; - Elf_Internal_Sym *isym; - -- isym = bfd_sym_from_r_symndx (&htab->sym_cache, -+ isym = bfd_sym_from_r_symndx (&htab->etab.sym_cache, - abfd, r_symndx); - if (isym == NULL) - return FALSE; -@@ -4038,7 +4035,7 @@ elf32_hppa_relocate_section (bfd *output - else - { - Elf_Internal_Sym *isym -- = bfd_sym_from_r_symndx (&htab->sym_cache, -+ = bfd_sym_from_r_symndx (&htab->etab.sym_cache, - input_bfd, r_symndx); - if (isym == NULL) - return FALSE; -diff -rup binutils.orig/bfd/elf32-i386.c binutils-2.35/bfd/elf32-i386.c ---- binutils.orig/bfd/elf32-i386.c 2020-07-30 15:04:05.380466612 +0100 -+++ binutils-2.35/bfd/elf32-i386.c 2020-07-30 15:04:16.710393941 +0100 -@@ -1158,7 +1158,7 @@ elf_i386_tls_transition (struct bfd_link - { - Elf_Internal_Sym *isym; - -- isym = bfd_sym_from_r_symndx (&htab->sym_cache, -+ isym = bfd_sym_from_r_symndx (&htab->elf.sym_cache, - abfd, r_symndx); - name = bfd_elf_sym_name (abfd, symtab_hdr, isym, NULL); - } -@@ -1251,7 +1251,7 @@ elf_i386_convert_load_reloc (bfd *abfd, - else - { - local_ref = TRUE; -- isym = bfd_sym_from_r_symndx (&htab->sym_cache, abfd, -+ isym = bfd_sym_from_r_symndx (&htab->elf.sym_cache, abfd, - r_symndx); - abs_symbol = isym->st_shndx == SHN_ABS; - } -@@ -1529,7 +1529,7 @@ elf_i386_check_relocs (bfd *abfd, - if (r_symndx < symtab_hdr->sh_info) - { - /* A local symbol. */ -- isym = bfd_sym_from_r_symndx (&htab->sym_cache, -+ isym = bfd_sym_from_r_symndx (&htab->elf.sym_cache, - abfd, r_symndx); - if (isym == NULL) - goto error_return; -@@ -1859,7 +1859,7 @@ elf_i386_check_relocs (bfd *abfd, - void **vpp; - asection *s; - -- isym = bfd_sym_from_r_symndx (&htab->sym_cache, -+ isym = bfd_sym_from_r_symndx (&htab->elf.sym_cache, - abfd, r_symndx); - if (isym == NULL) - goto error_return; -diff -rup binutils.orig/bfd/elf32-m32r.c binutils-2.35/bfd/elf32-m32r.c ---- binutils.orig/bfd/elf32-m32r.c 2020-07-30 15:04:05.370466676 +0100 -+++ binutils-2.35/bfd/elf32-m32r.c 2020-07-30 15:04:16.710393941 +0100 -@@ -1498,20 +1498,6 @@ struct elf_m32r_pcrel_relocs_copied - bfd_size_type count; - }; - --/* m32r ELF linker hash table. */ -- --struct elf_m32r_link_hash_table --{ -- struct elf_link_hash_table root; -- -- /* Short-cuts to get to dynamic linker sections. */ -- asection *sdynbss; -- asection *srelbss; -- -- /* Small local sym cache. */ -- struct sym_cache sym_cache; --}; -- - /* Traverse an m32r ELF linker hash table. */ - - #define m32r_elf_link_hash_traverse(table, func, info) \ -@@ -1524,21 +1510,21 @@ struct elf_m32r_link_hash_table - - #define m32r_elf_hash_table(p) \ - (elf_hash_table_id ((struct elf_link_hash_table *) ((p)->hash)) \ -- == M32R_ELF_DATA ? ((struct elf_m32r_link_hash_table *) ((p)->hash)) : NULL) -+ == M32R_ELF_DATA ? ((struct elf_link_hash_table *) ((p)->hash)) : NULL) - - /* Create an m32r ELF linker hash table. */ - - static struct bfd_link_hash_table * - m32r_elf_link_hash_table_create (bfd *abfd) - { -- struct elf_m32r_link_hash_table *ret; -- size_t amt = sizeof (struct elf_m32r_link_hash_table); -+ struct elf_link_hash_table *ret; -+ size_t amt = sizeof (struct elf_link_hash_table); - - ret = bfd_zmalloc (amt); - if (ret == NULL) - return NULL; - -- if (!_bfd_elf_link_hash_table_init (&ret->root, abfd, -+ if (!_bfd_elf_link_hash_table_init (ret, abfd, - _bfd_elf_link_hash_newfunc, - sizeof (struct elf_link_hash_entry), - M32R_ELF_DATA)) -@@ -1547,7 +1533,7 @@ m32r_elf_link_hash_table_create (bfd *ab - return NULL; - } - -- return &ret->root.root; -+ return &ret->root; - } - - /* Create dynamic sections when linking against a dynamic object. */ -@@ -1555,7 +1541,7 @@ m32r_elf_link_hash_table_create (bfd *ab - static bfd_boolean - m32r_elf_create_dynamic_sections (bfd *abfd, struct bfd_link_info *info) - { -- struct elf_m32r_link_hash_table *htab; -+ struct elf_link_hash_table *htab; - flagword flags, pltflags; - asection *s; - const struct elf_backend_data *bed = get_elf_backend_data (abfd); -@@ -1578,7 +1564,7 @@ m32r_elf_create_dynamic_sections (bfd *a - pltflags |= SEC_READONLY; - - s = bfd_make_section_anyway_with_flags (abfd, ".plt", pltflags); -- htab->root.splt = s; -+ htab->splt = s; - if (s == NULL - || !bfd_set_section_alignment (s, bed->plt_alignment)) - return FALSE; -@@ -1598,7 +1584,7 @@ m32r_elf_create_dynamic_sections (bfd *a - h = (struct elf_link_hash_entry *) bh; - h->def_regular = 1; - h->type = STT_OBJECT; -- htab->root.hplt = h; -+ htab->hplt = h; - - if (bfd_link_pic (info) - && ! bfd_elf_link_record_dynamic_symbol (info, h)) -@@ -1609,12 +1595,12 @@ m32r_elf_create_dynamic_sections (bfd *a - bed->default_use_rela_p - ? ".rela.plt" : ".rel.plt", - flags | SEC_READONLY); -- htab->root.srelplt = s; -+ htab->srelplt = s; - if (s == NULL - || !bfd_set_section_alignment (s, ptralign)) - return FALSE; - -- if (htab->root.sgot == NULL -+ if (htab->sgot == NULL - && !_bfd_elf_create_got_section (abfd, info)) - return FALSE; - -@@ -1669,7 +1655,7 @@ static bfd_boolean - m32r_elf_adjust_dynamic_symbol (struct bfd_link_info *info, - struct elf_link_hash_entry *h) - { -- struct elf_m32r_link_hash_table *htab; -+ struct elf_link_hash_table *htab; - bfd *dynobj; - asection *s; - -@@ -1796,7 +1782,7 @@ static bfd_boolean - allocate_dynrelocs (struct elf_link_hash_entry *h, void * inf) - { - struct bfd_link_info *info; -- struct elf_m32r_link_hash_table *htab; -+ struct elf_link_hash_table *htab; - struct elf_dyn_relocs *p; - - if (h->root.type == bfd_link_hash_indirect) -@@ -1807,7 +1793,7 @@ allocate_dynrelocs (struct elf_link_hash - if (htab == NULL) - return FALSE; - -- if (htab->root.dynamic_sections_created -+ if (htab->dynamic_sections_created - && h->plt.refcount > 0) - { - /* Make sure this symbol is output as a dynamic symbol. -@@ -1821,7 +1807,7 @@ allocate_dynrelocs (struct elf_link_hash - - if (WILL_CALL_FINISH_DYNAMIC_SYMBOL (1, bfd_link_pic (info), h)) - { -- asection *s = htab->root.splt; -+ asection *s = htab->splt; - - /* If this is the first .plt entry, make room for the special - first entry. */ -@@ -1847,10 +1833,10 @@ allocate_dynrelocs (struct elf_link_hash - - /* We also need to make an entry in the .got.plt section, which - will be placed in the .got section by the linker script. */ -- htab->root.sgotplt->size += 4; -+ htab->sgotplt->size += 4; - - /* We also need to make an entry in the .rel.plt section. */ -- htab->root.srelplt->size += sizeof (Elf32_External_Rela); -+ htab->srelplt->size += sizeof (Elf32_External_Rela); - } - else - { -@@ -1878,13 +1864,13 @@ allocate_dynrelocs (struct elf_link_hash - return FALSE; - } - -- s = htab->root.sgot; -+ s = htab->sgot; - - h->got.offset = s->size; - s->size += 4; -- dyn = htab->root.dynamic_sections_created; -+ dyn = htab->dynamic_sections_created; - if (WILL_CALL_FINISH_DYNAMIC_SYMBOL (dyn, bfd_link_pic (info), h)) -- htab->root.srelgot->size += sizeof (Elf32_External_Rela); -+ htab->srelgot->size += sizeof (Elf32_External_Rela); - } - else - h->got.offset = (bfd_vma) -1; -@@ -1944,7 +1930,7 @@ allocate_dynrelocs (struct elf_link_hash - if (!h->non_got_ref - && ((h->def_dynamic - && !h->def_regular) -- || (htab->root.dynamic_sections_created -+ || (htab->dynamic_sections_created - && (h->root.type == bfd_link_hash_undefweak - || h->root.type == bfd_link_hash_undefined)))) - { -@@ -1984,7 +1970,7 @@ static bfd_boolean - m32r_elf_size_dynamic_sections (bfd *output_bfd ATTRIBUTE_UNUSED, - struct bfd_link_info *info) - { -- struct elf_m32r_link_hash_table *htab; -+ struct elf_link_hash_table *htab; - bfd *dynobj; - asection *s; - bfd_boolean relocs; -@@ -1998,10 +1984,10 @@ m32r_elf_size_dynamic_sections (bfd *out - if (htab == NULL) - return FALSE; - -- dynobj = htab->root.dynobj; -+ dynobj = htab->dynobj; - BFD_ASSERT (dynobj != NULL); - -- if (htab->root.dynamic_sections_created) -+ if (htab->dynamic_sections_created) - { - /* Set the contents of the .interp section to the interpreter. */ - if (bfd_link_executable (info) && !info->nointerp) -@@ -2060,8 +2046,8 @@ m32r_elf_size_dynamic_sections (bfd *out - symtab_hdr = &elf_tdata (ibfd)->symtab_hdr; - locsymcount = symtab_hdr->sh_info; - end_local_got = local_got + locsymcount; -- s = htab->root.sgot; -- srel = htab->root.srelgot; -+ s = htab->sgot; -+ srel = htab->srelgot; - for (; local_got < end_local_got; ++local_got) - { - if (*local_got > 0) -@@ -2078,7 +2064,7 @@ m32r_elf_size_dynamic_sections (bfd *out - - /* Allocate global sym .plt and .got entries, and space for global - sym dynamic relocs. */ -- elf_link_hash_traverse (&htab->root, allocate_dynrelocs, info); -+ elf_link_hash_traverse (htab, allocate_dynrelocs, info); - - /* We now have determined the sizes of the various dynamic sections. - Allocate memory for them. */ -@@ -2088,9 +2074,9 @@ m32r_elf_size_dynamic_sections (bfd *out - if ((s->flags & SEC_LINKER_CREATED) == 0) - continue; - -- if (s == htab->root.splt -- || s == htab->root.sgot -- || s == htab->root.sgotplt -+ if (s == htab->splt -+ || s == htab->sgot -+ || s == htab->sgotplt - || s == htab->sdynbss) - { - /* Strip this section if we don't need it; see the -@@ -2098,7 +2084,7 @@ m32r_elf_size_dynamic_sections (bfd *out - } - else if (CONST_STRNEQ (bfd_section_name (s), ".rela")) - { -- if (s->size != 0 && s != htab->root.srelplt) -+ if (s->size != 0 && s != htab->srelplt) - relocs = TRUE; - - /* We use the reloc_count field as a counter if we need -@@ -2188,7 +2174,7 @@ m32r_elf_relocate_section (bfd *output_b - Elf_Internal_Rela *rel, *relend; - /* Assume success. */ - bfd_boolean ret = TRUE; -- struct elf_m32r_link_hash_table *htab = m32r_elf_hash_table (info); -+ struct elf_link_hash_table *htab = m32r_elf_hash_table (info); - bfd_vma *local_got_offsets; - asection *sgot, *splt, *sreloc; - bfd_vma high_address = bfd_get_section_limit (input_bfd, input_section); -@@ -2198,8 +2184,8 @@ m32r_elf_relocate_section (bfd *output_b - - local_got_offsets = elf_local_got_offsets (input_bfd); - -- sgot = htab->root.sgot; -- splt = htab->root.splt; -+ sgot = htab->sgot; -+ splt = htab->splt; - sreloc = NULL; - - rel = relocs; -@@ -2295,7 +2281,7 @@ m32r_elf_relocate_section (bfd *output_b - bfd_boolean dyn; - sec = h->root.u.def.section; - -- dyn = htab->root.dynamic_sections_created; -+ dyn = htab->dynamic_sections_created; - sec = h->root.u.def.section; - if (r_type == R_M32R_GOTPC24 - || (r_type == R_M32R_GOTPC_HI_ULO -@@ -2516,7 +2502,7 @@ m32r_elf_relocate_section (bfd *output_b - off = h->got.offset; - BFD_ASSERT (off != (bfd_vma) -1); - -- dyn = htab->root.dynamic_sections_created; -+ dyn = htab->dynamic_sections_created; - if (! WILL_CALL_FINISH_DYNAMIC_SYMBOL (dyn, - bfd_link_pic (info), - h) -@@ -2576,7 +2562,7 @@ m32r_elf_relocate_section (bfd *output_b - - /* We need to generate a R_M32R_RELATIVE reloc - for the dynamic linker. */ -- srelgot = htab->root.srelgot; -+ srelgot = htab->srelgot; - BFD_ASSERT (srelgot != NULL); - - outrel.r_offset = (sgot->output_section->vma -@@ -2892,7 +2878,7 @@ m32r_elf_finish_dynamic_symbol (bfd *out - struct elf_link_hash_entry *h, - Elf_Internal_Sym *sym) - { -- struct elf_m32r_link_hash_table *htab; -+ struct elf_link_hash_table *htab; - bfd_byte *loc; - - #ifdef DEBUG_PIC -@@ -2918,9 +2904,9 @@ m32r_elf_finish_dynamic_symbol (bfd *out - - BFD_ASSERT (h->dynindx != -1); - -- splt = htab->root.splt; -- sgot = htab->root.sgotplt; -- srela = htab->root.srelplt; -+ splt = htab->splt; -+ sgot = htab->sgotplt; -+ srela = htab->srelplt; - BFD_ASSERT (splt != NULL && sgot != NULL && srela != NULL); - - /* Get the index in the procedure linkage table which -@@ -3014,8 +3000,8 @@ m32r_elf_finish_dynamic_symbol (bfd *out - /* This symbol has an entry in the global offset table. Set it - up. */ - -- sgot = htab->root.sgot; -- srela = htab->root.srelgot; -+ sgot = htab->sgot; -+ srela = htab->srelgot; - BFD_ASSERT (sgot != NULL && srela != NULL); - - rela.r_offset = (sgot->output_section->vma -@@ -3063,7 +3049,7 @@ m32r_elf_finish_dynamic_symbol (bfd *out - && (h->root.type == bfd_link_hash_defined - || h->root.type == bfd_link_hash_defweak)); - -- s = bfd_get_linker_section (htab->root.dynobj, ".rela.bss"); -+ s = bfd_get_linker_section (htab->dynobj, ".rela.bss"); - BFD_ASSERT (s != NULL); - - rela.r_offset = (h->root.u.def.value -@@ -3078,7 +3064,7 @@ m32r_elf_finish_dynamic_symbol (bfd *out - } - - /* Mark some specially defined symbols as absolute. */ -- if (h == htab->root.hdynamic || h == htab->root.hgot) -+ if (h == htab->hdynamic || h == htab->hgot) - sym->st_shndx = SHN_ABS; - - return TRUE; -@@ -3091,7 +3077,7 @@ static bfd_boolean - m32r_elf_finish_dynamic_sections (bfd *output_bfd, - struct bfd_link_info *info) - { -- struct elf_m32r_link_hash_table *htab; -+ struct elf_link_hash_table *htab; - bfd *dynobj; - asection *sdyn; - asection *sgot; -@@ -3104,12 +3090,12 @@ m32r_elf_finish_dynamic_sections (bfd *o - if (htab == NULL) - return FALSE; - -- dynobj = htab->root.dynobj; -+ dynobj = htab->dynobj; - -- sgot = htab->root.sgotplt; -+ sgot = htab->sgotplt; - sdyn = bfd_get_linker_section (dynobj, ".dynamic"); - -- if (htab->root.dynamic_sections_created) -+ if (htab->dynamic_sections_created) - { - asection *splt; - Elf32_External_Dyn *dyncon, *dynconend; -@@ -3132,17 +3118,17 @@ m32r_elf_finish_dynamic_sections (bfd *o - break; - - case DT_PLTGOT: -- s = htab->root.sgotplt; -+ s = htab->sgotplt; - goto get_vma; - case DT_JMPREL: -- s = htab->root.srelplt; -+ s = htab->srelplt; - get_vma: - dyn.d_un.d_ptr = s->output_section->vma + s->output_offset; - bfd_elf32_swap_dyn_out (output_bfd, &dyn, dyncon); - break; - - case DT_PLTRELSZ: -- s = htab->root.srelplt; -+ s = htab->srelplt; - dyn.d_un.d_val = s->size; - bfd_elf32_swap_dyn_out (output_bfd, &dyn, dyncon); - break; -@@ -3150,7 +3136,7 @@ m32r_elf_finish_dynamic_sections (bfd *o - } - - /* Fill in the first entry in the procedure linkage table. */ -- splt = htab->root.splt; -+ splt = htab->splt; - if (splt && splt->size > 0) - { - if (bfd_link_pic (info)) -@@ -3369,7 +3355,7 @@ m32r_elf_check_relocs (bfd *abfd, - struct elf_link_hash_entry **sym_hashes; - const Elf_Internal_Rela *rel; - const Elf_Internal_Rela *rel_end; -- struct elf_m32r_link_hash_table *htab; -+ struct elf_link_hash_table *htab; - bfd *dynobj; - asection *sreloc; - -@@ -3384,7 +3370,7 @@ m32r_elf_check_relocs (bfd *abfd, - if (htab == NULL) - return FALSE; - -- dynobj = htab->root.dynobj; -+ dynobj = htab->dynobj; - - rel_end = relocs + sec->reloc_count; - for (rel = relocs; rel < rel_end; rel++) -@@ -3406,7 +3392,7 @@ m32r_elf_check_relocs (bfd *abfd, - } - - /* Some relocs require a global offset table. */ -- if (htab->root.sgot == NULL) -+ if (htab->sgot == NULL) - { - switch (r_type) - { -@@ -3423,7 +3409,7 @@ m32r_elf_check_relocs (bfd *abfd, - case R_M32R_GOTPC_LO: - case R_M32R_GOT24: - if (dynobj == NULL) -- htab->root.dynobj = dynobj = abfd; -+ htab->dynobj = dynobj = abfd; - if (!_bfd_elf_create_got_section (dynobj, info)) - return FALSE; - break; -@@ -3540,7 +3526,7 @@ m32r_elf_check_relocs (bfd *abfd, - struct elf_dyn_relocs **head; - - if (dynobj == NULL) -- htab->root.dynobj = dynobj = abfd; -+ htab->dynobj = dynobj = abfd; - - /* When creating a shared object, we must copy these - relocs into the output file. We create a reloc -diff -rup binutils.orig/bfd/elf32-m68hc1x.h binutils-2.35/bfd/elf32-m68hc1x.h ---- binutils.orig/bfd/elf32-m68hc1x.h 2020-07-30 15:04:05.378466625 +0100 -+++ binutils-2.35/bfd/elf32-m68hc1x.h 2020-07-30 15:04:16.710393941 +0100 -@@ -120,9 +120,6 @@ struct m68hc11_elf_link_hash_table - int top_index; - asection **input_list; - -- /* Small local sym cache. */ -- struct sym_cache sym_cache; -- - bfd_boolean (* size_one_stub) (struct bfd_hash_entry*, void*); - bfd_boolean (* build_one_stub) (struct bfd_hash_entry*, void*); - }; -diff -rup binutils.orig/bfd/elf32-m68k.c binutils-2.35/bfd/elf32-m68k.c ---- binutils.orig/bfd/elf32-m68k.c 2020-07-30 15:04:05.363466721 +0100 -+++ binutils-2.35/bfd/elf32-m68k.c 2020-07-30 15:04:16.710393941 +0100 -@@ -889,9 +889,6 @@ struct elf_m68k_link_hash_table - { - struct elf_link_hash_table root; - -- /* Small local sym cache. */ -- struct sym_cache sym_cache; -- - /* The PLT format used by this link, or NULL if the format has not - yet been chosen. */ - const struct elf_m68k_plt_info *plt_info; -@@ -2836,7 +2833,7 @@ elf_m68k_check_relocs (bfd *abfd, - void *vpp; - Elf_Internal_Sym *isym; - -- isym = bfd_sym_from_r_symndx (&elf_m68k_hash_table (info)->sym_cache, -+ isym = bfd_sym_from_r_symndx (&elf_m68k_hash_table (info)->root.sym_cache, - abfd, r_symndx); - if (isym == NULL) - return FALSE; -diff -rup binutils.orig/bfd/elf32-metag.c binutils-2.35/bfd/elf32-metag.c ---- binutils.orig/bfd/elf32-metag.c 2020-07-30 15:04:05.379466619 +0100 -+++ binutils-2.35/bfd/elf32-metag.c 2020-07-30 15:04:16.711393934 +0100 -@@ -823,9 +823,6 @@ struct elf_metag_link_hash_table - asection **input_list; - Elf_Internal_Sym **all_local_syms; - -- /* Small local sym cache. */ -- struct sym_cache sym_cache; -- - /* Data for LDM relocations. */ - union - { -@@ -2098,7 +2095,7 @@ elf_metag_check_relocs (bfd *abfd, - if (r_symndx < symtab_hdr->sh_info) - { - /* A local symbol. */ -- isym = bfd_sym_from_r_symndx (&htab->sym_cache, -+ isym = bfd_sym_from_r_symndx (&htab->etab.sym_cache, - abfd, r_symndx); - if (isym == NULL) - return FALSE; -diff -rup binutils.orig/bfd/elf32-microblaze.c binutils-2.35/bfd/elf32-microblaze.c ---- binutils.orig/bfd/elf32-microblaze.c 2020-07-30 15:04:05.367466696 +0100 -+++ binutils-2.35/bfd/elf32-microblaze.c 2020-07-30 15:04:16.711393934 +0100 -@@ -744,9 +744,6 @@ struct elf32_mb_link_hash_table - { - struct elf_link_hash_table elf; - -- /* Small local sym to section mapping cache. */ -- struct sym_cache sym_sec; -- - /* TLS Local Dynamic GOT Entry */ - union { - bfd_signed_vma refcount; -@@ -2523,7 +2520,7 @@ microblaze_elf_check_relocs (bfd * abfd, - Elf_Internal_Sym *isym; - void *vpp; - -- isym = bfd_sym_from_r_symndx (&htab->sym_sec, -+ isym = bfd_sym_from_r_symndx (&htab->elf.sym_cache, - abfd, r_symndx); - if (isym == NULL) - return FALSE; -diff -rup binutils.orig/bfd/elf32-nds32.c binutils-2.35/bfd/elf32-nds32.c ---- binutils.orig/bfd/elf32-nds32.c 2020-07-30 15:04:05.365466709 +0100 -+++ binutils-2.35/bfd/elf32-nds32.c 2020-07-30 15:04:16.712393928 +0100 -@@ -3696,8 +3696,6 @@ nds32_elf_link_hash_table_create (bfd *a - return NULL; - } - -- ret->sdynbss = NULL; -- ret->srelbss = NULL; - ret->sym_ld_script = NULL; - - return &ret->root.root; -@@ -3833,7 +3831,7 @@ nds32_elf_create_dynamic_sections (bfd * - initialize them at run time. The linker script puts the .dynbss - section into the .bss section of the final image. */ - s = bfd_make_section (abfd, ".dynbss"); -- htab->sdynbss = s; -+ htab->root.sdynbss = s; - if (s == NULL - || !bfd_set_section_flags (s, SEC_ALLOC | SEC_LINKER_CREATED)) - return FALSE; -@@ -3852,7 +3850,7 @@ nds32_elf_create_dynamic_sections (bfd * - { - s = bfd_make_section (abfd, (bed->default_use_rela_p - ? ".rela.bss" : ".rel.bss")); -- htab->srelbss = s; -+ htab->root.srelbss = s; - if (s == NULL - || !bfd_set_section_flags (s, flags | SEC_READONLY) - || !bfd_set_section_alignment (s, ptralign)) -@@ -3988,7 +3986,7 @@ nds32_elf_adjust_dynamic_symbol (struct - same memory location for the variable. */ - - htab = nds32_elf_hash_table (info); -- s = htab->sdynbss; -+ s = htab->root.sdynbss; - BFD_ASSERT (s != NULL); - - /* We must generate a R_NDS32_COPY reloc to tell the dynamic linker -@@ -3999,7 +3997,7 @@ nds32_elf_adjust_dynamic_symbol (struct - { - asection *srel; - -- srel = htab->srelbss; -+ srel = htab->root.srelbss; - BFD_ASSERT (srel != NULL); - srel->size += sizeof (Elf32_External_Rela); - h->needs_copy = 1; -@@ -7277,7 +7275,8 @@ nds32_elf_check_relocs (bfd *abfd, struc - void *vpp; - - Elf_Internal_Sym *isym; -- isym = bfd_sym_from_r_symndx (&htab->sym_cache, abfd, r_symndx); -+ isym = bfd_sym_from_r_symndx (&htab->root.sym_cache, -+ abfd, r_symndx); - if (isym == NULL) - return FALSE; - -diff -rup binutils.orig/bfd/elf32-nds32.h binutils-2.35/bfd/elf32-nds32.h ---- binutils.orig/bfd/elf32-nds32.h 2020-07-30 15:04:05.378466625 +0100 -+++ binutils-2.35/bfd/elf32-nds32.h 2020-07-30 15:04:16.712393928 +0100 -@@ -122,13 +122,6 @@ struct elf_nds32_link_hash_table - { - struct elf_link_hash_table root; - -- /* Short-cuts to get to dynamic linker sections. */ -- asection *sdynbss; -- asection *srelbss; -- -- /* Small local sym to section mapping cache. */ -- struct sym_cache sym_cache; -- - /* Target dependent options. */ - int relax_fp_as_gp; /* --mrelax-omit-fp. */ - int eliminate_gc_relocs; /* --meliminate-gc-relocs. */ -diff -rup binutils.orig/bfd/elf32-nios2.c binutils-2.35/bfd/elf32-nios2.c ---- binutils.orig/bfd/elf32-nios2.c 2020-07-30 15:04:05.375466645 +0100 -+++ binutils-2.35/bfd/elf32-nios2.c 2020-07-30 15:04:16.712393928 +0100 -@@ -1808,9 +1808,6 @@ struct elf32_nios2_link_hash_table - bfd_vma offset; - } tls_ldm_got; - -- /* Small local sym cache. */ -- struct sym_cache sym_cache; -- - bfd_vma res_n_size; - }; - -@@ -4902,7 +4899,7 @@ nios2_elf32_check_relocs (bfd *abfd, str - void *vpp; - Elf_Internal_Sym *isym; - -- isym = bfd_sym_from_r_symndx (&htab->sym_cache, -+ isym = bfd_sym_from_r_symndx (&htab->root.sym_cache, - abfd, r_symndx); - if (isym == NULL) - return FALSE; -diff -rup binutils.orig/bfd/elf32-or1k.c binutils-2.35/bfd/elf32-or1k.c ---- binutils.orig/bfd/elf32-or1k.c 2020-07-30 15:04:05.371466670 +0100 -+++ binutils-2.35/bfd/elf32-or1k.c 2020-07-30 15:04:16.713393921 +0100 -@@ -916,9 +916,6 @@ struct elf_or1k_link_hash_table - { - struct elf_link_hash_table root; - -- /* Small local sym to section mapping cache. */ -- struct sym_cache sym_sec; -- - bfd_boolean saw_plta; - }; - -@@ -2151,7 +2148,7 @@ or1k_elf_check_relocs (bfd *abfd, - Elf_Internal_Sym *isym; - void *vpp; - -- isym = bfd_sym_from_r_symndx (&htab->sym_sec, -+ isym = bfd_sym_from_r_symndx (&htab->root.sym_cache, - abfd, r_symndx); - if (isym == NULL) - return FALSE; -diff -rup binutils.orig/bfd/elf32-ppc.c binutils-2.35/bfd/elf32-ppc.c ---- binutils.orig/bfd/elf32-ppc.c 2020-07-30 15:04:05.359466747 +0100 -+++ binutils-2.35/bfd/elf32-ppc.c 2020-07-30 15:04:16.713393921 +0100 -@@ -2212,9 +2212,6 @@ struct ppc_elf_link_hash_table - int plt_slot_size; - /* The size of the first PLT entry. */ - int plt_initial_entry_size; -- -- /* Small local sym cache. */ -- struct sym_cache sym_cache; - }; - - /* Rename some of the generic section flags to better document how they -@@ -2952,7 +2949,7 @@ ppc_elf_check_relocs (bfd *abfd, - ifunc = NULL; - if (h == NULL && htab->elf.target_os != is_vxworks) - { -- Elf_Internal_Sym *isym = bfd_sym_from_r_symndx (&htab->sym_cache, -+ Elf_Internal_Sym *isym = bfd_sym_from_r_symndx (&htab->elf.sym_cache, - abfd, r_symndx); - if (isym == NULL) - return FALSE; -@@ -3335,7 +3332,7 @@ ppc_elf_check_relocs (bfd *abfd, - asection *s; - Elf_Internal_Sym *isym; - -- isym = bfd_sym_from_r_symndx (&htab->sym_cache, -+ isym = bfd_sym_from_r_symndx (&htab->elf.sym_cache, - abfd, r_symndx); - if (isym == NULL) - return FALSE; -@@ -3495,7 +3492,7 @@ ppc_elf_check_relocs (bfd *abfd, - void *vpp; - Elf_Internal_Sym *isym; - -- isym = bfd_sym_from_r_symndx (&htab->sym_cache, -+ isym = bfd_sym_from_r_symndx (&htab->elf.sym_cache, - abfd, r_symndx); - if (isym == NULL) - return FALSE; -diff -rup binutils.orig/bfd/elf32-s390.c binutils-2.35/bfd/elf32-s390.c ---- binutils.orig/bfd/elf32-s390.c 2020-07-30 15:04:05.376466638 +0100 -+++ binutils-2.35/bfd/elf32-s390.c 2020-07-30 15:04:16.714393915 +0100 -@@ -746,9 +746,6 @@ struct elf_s390_link_hash_table - bfd_signed_vma refcount; - bfd_vma offset; - } tls_ldm_got; -- -- /* Small local sym cache. */ -- struct sym_cache sym_cache; - }; - - /* Get the s390 ELF linker hash table from a link_info structure. */ -@@ -930,7 +927,7 @@ elf_s390_check_relocs (bfd *abfd, - if (r_symndx < symtab_hdr->sh_info) - { - /* A local symbol. */ -- isym = bfd_sym_from_r_symndx (&htab->sym_cache, -+ isym = bfd_sym_from_r_symndx (&htab->elf.sym_cache, - abfd, r_symndx); - if (isym == NULL) - return FALSE; -@@ -1281,7 +1278,7 @@ elf_s390_check_relocs (bfd *abfd, - asection *s; - void *vpp; - -- isym = bfd_sym_from_r_symndx (&htab->sym_cache, -+ isym = bfd_sym_from_r_symndx (&htab->elf.sym_cache, - abfd, r_symndx); - if (isym == NULL) - return FALSE; -@@ -3722,7 +3719,7 @@ elf_s390_finish_dynamic_sections (bfd *o - if (local_plt[i].plt.offset != (bfd_vma) -1) - { - asection *sec = local_plt[i].sec; -- isym = bfd_sym_from_r_symndx (&htab->sym_cache, ibfd, i); -+ isym = bfd_sym_from_r_symndx (&htab->elf.sym_cache, ibfd, i); - if (isym == NULL) - return FALSE; - -diff -rup binutils.orig/bfd/elf32-sh.c binutils-2.35/bfd/elf32-sh.c ---- binutils.orig/bfd/elf32-sh.c 2020-07-30 15:04:05.376466638 +0100 -+++ binutils-2.35/bfd/elf32-sh.c 2020-07-30 15:04:16.714393915 +0100 -@@ -2160,8 +2160,6 @@ struct elf_sh_link_hash_table - struct elf_link_hash_table root; - - /* Short-cuts to get to dynamic linker sections. */ -- asection *sdynbss; -- asection *srelbss; - asection *sfuncdesc; - asection *srelfuncdesc; - asection *srofixup; -@@ -2169,9 +2167,6 @@ struct elf_sh_link_hash_table - /* The (unloaded but important) VxWorks .rela.plt.unloaded section. */ - asection *srelplt2; - -- /* Small local sym cache. */ -- struct sym_cache sym_cache; -- - /* A counter or offset to track a TLS got entry. */ - union - { -@@ -2439,7 +2434,7 @@ sh_elf_create_dynamic_sections (bfd *abf - section into the .bss section of the final image. */ - s = bfd_make_section_anyway_with_flags (abfd, ".dynbss", - SEC_ALLOC | SEC_LINKER_CREATED); -- htab->sdynbss = s; -+ htab->root.sdynbss = s; - if (s == NULL) - return FALSE; - -@@ -2460,7 +2455,7 @@ sh_elf_create_dynamic_sections (bfd *abf - (bed->default_use_rela_p - ? ".rela.bss" : ".rel.bss"), - flags | SEC_READONLY); -- htab->srelbss = s; -+ htab->root.srelbss = s; - if (s == NULL - || !bfd_set_section_alignment (s, ptralign)) - return FALSE; -@@ -2580,7 +2575,7 @@ sh_elf_adjust_dynamic_symbol (struct bfd - both the dynamic object and the regular object will refer to the - same memory location for the variable. */ - -- s = htab->sdynbss; -+ s = htab->root.sdynbss; - BFD_ASSERT (s != NULL); - - /* We must generate a R_SH_COPY reloc to tell the dynamic linker to -@@ -2591,7 +2586,7 @@ sh_elf_adjust_dynamic_symbol (struct bfd - { - asection *srel; - -- srel = htab->srelbss; -+ srel = htab->root.srelbss; - BFD_ASSERT (srel != NULL); - srel->size += sizeof (Elf32_External_Rela); - h->needs_copy = 1; -@@ -3151,7 +3146,7 @@ sh_elf_size_dynamic_sections (bfd *outpu - || s == htab->root.sgotplt - || s == htab->sfuncdesc - || s == htab->srofixup -- || s == htab->sdynbss) -+ || s == htab->root.sdynbss) - { - /* Strip this section if we don't need it; see the - comment below. */ -@@ -5679,7 +5674,7 @@ sh_elf_check_relocs (bfd *abfd, struct b - void *vpp; - Elf_Internal_Sym *isym; - -- isym = bfd_sym_from_r_symndx (&htab->sym_cache, -+ isym = bfd_sym_from_r_symndx (&htab->root.sym_cache, - abfd, r_symndx); - if (isym == NULL) - return FALSE; -diff -rup binutils.orig/bfd/elf32-tic6x.c binutils-2.35/bfd/elf32-tic6x.c ---- binutils.orig/bfd/elf32-tic6x.c 2020-07-30 15:04:05.366466702 +0100 -+++ binutils-2.35/bfd/elf32-tic6x.c 2020-07-30 15:04:16.714393915 +0100 -@@ -46,9 +46,6 @@ struct elf32_tic6x_link_hash_table - /* C6X specific command line arguments. */ - struct elf32_tic6x_params params; - -- /* Small local sym cache. */ -- struct sym_cache sym_cache; -- - /* The output BFD, for convenience. */ - bfd *obfd; - -@@ -2729,7 +2726,7 @@ elf32_tic6x_check_relocs (bfd *abfd, str - if (r_symndx < symtab_hdr->sh_info) - { - /* A local symbol. */ -- isym = bfd_sym_from_r_symndx (&htab->sym_cache, -+ isym = bfd_sym_from_r_symndx (&htab->elf.sym_cache, - abfd, r_symndx); - if (isym == NULL) - return FALSE; -diff -rup binutils.orig/bfd/elf32-tilepro.c binutils-2.35/bfd/elf32-tilepro.c ---- binutils.orig/bfd/elf32-tilepro.c 2020-07-30 15:04:05.364466715 +0100 -+++ binutils-2.35/bfd/elf32-tilepro.c 2020-07-30 15:04:16.715393908 +0100 -@@ -727,19 +727,11 @@ tilepro_elf_mkobject (bfd *abfd) - #include "elf/common.h" - #include "elf/internal.h" - --struct tilepro_elf_link_hash_table --{ -- struct elf_link_hash_table elf; -- -- /* Small local sym to section mapping cache. */ -- struct sym_cache sym_cache; --}; -- - /* Get the Tilepro ELF linker hash table from a link_info structure. */ - #define tilepro_elf_hash_table(p) \ - (elf_hash_table_id ((struct elf_link_hash_table *) ((p)->hash)) \ - == TILEPRO_ELF_DATA \ -- ? ((struct tilepro_elf_link_hash_table *) ((p)->hash)) : NULL) -+ ? ((struct elf_link_hash_table *) ((p)->hash)) : NULL) - - static reloc_howto_type * - tilepro_reloc_type_lookup (bfd * abfd ATTRIBUTE_UNUSED, -@@ -1184,14 +1176,14 @@ link_hash_newfunc (struct bfd_hash_entry - static struct bfd_link_hash_table * - tilepro_elf_link_hash_table_create (bfd *abfd) - { -- struct tilepro_elf_link_hash_table *ret; -- size_t amt = sizeof (struct tilepro_elf_link_hash_table); -+ struct elf_link_hash_table *ret; -+ size_t amt = sizeof (struct elf_link_hash_table); - -- ret = (struct tilepro_elf_link_hash_table *) bfd_zmalloc (amt); -+ ret = (struct elf_link_hash_table *) bfd_zmalloc (amt); - if (ret == NULL) - return NULL; - -- if (!_bfd_elf_link_hash_table_init (&ret->elf, abfd, link_hash_newfunc, -+ if (!_bfd_elf_link_hash_table_init (ret, abfd, link_hash_newfunc, - sizeof (struct tilepro_elf_link_hash_entry), - TILEPRO_ELF_DATA)) - { -@@ -1199,7 +1191,7 @@ tilepro_elf_link_hash_table_create (bfd - return NULL; - } - -- return &ret->elf.root; -+ return &ret->root; - } - - /* Create the .got section. */ -@@ -1402,7 +1394,7 @@ static bfd_boolean - tilepro_elf_check_relocs (bfd *abfd, struct bfd_link_info *info, - asection *sec, const Elf_Internal_Rela *relocs) - { -- struct tilepro_elf_link_hash_table *htab; -+ struct elf_link_hash_table *htab; - Elf_Internal_Shdr *symtab_hdr; - struct elf_link_hash_entry **sym_hashes; - const Elf_Internal_Rela *rel; -@@ -1423,8 +1415,8 @@ tilepro_elf_check_relocs (bfd *abfd, str - - BFD_ASSERT (is_tilepro_elf (abfd) || num_relocs == 0); - -- if (htab->elf.dynobj == NULL) -- htab->elf.dynobj = abfd; -+ if (htab->dynobj == NULL) -+ htab->dynobj = abfd; - - rel_end = relocs + num_relocs; - for (rel = relocs; rel < rel_end; rel++) -@@ -1569,9 +1561,9 @@ tilepro_elf_check_relocs (bfd *abfd, str - } - } - -- if (htab->elf.sgot == NULL) -+ if (htab->sgot == NULL) - { -- if (!tilepro_elf_create_got_section (htab->elf.dynobj, info)) -+ if (!tilepro_elf_create_got_section (htab->dynobj, info)) - return FALSE; - } - break; -@@ -1716,7 +1708,7 @@ tilepro_elf_check_relocs (bfd *abfd, str - if (sreloc == NULL) - { - sreloc = _bfd_elf_make_dynamic_reloc_section -- (sec, htab->elf.dynobj, 2, abfd, /*rela?*/ TRUE); -+ (sec, htab->dynobj, 2, abfd, /*rela?*/ TRUE); - - if (sreloc == NULL) - return FALSE; -@@ -1754,7 +1746,7 @@ tilepro_elf_check_relocs (bfd *abfd, str - { - size_t amt = sizeof *p; - p = ((struct elf_dyn_relocs *) -- bfd_alloc (htab->elf.dynobj, amt)); -+ bfd_alloc (htab->dynobj, amt)); - if (p == NULL) - return FALSE; - p->next = *head; -@@ -1850,14 +1842,14 @@ static bfd_boolean - tilepro_elf_adjust_dynamic_symbol (struct bfd_link_info *info, - struct elf_link_hash_entry *h) - { -- struct tilepro_elf_link_hash_table *htab; -+ struct elf_link_hash_table *htab; - asection *s, *srel; - - htab = tilepro_elf_hash_table (info); - BFD_ASSERT (htab != NULL); - - /* Make sure we know what is going on here. */ -- BFD_ASSERT (htab->elf.dynobj != NULL -+ BFD_ASSERT (htab->dynobj != NULL - && (h->needs_plt - || h->is_weakalias - || (h->def_dynamic -@@ -1947,13 +1939,13 @@ tilepro_elf_adjust_dynamic_symbol (struc - .rel.bss section we are going to use. */ - if ((h->root.u.def.section->flags & SEC_READONLY) != 0) - { -- s = htab->elf.sdynrelro; -- srel = htab->elf.sreldynrelro; -+ s = htab->sdynrelro; -+ srel = htab->sreldynrelro; - } - else - { -- s = htab->elf.sdynbss; -- srel = htab->elf.srelbss; -+ s = htab->sdynbss; -+ srel = htab->srelbss; - } - if ((h->root.u.def.section->flags & SEC_ALLOC) != 0 && h->size != 0) - { -@@ -1971,7 +1963,7 @@ static bfd_boolean - allocate_dynrelocs (struct elf_link_hash_entry *h, void *inf) - { - struct bfd_link_info *info; -- struct tilepro_elf_link_hash_table *htab; -+ struct elf_link_hash_table *htab; - struct elf_dyn_relocs *p; - - if (h->root.type == bfd_link_hash_indirect) -@@ -1981,7 +1973,7 @@ allocate_dynrelocs (struct elf_link_hash - htab = tilepro_elf_hash_table (info); - BFD_ASSERT (htab != NULL); - -- if (htab->elf.dynamic_sections_created -+ if (htab->dynamic_sections_created - && h->plt.refcount > 0) - { - /* Make sure this symbol is output as a dynamic symbol. -@@ -1995,7 +1987,7 @@ allocate_dynrelocs (struct elf_link_hash - - if (WILL_CALL_FINISH_DYNAMIC_SYMBOL (1, bfd_link_pic (info), h)) - { -- asection *s = htab->elf.splt; -+ asection *s = htab->splt; - - /* Allocate room for the header. */ - if (s->size == 0) -@@ -2021,10 +2013,10 @@ allocate_dynrelocs (struct elf_link_hash - s->size += PLT_ENTRY_SIZE; - - /* We also need to make an entry in the .got.plt section. */ -- htab->elf.sgotplt->size += GOT_ENTRY_SIZE; -+ htab->sgotplt->size += GOT_ENTRY_SIZE; - - /* We also need to make an entry in the .rela.plt section. */ -- htab->elf.srelplt->size += TILEPRO_ELF_RELA_BYTES; -+ htab->srelplt->size += TILEPRO_ELF_RELA_BYTES; - } - else - { -@@ -2060,22 +2052,22 @@ allocate_dynrelocs (struct elf_link_hash - return FALSE; - } - -- s = htab->elf.sgot; -+ s = htab->sgot; - h->got.offset = s->size; - s->size += TILEPRO_BYTES_PER_WORD; - /* R_TILEPRO_IMM16_Xn_TLS_GD entries need 2 consecutive GOT slots. */ - if (tls_type == GOT_TLS_GD) - s->size += TILEPRO_BYTES_PER_WORD; -- dyn = htab->elf.dynamic_sections_created; -+ dyn = htab->dynamic_sections_created; - /* R_TILEPRO_IMM16_Xn_TLS_IE_xxx needs one dynamic relocation, - R_TILEPRO_IMM16_Xn_TLS_GD_xxx needs two if local symbol and two if - global. */ - if (tls_type == GOT_TLS_GD || tls_type == GOT_TLS_IE) -- htab->elf.srelgot->size += 2 * TILEPRO_ELF_RELA_BYTES; -+ htab->srelgot->size += 2 * TILEPRO_ELF_RELA_BYTES; - else if (WILL_CALL_FINISH_DYNAMIC_SYMBOL (dyn, - bfd_link_pic (info), - h)) -- htab->elf.srelgot->size += TILEPRO_ELF_RELA_BYTES; -+ htab->srelgot->size += TILEPRO_ELF_RELA_BYTES; - } - else - h->got.offset = (bfd_vma) -1; -@@ -2134,7 +2126,7 @@ allocate_dynrelocs (struct elf_link_hash - if (!h->non_got_ref - && ((h->def_dynamic - && !h->def_regular) -- || (htab->elf.dynamic_sections_created -+ || (htab->dynamic_sections_created - && (h->root.type == bfd_link_hash_undefweak - || h->root.type == bfd_link_hash_undefined)))) - { -@@ -2195,14 +2187,14 @@ tilepro_elf_size_dynamic_sections (bfd * - { - (void)output_bfd; - -- struct tilepro_elf_link_hash_table *htab; -+ struct elf_link_hash_table *htab; - bfd *dynobj; - asection *s; - bfd *ibfd; - - htab = tilepro_elf_hash_table (info); - BFD_ASSERT (htab != NULL); -- dynobj = htab->elf.dynobj; -+ dynobj = htab->dynobj; - BFD_ASSERT (dynobj != NULL); - - if (elf_hash_table (info)->dynamic_sections_created) -@@ -2268,8 +2260,8 @@ tilepro_elf_size_dynamic_sections (bfd * - locsymcount = symtab_hdr->sh_info; - end_local_got = local_got + locsymcount; - local_tls_type = _bfd_tilepro_elf_local_got_tls_type (ibfd); -- s = htab->elf.sgot; -- srel = htab->elf.srelgot; -+ s = htab->sgot; -+ srel = htab->srelgot; - for (; local_got < end_local_got; ++local_got, ++local_tls_type) - { - if (*local_got > 0) -@@ -2290,19 +2282,19 @@ tilepro_elf_size_dynamic_sections (bfd * - - /* Allocate global sym .plt and .got entries, and space for global - sym dynamic relocs. */ -- elf_link_hash_traverse (&htab->elf, allocate_dynrelocs, info); -+ elf_link_hash_traverse (htab, allocate_dynrelocs, info); - - if (elf_hash_table (info)->dynamic_sections_created) - { - /* If the .got section is more than 0x8000 bytes, we add - 0x8000 to the value of _GLOBAL_OFFSET_TABLE_, so that 16 - bit relocations have a greater chance of working. */ -- if (htab->elf.sgot->size >= 0x8000 -+ if (htab->sgot->size >= 0x8000 - && elf_hash_table (info)->hgot->root.u.def.value == 0) - elf_hash_table (info)->hgot->root.u.def.value = 0x8000; - } - -- if (htab->elf.sgotplt) -+ if (htab->sgotplt) - { - struct elf_link_hash_entry *got; - got = elf_link_hash_lookup (elf_hash_table (info), -@@ -2313,14 +2305,14 @@ tilepro_elf_size_dynamic_sections (bfd * - entries and there is no refeence to _GLOBAL_OFFSET_TABLE_. */ - if ((got == NULL - || !got->ref_regular_nonweak) -- && (htab->elf.sgotplt->size -+ && (htab->sgotplt->size - == GOTPLT_HEADER_SIZE) -- && (htab->elf.splt == NULL -- || htab->elf.splt->size == 0) -- && (htab->elf.sgot == NULL -- || (htab->elf.sgot->size -+ && (htab->splt == NULL -+ || htab->splt->size == 0) -+ && (htab->sgot == NULL -+ || (htab->sgot->size - == get_elf_backend_data (output_bfd)->got_header_size))) -- htab->elf.sgotplt->size = 0; -+ htab->sgotplt->size = 0; - } - - /* The check_relocs and adjust_dynamic_symbol entry points have -@@ -2331,11 +2323,11 @@ tilepro_elf_size_dynamic_sections (bfd * - if ((s->flags & SEC_LINKER_CREATED) == 0) - continue; - -- if (s == htab->elf.splt -- || s == htab->elf.sgot -- || s == htab->elf.sgotplt -- || s == htab->elf.sdynbss -- || s == htab->elf.sdynrelro) -+ if (s == htab->splt -+ || s == htab->sgot -+ || s == htab->sgotplt -+ || s == htab->sdynbss -+ || s == htab->sdynrelro) - { - /* Strip this section if we don't need it; see the - comment below. */ -@@ -2527,7 +2519,7 @@ tilepro_elf_relocate_section (bfd *outpu - Elf_Internal_Sym *local_syms, - asection **local_sections) - { -- struct tilepro_elf_link_hash_table *htab; -+ struct elf_link_hash_table *htab; - Elf_Internal_Shdr *symtab_hdr; - struct elf_link_hash_entry **sym_hashes; - bfd_vma *local_got_offsets; -@@ -2758,7 +2750,7 @@ tilepro_elf_relocate_section (bfd *outpu - case R_TILEPRO_IMM16_X1_GOT_HA: - /* Relocation is to the entry for this symbol in the global - offset table. */ -- if (htab->elf.sgot == NULL) -+ if (htab->sgot == NULL) - abort (); - - if (h != NULL) -@@ -2792,7 +2784,7 @@ tilepro_elf_relocate_section (bfd *outpu - else - { - bfd_put_32 (output_bfd, relocation, -- htab->elf.sgot->contents + off); -+ htab->sgot->contents + off); - h->got.offset |= 1; - } - } -@@ -2820,11 +2812,11 @@ tilepro_elf_relocate_section (bfd *outpu - - /* We need to generate a R_TILEPRO_RELATIVE reloc - for the dynamic linker. */ -- s = htab->elf.srelgot; -+ s = htab->srelgot; - BFD_ASSERT (s != NULL); - -- outrel.r_offset = (htab->elf.sgot->output_section->vma -- + htab->elf.sgot->output_offset -+ outrel.r_offset = (htab->sgot->output_section->vma -+ + htab->sgot->output_offset - + off); - outrel.r_info = ELF32_R_INFO (0, R_TILEPRO_RELATIVE); - outrel.r_addend = relocation; -@@ -2833,7 +2825,7 @@ tilepro_elf_relocate_section (bfd *outpu - } - - bfd_put_32 (output_bfd, relocation, -- htab->elf.sgot->contents + off); -+ htab->sgot->contents + off); - local_got_offsets[r_symndx] |= 1; - } - } -@@ -2845,7 +2837,7 @@ tilepro_elf_relocate_section (bfd *outpu - procedure linkage table. */ - BFD_ASSERT (h != NULL); - -- if (h->plt.offset == (bfd_vma) -1 || htab->elf.splt == NULL) -+ if (h->plt.offset == (bfd_vma) -1 || htab->splt == NULL) - { - /* We didn't make a PLT entry for this symbol. This - happens when statically linking PIC code, or when -@@ -2853,8 +2845,8 @@ tilepro_elf_relocate_section (bfd *outpu - break; - } - -- relocation = (htab->elf.splt->output_section->vma -- + htab->elf.splt->output_offset -+ relocation = (htab->splt->output_section->vma -+ + htab->splt->output_offset - + h->plt.offset); - unresolved_reloc = FALSE; - break; -@@ -2993,7 +2985,7 @@ tilepro_elf_relocate_section (bfd *outpu - outrel.r_addend = relocation + rel->r_addend; - - if (is_plt) -- sec = htab->elf.splt; -+ sec = htab->splt; - - if (bfd_is_abs_section (sec)) - indx = 0; -@@ -3016,7 +3008,7 @@ tilepro_elf_relocate_section (bfd *outpu - - if (indx == 0) - { -- osec = htab->elf.text_index_section; -+ osec = htab->text_index_section; - indx = elf_section_data (osec)->dynindx; - } - -@@ -3142,7 +3134,7 @@ tilepro_elf_relocate_section (bfd *outpu - local_got_offsets[r_symndx] |= 1; - } - -- if (htab->elf.sgot == NULL) -+ if (htab->sgot == NULL) - abort (); - - if ((off & 1) != 0) -@@ -3153,13 +3145,13 @@ tilepro_elf_relocate_section (bfd *outpu - int indx = 0; - bfd_boolean need_relocs = FALSE; - -- if (htab->elf.srelgot == NULL) -+ if (htab->srelgot == NULL) - abort (); - - if (h != NULL) - { - bfd_boolean dyn; -- dyn = htab->elf.dynamic_sections_created; -+ dyn = htab->dynamic_sections_created; - - if (WILL_CALL_FINISH_DYNAMIC_SYMBOL (dyn, - bfd_link_pic (info), -@@ -3190,18 +3182,18 @@ tilepro_elf_relocate_section (bfd *outpu - case R_TILEPRO_IMM16_X0_TLS_IE_HA: - case R_TILEPRO_IMM16_X1_TLS_IE_HA: - if (need_relocs) { -- bfd_put_32 (output_bfd, 0, htab->elf.sgot->contents + off); -- outrel.r_offset = (htab->elf.sgot->output_section->vma -- + htab->elf.sgot->output_offset + off); -+ bfd_put_32 (output_bfd, 0, htab->sgot->contents + off); -+ outrel.r_offset = (htab->sgot->output_section->vma -+ + htab->sgot->output_offset + off); - outrel.r_addend = 0; - if (indx == 0) - outrel.r_addend = relocation - dtpoff_base (info); - outrel.r_info = ELF32_R_INFO (indx, R_TILEPRO_TLS_TPOFF32); -- tilepro_elf_append_rela_32 (output_bfd, htab->elf.srelgot, -+ tilepro_elf_append_rela_32 (output_bfd, htab->srelgot, - &outrel); - } else { - bfd_put_32 (output_bfd, tpoff (info, relocation), -- htab->elf.sgot->contents + off); -+ htab->sgot->contents + off); - } - break; - -@@ -3214,31 +3206,31 @@ tilepro_elf_relocate_section (bfd *outpu - case R_TILEPRO_IMM16_X0_TLS_GD_HA: - case R_TILEPRO_IMM16_X1_TLS_GD_HA: - if (need_relocs) { -- outrel.r_offset = (htab->elf.sgot->output_section->vma -- + htab->elf.sgot->output_offset + off); -+ outrel.r_offset = (htab->sgot->output_section->vma -+ + htab->sgot->output_offset + off); - outrel.r_addend = 0; - outrel.r_info = ELF32_R_INFO (indx, R_TILEPRO_TLS_DTPMOD32); -- bfd_put_32 (output_bfd, 0, htab->elf.sgot->contents + off); -- tilepro_elf_append_rela_32 (output_bfd, htab->elf.srelgot, -+ bfd_put_32 (output_bfd, 0, htab->sgot->contents + off); -+ tilepro_elf_append_rela_32 (output_bfd, htab->srelgot, - &outrel); - if (indx == 0) - { - BFD_ASSERT (! unresolved_reloc); - bfd_put_32 (output_bfd, - relocation - dtpoff_base (info), -- (htab->elf.sgot->contents + off + -+ (htab->sgot->contents + off + - TILEPRO_BYTES_PER_WORD)); - } - else - { - bfd_put_32 (output_bfd, 0, -- (htab->elf.sgot->contents + off + -+ (htab->sgot->contents + off + - TILEPRO_BYTES_PER_WORD)); - outrel.r_info = ELF32_R_INFO (indx, - R_TILEPRO_TLS_DTPOFF32); - outrel.r_offset += TILEPRO_BYTES_PER_WORD; - tilepro_elf_append_rela_32 (output_bfd, -- htab->elf.srelgot, &outrel); -+ htab->srelgot, &outrel); - } - } - -@@ -3249,9 +3241,9 @@ tilepro_elf_relocate_section (bfd *outpu - symbol binding locally. Mark it as belonging - to module 1, the executable. */ - bfd_put_32 (output_bfd, 1, -- htab->elf.sgot->contents + off ); -+ htab->sgot->contents + off ); - bfd_put_32 (output_bfd, relocation - dtpoff_base (info), -- htab->elf.sgot->contents + off + -+ htab->sgot->contents + off + - TILEPRO_BYTES_PER_WORD); - } - break; -@@ -3411,7 +3403,7 @@ tilepro_elf_finish_dynamic_symbol (bfd * - struct elf_link_hash_entry *h, - Elf_Internal_Sym *sym) - { -- struct tilepro_elf_link_hash_table *htab; -+ struct elf_link_hash_table *htab; - - htab = tilepro_elf_hash_table (info); - BFD_ASSERT (htab != NULL); -@@ -3431,9 +3423,9 @@ tilepro_elf_finish_dynamic_symbol (bfd * - - BFD_ASSERT (h->dynindx != -1); - -- splt = htab->elf.splt; -- srela = htab->elf.srelplt; -- sgotplt = htab->elf.sgotplt; -+ splt = htab->splt; -+ srela = htab->srelplt; -+ sgotplt = htab->sgotplt; - - if (splt == NULL || srela == NULL) - abort (); -@@ -3481,8 +3473,8 @@ tilepro_elf_finish_dynamic_symbol (bfd * - - /* This symbol has an entry in the GOT. Set it up. */ - -- sgot = htab->elf.sgot; -- srela = htab->elf.srelgot; -+ sgot = htab->sgot; -+ srela = htab->srelgot; - BFD_ASSERT (sgot != NULL && srela != NULL); - - rela.r_offset = (sgot->output_section->vma -@@ -3528,16 +3520,16 @@ tilepro_elf_finish_dynamic_symbol (bfd * - + h->root.u.def.section->output_offset); - rela.r_info = ELF32_R_INFO (h->dynindx, R_TILEPRO_COPY); - rela.r_addend = 0; -- if (h->root.u.def.section == htab->elf.sdynrelro) -- s = htab->elf.sreldynrelro; -+ if (h->root.u.def.section == htab->sdynrelro) -+ s = htab->sreldynrelro; - else -- s = htab->elf.srelbss; -+ s = htab->srelbss; - tilepro_elf_append_rela_32 (output_bfd, s, &rela); - } - - /* Mark some specially defined symbols as absolute. */ -- if (h == htab->elf.hdynamic -- || (h == htab->elf.hgot || h == htab->elf.hplt)) -+ if (h == htab->hdynamic -+ || (h == htab->hgot || h == htab->hplt)) - sym->st_shndx = SHN_ABS; - - return TRUE; -@@ -3551,7 +3543,7 @@ tilepro_finish_dyn (bfd *output_bfd, str - asection *splt ATTRIBUTE_UNUSED) - { - Elf32_External_Dyn *dyncon, *dynconend; -- struct tilepro_elf_link_hash_table *htab; -+ struct elf_link_hash_table *htab; - - htab = tilepro_elf_hash_table (info); - BFD_ASSERT (htab != NULL); -@@ -3567,15 +3559,15 @@ tilepro_finish_dyn (bfd *output_bfd, str - switch (dyn.d_tag) - { - case DT_PLTGOT: -- s = htab->elf.sgotplt; -+ s = htab->sgotplt; - dyn.d_un.d_ptr = s->output_section->vma + s->output_offset; - break; - case DT_JMPREL: -- s = htab->elf.srelplt; -+ s = htab->srelplt; - dyn.d_un.d_ptr = s->output_section->vma + s->output_offset; - break; - case DT_PLTRELSZ: -- s = htab->elf.srelplt; -+ s = htab->srelplt; - dyn.d_un.d_val = s->size; - break; - default: -@@ -3593,11 +3585,11 @@ tilepro_elf_finish_dynamic_sections (bfd - { - bfd *dynobj; - asection *sdyn; -- struct tilepro_elf_link_hash_table *htab; -+ struct elf_link_hash_table *htab; - - htab = tilepro_elf_hash_table (info); - BFD_ASSERT (htab != NULL); -- dynobj = htab->elf.dynobj; -+ dynobj = htab->dynobj; - - sdyn = bfd_get_linker_section (dynobj, ".dynamic"); - -@@ -3606,7 +3598,7 @@ tilepro_elf_finish_dynamic_sections (bfd - asection *splt; - bfd_boolean ret; - -- splt = htab->elf.splt; -+ splt = htab->splt; - BFD_ASSERT (splt != NULL && sdyn != NULL); - - ret = tilepro_finish_dyn (output_bfd, info, dynobj, sdyn, splt); -@@ -3627,42 +3619,42 @@ tilepro_elf_finish_dynamic_sections (bfd - = PLT_ENTRY_SIZE; - } - -- if (htab->elf.sgotplt) -+ if (htab->sgotplt) - { -- if (bfd_is_abs_section (htab->elf.sgotplt->output_section)) -+ if (bfd_is_abs_section (htab->sgotplt->output_section)) - { - _bfd_error_handler -- (_("discarded output section: `%pA'"), htab->elf.sgotplt); -+ (_("discarded output section: `%pA'"), htab->sgotplt); - return FALSE; - } - -- if (htab->elf.sgotplt->size > 0) -+ if (htab->sgotplt->size > 0) - { - /* Write the first two entries in .got.plt, needed for the dynamic - linker. */ - bfd_put_32 (output_bfd, (bfd_vma) -1, -- htab->elf.sgotplt->contents); -+ htab->sgotplt->contents); - bfd_put_32 (output_bfd, (bfd_vma) 0, -- htab->elf.sgotplt->contents + GOT_ENTRY_SIZE); -+ htab->sgotplt->contents + GOT_ENTRY_SIZE); - } - -- elf_section_data (htab->elf.sgotplt->output_section)->this_hdr.sh_entsize -+ elf_section_data (htab->sgotplt->output_section)->this_hdr.sh_entsize - = GOT_ENTRY_SIZE; - } - -- if (htab->elf.sgot) -+ if (htab->sgot) - { -- if (htab->elf.sgot->size > 0) -+ if (htab->sgot->size > 0) - { - /* Set the first entry in the global offset table to the address of - the dynamic section. */ - bfd_vma val = (sdyn ? - sdyn->output_section->vma + sdyn->output_offset : - 0); -- bfd_put_32 (output_bfd, val, htab->elf.sgot->contents); -+ bfd_put_32 (output_bfd, val, htab->sgot->contents); - } - -- elf_section_data (htab->elf.sgot->output_section)->this_hdr.sh_entsize -+ elf_section_data (htab->sgot->output_section)->this_hdr.sh_entsize - = GOT_ENTRY_SIZE; - } - -diff -rup binutils.orig/bfd/elf64-ppc.c binutils-2.35/bfd/elf64-ppc.c ---- binutils.orig/bfd/elf64-ppc.c 2020-07-30 15:04:05.363466721 +0100 -+++ binutils-2.35/bfd/elf64-ppc.c 2020-07-30 15:04:16.716393902 +0100 -@@ -3250,9 +3250,6 @@ struct ppc_link_hash_table - - /* Incremented every time we size stubs. */ - unsigned int stub_iteration; -- -- /* Small local sym cache. */ -- struct sym_cache sym_cache; - }; - - /* Rename some of the generic section flags to better document how they -@@ -4383,7 +4380,8 @@ ppc64_elf_before_check_relocs (bfd *ibfd - Elf_Internal_Sym *isym; - asection *s; - -- isym = bfd_sym_from_r_symndx (&htab->sym_cache, ibfd, r_symndx); -+ isym = bfd_sym_from_r_symndx (&htab->elf.sym_cache, ibfd, -+ r_symndx); - if (isym == NULL) - { - if (elf_section_data (opd)->relocs != relocs) -@@ -4684,7 +4682,7 @@ ppc64_elf_check_relocs (bfd *abfd, struc - } - else - { -- Elf_Internal_Sym *isym = bfd_sym_from_r_symndx (&htab->sym_cache, -+ Elf_Internal_Sym *isym = bfd_sym_from_r_symndx (&htab->elf.sym_cache, - abfd, r_symndx); - if (isym == NULL) - return FALSE; -@@ -4955,7 +4953,7 @@ ppc64_elf_check_relocs (bfd *abfd, struc - { - Elf_Internal_Sym *isym; - -- isym = bfd_sym_from_r_symndx (&htab->sym_cache, -+ isym = bfd_sym_from_r_symndx (&htab->elf.sym_cache, - abfd, r_symndx); - if (isym == NULL) - return FALSE; -@@ -5231,7 +5229,7 @@ ppc64_elf_check_relocs (bfd *abfd, struc - void *vpp; - Elf_Internal_Sym *isym; - -- isym = bfd_sym_from_r_symndx (&htab->sym_cache, -+ isym = bfd_sym_from_r_symndx (&htab->elf.sym_cache, - abfd, r_symndx); - if (isym == NULL) - return FALSE; -diff -rup binutils.orig/bfd/elf64-s390.c binutils-2.35/bfd/elf64-s390.c ---- binutils.orig/bfd/elf64-s390.c 2020-07-30 15:04:05.369466683 +0100 -+++ binutils-2.35/bfd/elf64-s390.c 2020-07-30 15:04:16.716393902 +0100 -@@ -663,9 +663,6 @@ struct elf_s390_link_hash_table - bfd_vma offset; - } tls_ldm_got; - -- /* Small local sym cache. */ -- struct sym_cache sym_cache; -- - /* Options passed from the linker. */ - struct s390_elf_params *params; - }; -@@ -852,7 +849,7 @@ elf_s390_check_relocs (bfd *abfd, - if (r_symndx < symtab_hdr->sh_info) - { - /* A local symbol. */ -- isym = bfd_sym_from_r_symndx (&htab->sym_cache, -+ isym = bfd_sym_from_r_symndx (&htab->elf.sym_cache, - abfd, r_symndx); - if (isym == NULL) - return FALSE; -@@ -1216,7 +1213,7 @@ elf_s390_check_relocs (bfd *abfd, - asection *s; - void *vpp; - -- isym = bfd_sym_from_r_symndx (&htab->sym_cache, -+ isym = bfd_sym_from_r_symndx (&htab->elf.sym_cache, - abfd, r_symndx); - if (isym == NULL) - return FALSE; -@@ -2258,7 +2255,7 @@ elf_s390_relocate_section (bfd *output_b - & 0xff00f000) == 0xe300c000 - && bfd_get_8 (input_bfd, - contents + rel->r_offset + 3) == 0x04)) -- && (isym = bfd_sym_from_r_symndx (&htab->sym_cache, -+ && (isym = bfd_sym_from_r_symndx (&htab->elf.sym_cache, - input_bfd, r_symndx)) - && isym->st_shndx != SHN_ABS - && h != htab->elf.hdynamic -@@ -3572,7 +3569,7 @@ elf_s390_finish_dynamic_sections (bfd *o - if (local_plt[i].plt.offset != (bfd_vma) -1) - { - asection *sec = local_plt[i].sec; -- isym = bfd_sym_from_r_symndx (&htab->sym_cache, ibfd, i); -+ isym = bfd_sym_from_r_symndx (&htab->elf.sym_cache, ibfd, i); - if (isym == NULL) - return FALSE; - -diff -rup binutils.orig/bfd/elf64-x86-64.c binutils-2.35/bfd/elf64-x86-64.c ---- binutils.orig/bfd/elf64-x86-64.c 2020-07-30 15:04:05.365466709 +0100 -+++ binutils-2.35/bfd/elf64-x86-64.c 2020-07-30 15:04:16.717393895 +0100 -@@ -1371,7 +1371,7 @@ elf_x86_64_tls_transition (struct bfd_li - { - Elf_Internal_Sym *isym; - -- isym = bfd_sym_from_r_symndx (&htab->sym_cache, -+ isym = bfd_sym_from_r_symndx (&htab->elf.sym_cache, - abfd, r_symndx); - name = bfd_elf_sym_name (abfd, symtab_hdr, isym, NULL); - } -@@ -1559,7 +1559,7 @@ elf_x86_64_convert_load_reloc (bfd *abfd - if (h == NULL) - { - Elf_Internal_Sym *isym -- = bfd_sym_from_r_symndx (&htab->sym_cache, abfd, r_symndx); -+ = bfd_sym_from_r_symndx (&htab->elf.sym_cache, abfd, r_symndx); - - /* Skip relocation against undefined symbols. */ - if (isym->st_shndx == SHN_UNDEF) -@@ -1907,7 +1907,7 @@ elf_x86_64_check_relocs (bfd *abfd, stru - if (r_symndx < symtab_hdr->sh_info) - { - /* A local symbol. */ -- isym = bfd_sym_from_r_symndx (&htab->sym_cache, -+ isym = bfd_sym_from_r_symndx (&htab->elf.sym_cache, - abfd, r_symndx); - if (isym == NULL) - goto error_return; -@@ -2308,7 +2308,7 @@ elf_x86_64_check_relocs (bfd *abfd, stru - asection *s; - void **vpp; - -- isym = bfd_sym_from_r_symndx (&htab->sym_cache, -+ isym = bfd_sym_from_r_symndx (&htab->elf.sym_cache, - abfd, r_symndx); - if (isym == NULL) - goto error_return; -diff -rup binutils.orig/bfd/elfnn-aarch64.c binutils-2.35/bfd/elfnn-aarch64.c ---- binutils.orig/bfd/elfnn-aarch64.c 2020-07-30 15:04:05.371466670 +0100 -+++ binutils-2.35/bfd/elfnn-aarch64.c 2020-07-30 15:04:16.717393895 +0100 -@@ -2643,9 +2643,6 @@ struct elf_aarch64_link_hash_table - /* The bytes of the subsequent PLT entry. */ - const bfd_byte *plt_entry; - -- /* Small local sym cache. */ -- struct sym_cache sym_cache; -- - /* For convenience in allocate_dynrelocs. */ - bfd *obfd; - -@@ -7611,7 +7608,7 @@ elfNN_aarch64_check_relocs (bfd *abfd, s - if (r_symndx < symtab_hdr->sh_info) - { - /* A local symbol. */ -- isym = bfd_sym_from_r_symndx (&htab->sym_cache, -+ isym = bfd_sym_from_r_symndx (&htab->root.sym_cache, - abfd, r_symndx); - if (isym == NULL) - return FALSE; -@@ -7838,7 +7835,7 @@ elfNN_aarch64_check_relocs (bfd *abfd, s - asection *s; - void **vpp; - -- isym = bfd_sym_from_r_symndx (&htab->sym_cache, -+ isym = bfd_sym_from_r_symndx (&htab->root.sym_cache, - abfd, r_symndx); - if (isym == NULL) - return FALSE; -Only in binutils-2.35/bfd: elfnn-aarch64.c.orig -diff -rup binutils.orig/bfd/elfnn-riscv.c binutils-2.35/bfd/elfnn-riscv.c ---- binutils.orig/bfd/elfnn-riscv.c 2020-07-30 15:04:05.365466709 +0100 -+++ binutils-2.35/bfd/elfnn-riscv.c 2020-07-30 15:04:16.718393889 +0100 -@@ -113,9 +113,6 @@ struct riscv_elf_link_hash_table - /* Short-cuts to get to dynamic linker sections. */ - asection *sdyntdata; - -- /* Small local sym to section mapping cache. */ -- struct sym_cache sym_cache; -- - /* The max alignment of output sections. */ - bfd_vma max_alignment; - }; -@@ -681,7 +678,7 @@ riscv_elf_check_relocs (bfd *abfd, struc - void *vpp; - Elf_Internal_Sym *isym; - -- isym = bfd_sym_from_r_symndx (&htab->sym_cache, -+ isym = bfd_sym_from_r_symndx (&htab->elf.sym_cache, - abfd, r_symndx); - if (isym == NULL) - return FALSE; -diff -rup binutils.orig/bfd/elfxx-mips.c binutils-2.35/bfd/elfxx-mips.c ---- binutils.orig/bfd/elfxx-mips.c 2020-07-30 15:04:05.376466638 +0100 -+++ binutils-2.35/bfd/elfxx-mips.c 2020-07-30 15:04:16.719393882 +0100 -@@ -527,9 +527,6 @@ struct mips_elf_link_hash_table - returns null. */ - asection *(*add_stub_section) (const char *, asection *, asection *); - -- /* Small local sym cache. */ -- struct sym_cache sym_cache; -- - /* Is the PLT header compressed? */ - unsigned int plt_header_is_comp : 1; - }; -@@ -4401,7 +4398,7 @@ mips_elf_resolve_got_page_ref (void **re - Elf_Internal_Sym *isym; - - /* Read in the symbol. */ -- isym = bfd_sym_from_r_symndx (&htab->sym_cache, ref->u.abfd, -+ isym = bfd_sym_from_r_symndx (&htab->root.sym_cache, ref->u.abfd, - ref->symndx); - if (isym == NULL) - { -diff -rup binutils.orig/bfd/elfxx-sparc.c binutils-2.35/bfd/elfxx-sparc.c ---- binutils.orig/bfd/elfxx-sparc.c 2020-07-30 15:04:05.360466741 +0100 -+++ binutils-2.35/bfd/elfxx-sparc.c 2020-07-30 15:04:16.719393882 +0100 -@@ -1391,7 +1391,8 @@ _bfd_sparc_elf_check_relocs (bfd *abfd, - if (r_symndx < symtab_hdr->sh_info) - { - /* A local symbol. */ -- isym = bfd_sym_from_r_symndx (&htab->sym_cache, abfd, r_symndx); -+ isym = bfd_sym_from_r_symndx (&htab->elf.sym_cache, abfd, -+ r_symndx); - if (isym == NULL) - return FALSE; - -diff -rup binutils.orig/bfd/elfxx-sparc.h binutils-2.35/bfd/elfxx-sparc.h ---- binutils.orig/bfd/elfxx-sparc.h 2020-07-30 15:04:05.367466696 +0100 -+++ binutils-2.35/bfd/elfxx-sparc.h 2020-07-30 15:04:16.719393882 +0100 -@@ -55,9 +55,6 @@ struct _bfd_sparc_elf_link_hash_table - bfd_vma offset; - } tls_ldm_got; - -- /* Small local sym cache. */ -- struct sym_cache sym_cache; -- - /* Used by local STT_GNU_IFUNC symbols. */ - htab_t loc_hash_table; - void *loc_hash_memory; -diff -rup binutils.orig/bfd/elfxx-tilegx.c binutils-2.35/bfd/elfxx-tilegx.c ---- binutils.orig/bfd/elfxx-tilegx.c 2020-07-30 15:04:05.362466728 +0100 -+++ binutils-2.35/bfd/elfxx-tilegx.c 2020-07-30 15:04:16.719393882 +0100 -@@ -835,9 +835,6 @@ struct tilegx_elf_link_hash_table - /* Whether LE transition has been disabled for some of the - sections. */ - bfd_boolean disable_le_transition; -- -- /* Small local sym to section mapping cache. */ -- struct sym_cache sym_cache; - }; - - -@@ -1979,7 +1976,7 @@ tilegx_elf_check_relocs (bfd *abfd, stru - void *vpp; - Elf_Internal_Sym *isym; - -- isym = bfd_sym_from_r_symndx (&htab->sym_cache, -+ isym = bfd_sym_from_r_symndx (&htab->elf.sym_cache, - abfd, r_symndx); - if (isym == NULL) - return FALSE; -diff -rup binutils.orig/bfd/elfxx-x86.h binutils-2.35/bfd/elfxx-x86.h ---- binutils.orig/bfd/elfxx-x86.h 2020-07-30 15:04:05.378466625 +0100 -+++ binutils-2.35/bfd/elfxx-x86.h 2020-07-30 15:04:16.720393876 +0100 -@@ -468,9 +468,6 @@ struct elf_x86_link_hash_table - /* The amount of space used by the jump slots in the GOT. */ - bfd_vma sgotplt_jump_table_size; - -- /* Small local sym cache. */ -- struct sym_cache sym_cache; -- - /* _TLS_MODULE_BASE_ symbol. */ - struct bfd_link_hash_entry *tls_module_base; - diff --git a/binutils-attach-to-group.patch b/binutils-attach-to-group.patch deleted file mode 100644 index f33f861..0000000 --- a/binutils-attach-to-group.patch +++ /dev/null @@ -1,66 +0,0 @@ -diff -rup binutils.orig/gas/config/obj-elf.c binutils-2.30/gas/config/obj-elf.c ---- binutils.orig/gas/config/obj-elf.c 2018-09-24 17:50:06.974172867 +0100 -+++ binutils-2.30/gas/config/obj-elf.c 2018-09-25 15:19:33.559830794 +0100 -@@ -82,9 +82,11 @@ static void obj_elf_gnu_attribute (int); - static void obj_elf_tls_common (int); - static void obj_elf_lcomm (int); - static void obj_elf_struct (int); -+static void obj_elf_attach_to_group (int); - - static const pseudo_typeS elf_pseudo_table[] = - { -+ {"attach_to_group", obj_elf_attach_to_group, 0}, - {"comm", obj_elf_common, 0}, - {"common", obj_elf_common, 1}, - {"ident", obj_elf_ident, 0}, -@@ -1007,6 +1009,27 @@ obj_elf_section_name (void) - return name; - } - -+static void -+obj_elf_attach_to_group (int dummy ATTRIBUTE_UNUSED) -+{ -+ const char * gname = obj_elf_section_name (); -+ -+ if (gname == NULL) -+ { -+ as_warn ("group name not parseable"); -+ return; -+ } -+ -+ if (elf_group_name (now_seg)) -+ { -+ as_warn ("already has a group"); -+ return; -+ } -+ -+ elf_group_name (now_seg) = xstrdup (gname); -+ elf_section_flags (now_seg) |= SHF_GROUP; -+} -+ - void - obj_elf_section (int push) - { ---- binutils.orig/gas/doc/as.texi 2020-07-24 15:12:46.452951381 +0100 -+++ binutils-2.35/gas/doc/as.texi 2020-07-24 15:15:41.742825163 +0100 -@@ -4373,6 +4373,7 @@ Some machine configurations provide addi - * Altmacro:: @code{.altmacro} - * Ascii:: @code{.ascii "@var{string}"}@dots{} - * Asciz:: @code{.asciz "@var{string}"}@dots{} -+* Attach_to_group:: @code{.attach_to_group @var{name}} - * Balign:: @code{.balign [@var{abs-expr}[, @var{abs-expr}]]} - * Bundle directives:: @code{.bundle_align_mode @var{abs-expr}}, etc - * Byte:: @code{.byte @var{expressions}} -@@ -4670,6 +4671,12 @@ trailing zero byte) into consecutive add - @code{.asciz} is just like @code{.ascii}, but each string is followed by - a zero byte. The ``z'' in @samp{.asciz} stands for ``zero''. - -+@node Attach_to_group -+@section @code{.attach_to_group @var{name}} -+Attaches the current section to the named group. This is like declaring -+the section with the @code{G} attribute, but can be done after the section -+has been created. -+ - @node Balign - @section @code{.balign[wl] [@var{abs-expr}[, @var{abs-expr}[, @var{abs-expr}]]]} - diff --git a/binutils-config.patch b/binutils-config.patch deleted file mode 100644 index 8456584..0000000 --- a/binutils-config.patch +++ /dev/null @@ -1,44 +0,0 @@ -diff -Nrup a/libiberty/aclocal.m4 b/libiberty/aclocal.m4 ---- a/libiberty/aclocal.m4 2019-01-19 09:01:34.000000000 -0700 -+++ b/libiberty/aclocal.m4 2020-01-09 22:00:27.183312982 -0700 -@@ -147,7 +147,7 @@ if test $ac_cv_os_cray = yes; then - fi - - AC_CACHE_CHECK(stack direction for C alloca, ac_cv_c_stack_direction, --[AC_TRY_RUN([find_stack_direction () -+[AC_TRY_RUN([__attribute__ ((noclone,noinline)) find_stack_direction () - { - static char *addr = 0; - auto char dummy; -diff --git a/config/intdiv0.m4 b/config/intdiv0.m4 -index 55dddcf1..ba906efc 100644 ---- a/config/intdiv0.m4 -+++ b/config/intdiv0.m4 -@@ -31,10 +31,10 @@ sigfpe_handler (sig) int sig; - exit (sig != SIGFPE); - } - --int x = 1; --int y = 0; --int z; --int nan; -+volatile int x = 1; -+volatile int y = 0; -+volatile int z; -+volatile int nan; - - int main () - { -diff --git a/libiberty/configure.ac b/libiberty/configure.ac -index f1ce7601..fc20d228 100644 ---- a/libiberty/configure.ac -+++ b/libiberty/configure.ac -@@ -661,7 +661,7 @@ if test -z "${setobjs}"; then - for v in $vars; do - AC_MSG_CHECKING([for $v]) - AC_CACHE_VAL(libiberty_cv_var_$v, -- [AC_LINK_IFELSE([AC_LANG_PROGRAM([[int *p;]],[[extern int $v []; p = $v;]])], -+ [AC_LINK_IFELSE([AC_LANG_PROGRAM([[__attribute__ ((used)) int *p;]],[[extern int $v []; p = $v;]])], - [eval "libiberty_cv_var_$v=yes"], - [eval "libiberty_cv_var_$v=no"])]) - if eval "test \"`echo '$libiberty_cv_var_'$v`\" = yes"; then diff --git a/binutils-do-not-link-with-static-libstdc++.patch b/binutils-do-not-link-with-static-libstdc++.patch deleted file mode 100644 index 49d46c2..0000000 --- a/binutils-do-not-link-with-static-libstdc++.patch +++ /dev/null @@ -1,83 +0,0 @@ -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 - fi - fi - --# Check whether -static-libstdc++ -static-libgcc is supported. --have_static_libs=no --if test "$GCC" = yes; then -- saved_LDFLAGS="$LDFLAGS" -- -- LDFLAGS="$LDFLAGS -static-libstdc++ -static-libgcc" -- { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether g++ accepts -static-libstdc++ -static-libgcc" >&5 --$as_echo_n "checking whether g++ accepts -static-libstdc++ -static-libgcc... " >&6; } -- ac_ext=cpp --ac_cpp='$CXXCPP $CPPFLAGS' --ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5' --ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' --ac_compiler_gnu=$ac_cv_cxx_compiler_gnu -- -- --cat confdefs.h - <<_ACEOF >conftest.$ac_ext --/* end confdefs.h. */ -- --#if (__GNUC__ < 4) || (__GNUC__ == 4 && __GNUC_MINOR__ < 5) --#error -static-libstdc++ not implemented --#endif --int main() {} --_ACEOF --if ac_fn_cxx_try_link "$LINENO"; then : -- { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 --$as_echo "yes" >&6; }; have_static_libs=yes --else -- { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 --$as_echo "no" >&6; } --fi --rm -f core conftest.err conftest.$ac_objext \ -- conftest$ac_exeext conftest.$ac_ext -- ac_ext=c --ac_cpp='$CPP $CPPFLAGS' --ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' --ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' --ac_compiler_gnu=$ac_cv_c_compiler_gnu -- -- -- LDFLAGS="$saved_LDFLAGS" --fi -- -- - - - if test -n "$ac_tool_prefix"; then -diff -rup binutils.orig/configure.ac binutils-2.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 - fi - fi - --# Check whether -static-libstdc++ -static-libgcc is supported. --have_static_libs=no --if test "$GCC" = yes; then -- saved_LDFLAGS="$LDFLAGS" -- -- LDFLAGS="$LDFLAGS -static-libstdc++ -static-libgcc" -- AC_MSG_CHECKING([whether g++ accepts -static-libstdc++ -static-libgcc]) -- AC_LANG_PUSH(C++) -- AC_LINK_IFELSE([AC_LANG_SOURCE([ --#if (__GNUC__ < 4) || (__GNUC__ == 4 && __GNUC_MINOR__ < 5) --#error -static-libstdc++ not implemented --#endif --int main() {}])], -- [AC_MSG_RESULT([yes]); have_static_libs=yes], -- [AC_MSG_RESULT([no])]) -- AC_LANG_POP(C++) -- -- LDFLAGS="$saved_LDFLAGS" --fi -- - ACX_PROG_GNAT - ACX_PROG_CMP_IGNORE_INITIAL - diff --git a/dead.package b/dead.package new file mode 100644 index 0000000..e28ca0b --- /dev/null +++ b/dead.package @@ -0,0 +1 @@ +gcc-toolset-10-binutils package is retired on branch c10s for CS-2551 \ No newline at end of file