diff --git a/.gcc-toolset-10-binutils.metadata b/.gcc-toolset-10-binutils.metadata new file mode 100644 index 0000000..cd74f7b --- /dev/null +++ b/.gcc-toolset-10-binutils.metadata @@ -0,0 +1,2 @@ +cd45a512af1c8a508976c1beb4f5825b3bb89f4d SOURCES/binutils-2.32.tar.xz +d3e5c9fc829ed40648110da6fe46c2fb1ed8aadb SOURCES/standards.info.gz diff --git a/.gitignore b/.gitignore new file mode 100644 index 0000000..8c92155 --- /dev/null +++ b/.gitignore @@ -0,0 +1,2 @@ +SOURCES/binutils-2.32.tar.xz +SOURCES/standards.info.gz diff --git a/SOURCES/binutils-2.19.50.0.1-output-format.sed b/SOURCES/binutils-2.19.50.0.1-output-format.sed new file mode 100644 index 0000000..fd770cb --- /dev/null +++ b/SOURCES/binutils-2.19.50.0.1-output-format.sed @@ -0,0 +1,38 @@ +# 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/SOURCES/binutils-2.20.51.0.2-libtool-lib64.patch b/SOURCES/binutils-2.20.51.0.2-libtool-lib64.patch new file mode 100644 index 0000000..142fc7e --- /dev/null +++ b/SOURCES/binutils-2.20.51.0.2-libtool-lib64.patch @@ -0,0 +1,236 @@ +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/SOURCES/binutils-2.22.52.0.4-no-config-h-check.patch b/SOURCES/binutils-2.22.52.0.4-no-config-h-check.patch new file mode 100644 index 0000000..c89195a --- /dev/null +++ b/SOURCES/binutils-2.22.52.0.4-no-config-h-check.patch @@ -0,0 +1,28 @@ +--- a/bfd/bfd-in.h 2012-08-02 10:56:34.561769686 +0100 ++++ b/bfd/bfd-in.h 2012-08-02 11:13:27.134797755 +0100 +@@ -25,11 +25,6 @@ + #ifndef __BFD_H_SEEN__ + #define __BFD_H_SEEN__ + +-/* PR 14072: Ensure that config.h is included first. */ +-#if !defined PACKAGE && !defined PACKAGE_VERSION +-#error config.h must be included before this header +-#endif +- + #ifdef __cplusplus + extern "C" { + #endif +--- a/bfd/bfd-in2.h 2012-08-02 10:56:34.349769680 +0100 ++++ b/bfd/bfd-in2.h 2012-08-02 11:13:40.015798113 +0100 +@@ -32,11 +32,6 @@ + #ifndef __BFD_H_SEEN__ + #define __BFD_H_SEEN__ + +-/* PR 14072: Ensure that config.h is included first. */ +-#if !defined PACKAGE && !defined PACKAGE_VERSION +-#error config.h must be included before this header +-#endif +- + #ifdef __cplusplus + extern "C" { + #endif diff --git a/SOURCES/binutils-2.25-set-long-long.patch b/SOURCES/binutils-2.25-set-long-long.patch new file mode 100644 index 0000000..1ea7418 --- /dev/null +++ b/SOURCES/binutils-2.25-set-long-long.patch @@ -0,0 +1,38 @@ +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/SOURCES/binutils-2.25-version.patch b/SOURCES/binutils-2.25-version.patch new file mode 100644 index 0000000..d97e81b --- /dev/null +++ b/SOURCES/binutils-2.25-version.patch @@ -0,0 +1,44 @@ +--- 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/SOURCES/binutils-2.27-aarch64-ifunc.patch b/SOURCES/binutils-2.27-aarch64-ifunc.patch new file mode 100644 index 0000000..562ef18 --- /dev/null +++ b/SOURCES/binutils-2.27-aarch64-ifunc.patch @@ -0,0 +1,11 @@ +diff -rup binutils.orig/bfd/elfnn-aarch64.c binutils-2.27/bfd/elfnn-aarch64.c +--- binutils.orig/bfd/elfnn-aarch64.c 2017-02-21 10:45:19.311956006 +0000 ++++ binutils-2.27/bfd/elfnn-aarch64.c 2017-02-21 11:55:07.517922655 +0000 +@@ -4947,6 +4947,7 @@ elfNN_aarch64_final_link_relocate (reloc + it here if it is defined in a non-shared object. */ + if (h != NULL + && h->type == STT_GNU_IFUNC ++ && (input_section->flags & SEC_ALLOC) + && h->def_regular) + { + asection *plt; diff --git a/SOURCES/binutils-2.28-ignore-gold-duplicates.patch b/SOURCES/binutils-2.28-ignore-gold-duplicates.patch new file mode 100644 index 0000000..346f956 --- /dev/null +++ b/SOURCES/binutils-2.28-ignore-gold-duplicates.patch @@ -0,0 +1,14 @@ +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/SOURCES/binutils-2.29-filename-in-error-messages.patch b/SOURCES/binutils-2.29-filename-in-error-messages.patch new file mode 100644 index 0000000..d8ce241 --- /dev/null +++ b/SOURCES/binutils-2.29-filename-in-error-messages.patch @@ -0,0 +1,124 @@ +--- binutils.orig/binutils/readelf.c 2018-01-22 15:48:10.450701702 +0000 ++++ binutils-2.30.0/binutils/readelf.c 2018-01-22 15:55:26.739588657 +0000 +@@ -19019,75 +19019,85 @@ 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); +- fclose (filedata->handle); +- free (filedata); +- return FALSE; +- } +- +- filedata->file_size = (bfd_size_type) statbuf.st_size; +- +- if (memcmp (armag, ARMAG, SARMAG) == 0) +- { +- if (! process_archive (filedata, FALSE)) +- ret = FALSE; +- } +- else if (memcmp (armag, ARMAGT, SARMAG) == 0) +- { +- if ( ! process_archive (filedata, TRUE)) +- ret = FALSE; ++ error (_("Failed to read file's magic number\n")); + } + else + { +- if (do_archive_index) +- error (_("File %s is not an archive so its index cannot be displayed.\n"), +- file_name); ++ filedata->file_size = (bfd_size_type) statbuf.st_size; + +- rewind (filedata->handle); +- archive_file_size = archive_file_offset = 0; +- +- if (! process_object (filedata)) +- ret = FALSE; ++ if (memcmp (armag, ARMAG, SARMAG) == 0) ++ { ++ if (process_archive (filedata, FALSE)) ++ ret = TRUE; ++ } ++ else if (memcmp (armag, ARMAGT, SARMAG) == 0) ++ { ++ if (process_archive (filedata, TRUE)) ++ ret = TRUE; ++ } ++ else ++ { ++ if (do_archive_index) ++ error (_("Not an archive so its index cannot be displayed.\n")); ++ ++ rewind (filedata->handle); ++ archive_file_size = archive_file_offset = 0; ++ ++ if (process_object (filedata)) ++ ret = TRUE; ++ } + } + + fclose (filedata->handle); ++ done: + free (filedata); ++ free (program_name); ++ program_name = saved_program_name; + + return ret; + } diff --git a/SOURCES/binutils-2.29-revert-PLT-elision.patch b/SOURCES/binutils-2.29-revert-PLT-elision.patch new file mode 100644 index 0000000..c5478f0 --- /dev/null +++ b/SOURCES/binutils-2.29-revert-PLT-elision.patch @@ -0,0 +1,266 @@ +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-ibt.dd binutils-2.29.1/ld/testsuite/ld-x86-64/plt-main-ibt.dd +--- binutils.orig/ld/testsuite/ld-x86-64/plt-main-ibt.dd 2017-11-15 13:32:39.412064336 +0000 ++++ binutils-2.29.1/ld/testsuite/ld-x86-64/plt-main-ibt.dd 2017-11-15 15:06:35.148842897 +0000 +@@ -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\) # ...... <[_a-z]+> + #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 diff --git a/SOURCES/binutils-CVE-2019-12972.patch b/SOURCES/binutils-CVE-2019-12972.patch new file mode 100644 index 0000000..2b88488 --- /dev/null +++ b/SOURCES/binutils-CVE-2019-12972.patch @@ -0,0 +1,17 @@ +--- binutils.orig/bfd/elfcode.h 2020-05-13 11:18:04.792779506 +0100 ++++ binutils-2.32/bfd/elfcode.h 2020-05-13 11:19:36.270101134 +0100 +@@ -750,12 +750,9 @@ elf_object_p (bfd *abfd) + != 0)) + abfd->flags &= ~D_PAGED; + } +- } + +- /* A further sanity check. */ +- if (i_ehdrp->e_shnum != 0) +- { +- if (i_ehdrp->e_shstrndx >= elf_numsections (abfd)) ++ if (i_ehdrp->e_shstrndx >= elf_numsections (abfd) ++ || i_shdrp[i_ehdrp->e_shstrndx].sh_type != SHT_STRTAB) + { + /* PR 2257: + We used to just goto got_wrong_format_error here diff --git a/SOURCES/binutils-CVE-2019-14250.patch b/SOURCES/binutils-CVE-2019-14250.patch new file mode 100644 index 0000000..c37b92e --- /dev/null +++ b/SOURCES/binutils-CVE-2019-14250.patch @@ -0,0 +1,17 @@ +--- binutils.orig/libiberty/simple-object-elf.c 2019-08-09 14:13:51.677330065 +0100 ++++ binutils-2.32/libiberty/simple-object-elf.c 2019-08-09 14:14:31.177076298 +0100 +@@ -549,6 +549,14 @@ simple_object_elf_match (unsigned char h + return NULL; + } + ++ if (eor->shstrndx == 0) ++ { ++ *errmsg = "invalid ELF shstrndx == 0"; ++ *err = 0; ++ XDELETE (eor); ++ return NULL; ++ } ++ + return (void *) eor; + } + diff --git a/SOURCES/binutils-CVE-2019-14444.patch b/SOURCES/binutils-CVE-2019-14444.patch new file mode 100644 index 0000000..ad554f5 --- /dev/null +++ b/SOURCES/binutils-CVE-2019-14444.patch @@ -0,0 +1,11 @@ +--- binutils.orig/binutils/readelf.c 2019-08-13 10:03:33.518792590 +0100 ++++ binutils-2.32/binutils/readelf.c 2019-08-13 10:04:22.885418269 +0100 +@@ -13234,7 +13234,7 @@ apply_relocations (Filedata * + } + + rloc = start + rp->r_offset; +- if ((rloc + reloc_size) > end || (rloc < start)) ++ if (rloc >= end || (rloc + reloc_size) > end || (rloc < start)) + { + warn (_("skipping invalid relocation offset 0x%lx in section %s\n"), + (unsigned long) rp->r_offset, diff --git a/SOURCES/binutils-CVE-2019-17450.patch b/SOURCES/binutils-CVE-2019-17450.patch new file mode 100644 index 0000000..c664ee8 --- /dev/null +++ b/SOURCES/binutils-CVE-2019-17450.patch @@ -0,0 +1,62 @@ +--- binutils.orig/bfd/dwarf2.c 2019-11-13 11:49:52.211121564 +0000 ++++ binutils-2.33.1/bfd/dwarf2.c 2019-11-13 11:53:26.991423055 +0000 +@@ -2813,8 +2813,8 @@ static bfd_boolean comp_unit_maybe_decod + + static bfd_boolean + find_abstract_instance (struct comp_unit * unit, +- bfd_byte * orig_info_ptr, + struct attribute * attr_ptr, ++ unsigned int recur_count, + const char ** pname, + bfd_boolean * is_linkage, + char ** filename_ptr, +@@ -2829,6 +2829,14 @@ find_abstract_instance (struct comp_unit + struct attribute attr; + const char *name = NULL; + ++ if (recur_count == 100) ++ { ++ _bfd_error_handler ++ (_("DWARF error: abstract instance recursion detected")); ++ bfd_set_error (bfd_error_bad_value); ++ return FALSE; ++ } ++ + /* DW_FORM_ref_addr can reference an entry in a different CU. It + is an offset from the .debug_info section, not the current CU. */ + if (attr_ptr->form == DW_FORM_ref_addr) +@@ -2962,15 +2970,7 @@ find_abstract_instance (struct comp_unit + info_ptr, info_ptr_end); + if (info_ptr == NULL) + break; +- /* It doesn't ever make sense for DW_AT_specification to +- refer to the same DIE. Stop simple recursion. */ +- if (info_ptr == orig_info_ptr) +- { +- _bfd_error_handler +- (_("DWARF error: abstract instance recursion detected")); +- bfd_set_error (bfd_error_bad_value); +- return FALSE; +- } ++ + switch (attr.name) + { + case DW_AT_name: +@@ -2984,7 +2984,7 @@ find_abstract_instance (struct comp_unit + } + break; + case DW_AT_specification: +- if (!find_abstract_instance (unit, info_ptr, &attr, ++ if (!find_abstract_instance (unit, &attr, recur_count + 1, + &name, is_linkage, + filename_ptr, linenumber_ptr)) + return FALSE; +@@ -3200,7 +3200,7 @@ scan_unit_for_symbols (struct comp_unit + + case DW_AT_abstract_origin: + case DW_AT_specification: +- if (!find_abstract_instance (unit, info_ptr, &attr, ++ if (!find_abstract_instance (unit, &attr, 0, + &func->name, + &func->is_linkage, + &func->file, diff --git a/SOURCES/binutils-CVE-2019-17451.patch b/SOURCES/binutils-CVE-2019-17451.patch new file mode 100644 index 0000000..0f503a3 --- /dev/null +++ b/SOURCES/binutils-CVE-2019-17451.patch @@ -0,0 +1,20 @@ +--- binutils.orig/bfd/dwarf2.c 2019-11-13 11:32:09.395430104 +0000 ++++ binutils-2.33.1/bfd/dwarf2.c 2019-11-13 11:33:17.272899503 +0000 +@@ -4440,7 +4440,16 @@ _bfd_dwarf2_slurp_debug_info (bfd *abfd, + for (total_size = 0; + msec; + msec = find_debug_info (debug_bfd, debug_sections, msec)) +- total_size += msec->size; ++ { ++ /* Catch PR25070 testcase overflowing size calculation here. */ ++ if (total_size + msec->size < total_size ++ || total_size + msec->size < msec->size) ++ { ++ bfd_set_error (bfd_error_no_memory); ++ return FALSE; ++ } ++ total_size += msec->size; ++ } + + stash->info_ptr_memory = (bfd_byte *) bfd_malloc (total_size); + if (stash->info_ptr_memory == NULL) diff --git a/SOURCES/binutils-CVE-2019-9071.patch b/SOURCES/binutils-CVE-2019-9071.patch new file mode 100644 index 0000000..f4ef3bc --- /dev/null +++ b/SOURCES/binutils-CVE-2019-9071.patch @@ -0,0 +1,110 @@ +--- binutils.orig/libiberty/cp-demangle.c 2019-04-10 10:31:27.854997707 +0100 ++++ binutils-2.31.1/libiberty/cp-demangle.c 2019-04-10 16:00:35.820350978 +0100 +@@ -858,7 +858,7 @@ CP_STATIC_IF_GLIBCPP_V3 + int + cplus_demangle_fill_name (struct demangle_component *p, const char *s, int len) + { +- if (p == NULL || s == NULL || len == 0) ++ if (p == NULL || s == NULL || len <= 0) + return 0; + p->d_printing = 0; + p->type = DEMANGLE_COMPONENT_NAME; +@@ -4032,7 +4032,7 @@ d_growable_string_callback_adapter (cons + are larger than the actual numbers encountered. */ + + static void +-d_count_templates_scopes (int *num_templates, int *num_scopes, ++d_count_templates_scopes (struct d_print_info *dpi, + const struct demangle_component *dc) + { + if (dc == NULL) +@@ -4052,13 +4052,13 @@ d_count_templates_scopes (int *num_templ + break; + + case DEMANGLE_COMPONENT_TEMPLATE: +- (*num_templates)++; ++ dpi->num_copy_templates++; + goto recurse_left_right; + + case DEMANGLE_COMPONENT_REFERENCE: + case DEMANGLE_COMPONENT_RVALUE_REFERENCE: + if (d_left (dc)->type == DEMANGLE_COMPONENT_TEMPLATE_PARAM) +- (*num_scopes)++; ++ dpi->num_saved_scopes++; + goto recurse_left_right; + + case DEMANGLE_COMPONENT_QUAL_NAME: +@@ -4122,42 +4122,42 @@ d_count_templates_scopes (int *num_templ + case DEMANGLE_COMPONENT_TAGGED_NAME: + case DEMANGLE_COMPONENT_CLONE: + recurse_left_right: +- d_count_templates_scopes (num_templates, num_scopes, +- d_left (dc)); +- d_count_templates_scopes (num_templates, num_scopes, +- d_right (dc)); ++ /* PR 89394 - Check for too much recursion. */ ++ if (dpi->recursion > DEMANGLE_RECURSION_LIMIT) ++ /* FIXME: There ought to be a way to report to the ++ user that the recursion limit has been reached. */ ++ return; ++ ++ ++ dpi->recursion; ++ d_count_templates_scopes (dpi, d_left (dc)); ++ d_count_templates_scopes (dpi, d_right (dc)); ++ -- dpi->recursion; + break; + + case DEMANGLE_COMPONENT_CTOR: +- d_count_templates_scopes (num_templates, num_scopes, +- dc->u.s_ctor.name); ++ d_count_templates_scopes (dpi, dc->u.s_ctor.name); + break; + + case DEMANGLE_COMPONENT_DTOR: +- d_count_templates_scopes (num_templates, num_scopes, +- dc->u.s_dtor.name); ++ d_count_templates_scopes (dpi, dc->u.s_dtor.name); + break; + + case DEMANGLE_COMPONENT_EXTENDED_OPERATOR: +- d_count_templates_scopes (num_templates, num_scopes, +- dc->u.s_extended_operator.name); ++ d_count_templates_scopes (dpi, dc->u.s_extended_operator.name); + break; + + case DEMANGLE_COMPONENT_FIXED_TYPE: +- d_count_templates_scopes (num_templates, num_scopes, +- dc->u.s_fixed.length); ++ d_count_templates_scopes (dpi, dc->u.s_fixed.length); + break; + + case DEMANGLE_COMPONENT_GLOBAL_CONSTRUCTORS: + case DEMANGLE_COMPONENT_GLOBAL_DESTRUCTORS: +- d_count_templates_scopes (num_templates, num_scopes, +- d_left (dc)); ++ d_count_templates_scopes (dpi, d_left (dc)); + break; + + case DEMANGLE_COMPONENT_LAMBDA: + case DEMANGLE_COMPONENT_DEFAULT_ARG: +- d_count_templates_scopes (num_templates, num_scopes, +- dc->u.s_unary_num.sub); ++ d_count_templates_scopes (dpi, dc->u.s_unary_num.sub); + break; + } + } +@@ -4192,8 +4192,12 @@ d_print_init (struct d_print_info *dpi, + dpi->next_copy_template = 0; + dpi->num_copy_templates = 0; + +- d_count_templates_scopes (&dpi->num_copy_templates, +- &dpi->num_saved_scopes, dc); ++ d_count_templates_scopes (dpi, dc); ++ /* If we did not reach the recursion limit, then reset the ++ current recursion value back to 0, so that we can print ++ the templates. */ ++ if (dpi->recursion < DEMANGLE_RECURSION_LIMIT) ++ dpi->recursion = 0; + dpi->num_copy_templates *= dpi->num_saved_scopes; + + dpi->current_template = NULL; diff --git a/SOURCES/binutils-CVE-2019-9073.patch b/SOURCES/binutils-CVE-2019-9073.patch new file mode 100644 index 0000000..37256f4 --- /dev/null +++ b/SOURCES/binutils-CVE-2019-9073.patch @@ -0,0 +1,13 @@ +--- binutils.orig/binutils/objdump.c 2019-02-25 16:12:30.394056901 +0000 ++++ binutils-2.31.1/binutils/objdump.c 2019-02-25 16:13:07.224778005 +0000 +@@ -2993,7 +2993,9 @@ dump_bfd_header (bfd *abfd) + static void + dump_bfd_private_header (bfd *abfd) + { +- bfd_print_private_bfd_data (abfd, stdout); ++ if (!bfd_print_private_bfd_data (abfd, stdout)) ++ non_fatal (_("warning: private headers incomplete: %s"), ++ bfd_errmsg (bfd_get_error ())); + } + + static void diff --git a/SOURCES/binutils-CVE-2019-9074.patch b/SOURCES/binutils-CVE-2019-9074.patch new file mode 100644 index 0000000..84f0fd5 --- /dev/null +++ b/SOURCES/binutils-CVE-2019-9074.patch @@ -0,0 +1,32 @@ +--- binutils.orig/bfd/pei-x86_64.c 2019-02-25 16:12:29.798061414 +0000 ++++ binutils-2.31.1/bfd/pei-x86_64.c 2019-02-25 17:09:02.783425236 +0000 +@@ -541,7 +541,7 @@ pex64_bfd_print_pdata_section (bfd *abfd + /* virt_size might be zero for objects. */ + if (stop == 0 && strcmp (abfd->xvec->name, "pe-x86-64") == 0) + { +- stop = (datasize / onaline) * onaline; ++ stop = datasize; + virt_size_is_zero = TRUE; + } + else if (datasize < stop) +@@ -551,8 +551,8 @@ pex64_bfd_print_pdata_section (bfd *abfd + _("Warning: %s section size (%ld) is smaller than virtual size (%ld)\n"), + pdata_section->name, (unsigned long) datasize, + (unsigned long) stop); +- /* Be sure not to read passed datasize. */ +- stop = datasize / onaline; ++ /* Be sure not to read past datasize. */ ++ stop = datasize; + } + + /* Display functions table. */ +@@ -724,8 +724,7 @@ pex64_bfd_print_pdata_section (bfd *abfd + altent += imagebase; + + if (altent >= pdata_vma +- && (altent + PDATA_ROW_SIZE <= pdata_vma +- + pei_section_data (abfd, pdata_section)->virt_size)) ++ && altent - pdata_vma + PDATA_ROW_SIZE <= stop) + { + pex64_get_runtime_function + (abfd, &arf, &pdata[altent - pdata_vma]); diff --git a/SOURCES/binutils-CVE-2019-9075.patch b/SOURCES/binutils-CVE-2019-9075.patch new file mode 100644 index 0000000..ec3e8ca --- /dev/null +++ b/SOURCES/binutils-CVE-2019-9075.patch @@ -0,0 +1,73 @@ +diff -rup binutils.orig/bfd/archive64.c binutils-2.31.1/bfd/archive64.c +--- binutils.orig/bfd/archive64.c 2019-02-26 11:17:11.882530151 +0000 ++++ binutils-2.31.1/bfd/archive64.c 2019-02-26 11:19:18.422488805 +0000 +@@ -100,8 +100,6 @@ _bfd_archive_64_bit_slurp_armap (bfd *ab + return FALSE; + carsyms = ardata->symdefs; + stringbase = ((char *) ardata->symdefs) + carsym_size; +- stringbase[stringsize] = 0; +- stringend = stringbase + stringsize; + + raw_armap = (bfd_byte *) bfd_alloc (abfd, ptrsize); + if (raw_armap == NULL) +@@ -115,15 +113,17 @@ _bfd_archive_64_bit_slurp_armap (bfd *ab + goto release_raw_armap; + } + ++ stringend = stringbase + stringsize; ++ *stringend = 0; + for (i = 0; i < nsymz; i++) + { + carsyms->file_offset = bfd_getb64 (raw_armap + i * 8); + carsyms->name = stringbase; +- if (stringbase < stringend) +- stringbase += strlen (stringbase) + 1; ++ stringbase += strlen (stringbase); ++ if (stringbase != stringend) ++ ++stringbase; + ++carsyms; + } +- *stringbase = '\0'; + + ardata->symdef_count = nsymz; + ardata->first_file_filepos = bfd_tell (abfd); +diff -rup binutils.orig/bfd/archive.c binutils-2.31.1/bfd/archive.c +--- binutils.orig/bfd/archive.c 2019-02-26 11:17:11.884530134 +0000 ++++ binutils-2.31.1/bfd/archive.c 2019-02-26 11:18:33.354859687 +0000 +@@ -1014,6 +1014,7 @@ do_slurp_coff_armap (bfd *abfd) + int *raw_armap, *rawptr; + struct artdata *ardata = bfd_ardata (abfd); + char *stringbase; ++ char *stringend; + bfd_size_type stringsize; + bfd_size_type parsed_size; + carsym *carsyms; +@@ -1073,22 +1074,20 @@ do_slurp_coff_armap (bfd *abfd) + } + + /* OK, build the carsyms. */ +- for (i = 0; i < nsymz && stringsize > 0; i++) ++ stringend = stringbase + stringsize; ++ *stringend = 0; ++ for (i = 0; i < nsymz; i++) + { + bfd_size_type len; + + rawptr = raw_armap + i; + carsyms->file_offset = swap ((bfd_byte *) rawptr); + carsyms->name = stringbase; +- /* PR 17512: file: 4a1d50c1. */ +- len = strnlen (stringbase, stringsize); +- if (len < stringsize) +- len ++; +- stringbase += len; +- stringsize -= len; ++ stringbase += strlen (stringbase); ++ if (stringbase != stringend) ++ ++stringbase; + carsyms++; + } +- *stringbase = 0; + + ardata->symdef_count = nsymz; + ardata->first_file_filepos = bfd_tell (abfd); diff --git a/SOURCES/binutils-CVE-2019-9077.patch b/SOURCES/binutils-CVE-2019-9077.patch new file mode 100644 index 0000000..1790bfa --- /dev/null +++ b/SOURCES/binutils-CVE-2019-9077.patch @@ -0,0 +1,16 @@ +--- binutils.orig/binutils/readelf.c 2019-02-26 11:17:12.414525772 +0000 ++++ binutils-2.31.1/binutils/readelf.c 2019-02-26 12:11:40.642876742 +0000 +@@ -16009,6 +16009,13 @@ process_mips_specific (Filedata * fileda + return FALSE; + } + ++ /* PR 24243 */ ++ if (sect->sh_size < sizeof (* eopt)) ++ { ++ error (_("The MIPS options section is too small.\n")); ++ return FALSE; ++ } ++ + eopt = (Elf_External_Options *) get_data (NULL, filedata, options_offset, 1, + sect->sh_size, _("options")); + if (eopt) diff --git a/SOURCES/binutils-PELC-licence-corrections.patch b/SOURCES/binutils-PELC-licence-corrections.patch new file mode 100644 index 0000000..c0e7462 --- /dev/null +++ b/SOURCES/binutils-PELC-licence-corrections.patch @@ -0,0 +1,11 @@ +--- binutils.orig/gold/ftruncate.c 2019-06-25 11:36:51.074941484 +0100 ++++ binutils-2.32/gold/ftruncate.c 2019-06-25 11:37:28.108690037 +0100 +@@ -1,7 +1,6 @@ + /* ftruncate emulations that work on some System V's. +- This file is in the public domain. */ + +-/* Copyright (C) 2012-2019 Free Software Foundation, Inc. ++ Copyright (C) 2012-2019 Free Software Foundation, Inc. + + This file is part of gold. + diff --git a/SOURCES/binutils-aarch64-STO_AARCH64_VARIANT_PCS.patch b/SOURCES/binutils-aarch64-STO_AARCH64_VARIANT_PCS.patch new file mode 100644 index 0000000..d0db8c8 --- /dev/null +++ b/SOURCES/binutils-aarch64-STO_AARCH64_VARIANT_PCS.patch @@ -0,0 +1,866 @@ +diff -rup binutils.orig/bfd/elfnn-aarch64.c binutils-2.32/bfd/elfnn-aarch64.c +--- binutils.orig/bfd/elfnn-aarch64.c 2019-07-02 17:30:19.407892712 +0100 ++++ binutils-2.32/bfd/elfnn-aarch64.c 2019-07-02 17:35:21.874749884 +0100 +@@ -2579,6 +2579,9 @@ struct elf_aarch64_link_hash_table + unsigned int top_index; + asection **input_list; + ++ /* JUMP_SLOT relocs for variant PCS symbols may be present. */ ++ int variant_pcs; ++ + /* The offset into splt of the PLT entry for the TLS descriptor + resolver. Special values are 0, if not necessary (or not found + to be necessary yet), and -1 if needed but not determined +@@ -2790,6 +2793,31 @@ elfNN_aarch64_copy_indirect_symbol (stru + _bfd_elf_link_hash_copy_indirect (info, dir, ind); + } + ++/* Merge non-visibility st_other attributes. */ ++ ++static void ++elfNN_aarch64_merge_symbol_attribute (struct elf_link_hash_entry *h, ++ const Elf_Internal_Sym *isym, ++ bfd_boolean definition ATTRIBUTE_UNUSED, ++ bfd_boolean dynamic ATTRIBUTE_UNUSED) ++{ ++ unsigned int isym_sto = isym->st_other & ~ELF_ST_VISIBILITY (-1); ++ unsigned int h_sto = h->other & ~ELF_ST_VISIBILITY (-1); ++ ++ if (isym_sto == h_sto) ++ return; ++ ++ if (isym_sto & ~STO_AARCH64_VARIANT_PCS) ++ /* Not fatal, this callback cannot fail. */ ++ _bfd_error_handler (_("unknown attribute for symbol `%s': 0x%02x"), ++ h->root.root.string, isym_sto); ++ ++ /* Note: Ideally we would warn about any attribute mismatch, but ++ this api does not allow that without substantial changes. */ ++ if (isym_sto & STO_AARCH64_VARIANT_PCS) ++ h->other |= STO_AARCH64_VARIANT_PCS; ++} ++ + /* Destroy an AArch64 elf linker hash table. */ + + static void +@@ -8370,6 +8398,12 @@ elfNN_aarch64_allocate_dynrelocs (struct + updated. */ + + htab->root.srelplt->reloc_count++; ++ ++ /* Mark the DSO in case R__JUMP_SLOT relocs against ++ variant PCS symbols are present. */ ++ if (h->other & STO_AARCH64_VARIANT_PCS) ++ htab->variant_pcs = 1; ++ + } + else + { +@@ -8958,6 +8992,10 @@ elfNN_aarch64_size_dynamic_sections (bfd + || !add_dynamic_entry (DT_JMPREL, 0)) + return FALSE; + ++ if (htab->variant_pcs ++ && !add_dynamic_entry (DT_AARCH64_VARIANT_PCS, 0)) ++ return FALSE; ++ + if (htab->tlsdesc_plt + && (!add_dynamic_entry (DT_TLSDESC_PLT, 0) + || !add_dynamic_entry (DT_TLSDESC_GOT, 0))) +@@ -9708,6 +9746,9 @@ const struct elf_size_info elfNN_aarch64 + #define elf_backend_copy_indirect_symbol \ + elfNN_aarch64_copy_indirect_symbol + ++#define elf_backend_merge_symbol_attribute \ ++ elfNN_aarch64_merge_symbol_attribute ++ + /* Create .dynbss, and .rela.bss sections in DYNOBJ, and set up shortcuts + to them in our hash. */ + #define elf_backend_create_dynamic_sections \ +diff -rup binutils.orig/binutils/readelf.c binutils-2.32/binutils/readelf.c +--- binutils.orig/binutils/readelf.c 2019-07-02 17:30:18.890896375 +0100 ++++ binutils-2.32/binutils/readelf.c 2019-07-02 17:32:25.008002901 +0100 +@@ -1797,6 +1797,19 @@ dump_relocations (Filedata * fi + } + + static const char * ++get_aarch64_dynamic_type (unsigned long type) ++{ ++ switch (type) ++ { ++ case DT_AARCH64_BTI_PLT: return "AARCH64_BTI_PLT"; ++ case DT_AARCH64_PAC_PLT: return "AARCH64_PAC_PLT"; ++ case DT_AARCH64_VARIANT_PCS: return "AARCH64_VARIANT_PCS"; ++ default: ++ return NULL; ++ } ++} ++ ++static const char * + get_mips_dynamic_type (unsigned long type) + { + switch (type) +@@ -2169,6 +2182,9 @@ get_dynamic_type (Filedata * filedata, u + + switch (filedata->file_header.e_machine) + { ++ case EM_AARCH64: ++ result = get_aarch64_dynamic_type (type); ++ break; + case EM_MIPS: + case EM_MIPS_RS3_LE: + result = get_mips_dynamic_type (type); +@@ -11054,6 +11070,22 @@ get_solaris_symbol_visibility (unsigned + } + + static const char * ++get_aarch64_symbol_other (unsigned int other) ++{ ++ static char buf[32]; ++ ++ if (other & STO_AARCH64_VARIANT_PCS) ++ { ++ other &= ~STO_AARCH64_VARIANT_PCS; ++ if (other == 0) ++ return "VARIANT_PCS"; ++ snprintf (buf, sizeof buf, "VARIANT_PCS | %x", other); ++ return buf; ++ } ++ return NULL; ++} ++ ++static const char * + get_mips_symbol_other (unsigned int other) + { + switch (other) +@@ -11164,6 +11196,9 @@ get_symbol_other (Filedata * filedata, u + + switch (filedata->file_header.e_machine) + { ++ case EM_AARCH64: ++ result = get_aarch64_symbol_other (other); ++ break; + case EM_MIPS: + result = get_mips_symbol_other (other); + break; +diff -rup binutils.orig/gas/config/tc-aarch64.c binutils-2.32/gas/config/tc-aarch64.c +--- binutils.orig/gas/config/tc-aarch64.c 2019-07-02 17:30:19.131894667 +0100 ++++ binutils-2.32/gas/config/tc-aarch64.c 2019-07-02 17:35:45.202584620 +0100 +@@ -1938,6 +1938,28 @@ s_aarch64_elf_cons (int nbytes) + demand_empty_rest_of_line (); + } + ++/* Mark symbol that it follows a variant PCS convention. */ ++ ++static void ++s_variant_pcs (int ignored ATTRIBUTE_UNUSED) ++{ ++ char *name; ++ char c; ++ symbolS *sym; ++ asymbol *bfdsym; ++ elf_symbol_type *elfsym; ++ ++ c = get_symbol_name (&name); ++ if (!*name) ++ as_bad (_("Missing symbol name in directive")); ++ sym = symbol_find_or_make (name); ++ restore_line_pointer (c); ++ demand_empty_rest_of_line (); ++ bfdsym = symbol_get_bfdsym (sym); ++ elfsym = elf_symbol_from (bfd_asymbol_bfd (bfdsym), bfdsym); ++ gas_assert (elfsym); ++ elfsym->internal_elf_sym.st_other |= STO_AARCH64_VARIANT_PCS; ++} + #endif /* OBJ_ELF */ + + /* Output a 32-bit word, but mark as an instruction. */ +@@ -2084,6 +2106,7 @@ const pseudo_typeS md_pseudo_table[] = { + {"long", s_aarch64_elf_cons, 4}, + {"xword", s_aarch64_elf_cons, 8}, + {"dword", s_aarch64_elf_cons, 8}, ++ {"variant_pcs", s_variant_pcs, 0}, + #endif + {0, 0, 0} + }; +@@ -9320,3 +9343,35 @@ aarch64_copy_symbol_attributes (symbolS + { + AARCH64_GET_FLAG (dest) = AARCH64_GET_FLAG (src); + } ++ ++#ifdef OBJ_ELF ++/* Same as elf_copy_symbol_attributes, but without copying st_other. ++ This is needed so AArch64 specific st_other values can be independently ++ specified for an IFUNC resolver (that is called by the dynamic linker) ++ and the symbol it resolves (aliased to the resolver). In particular, ++ if a function symbol has special st_other value set via directives, ++ then attaching an IFUNC resolver to that symbol should not override ++ the st_other setting. Requiring the directive on the IFUNC resolver ++ symbol would be unexpected and problematic in C code, where the two ++ symbols appear as two independent function declarations. */ ++ ++void ++aarch64_elf_copy_symbol_attributes (symbolS *dest, symbolS *src) ++{ ++ struct elf_obj_sy *srcelf = symbol_get_obj (src); ++ struct elf_obj_sy *destelf = symbol_get_obj (dest); ++ if (srcelf->size) ++ { ++ if (destelf->size == NULL) ++ destelf->size = XNEW (expressionS); ++ *destelf->size = *srcelf->size; ++ } ++ else ++ { ++ if (destelf->size != NULL) ++ free (destelf->size); ++ destelf->size = NULL; ++ } ++ S_SET_SIZE (dest, S_GET_SIZE (src)); ++} ++#endif +diff -rup binutils.orig/gas/config/tc-aarch64.h binutils-2.32/gas/config/tc-aarch64.h +--- binutils.orig/gas/config/tc-aarch64.h 2019-07-02 17:30:19.136894632 +0100 ++++ binutils-2.32/gas/config/tc-aarch64.h 2019-07-02 17:35:45.202584620 +0100 +@@ -130,6 +130,12 @@ void aarch64_copy_symbol_attributes (sym + (aarch64_copy_symbol_attributes (DEST, SRC)) + #endif + ++#ifdef OBJ_ELF ++void aarch64_elf_copy_symbol_attributes (symbolS *, symbolS *); ++#define OBJ_COPY_SYMBOL_ATTRIBUTES(DEST, SRC) \ ++ aarch64_elf_copy_symbol_attributes (DEST, SRC) ++#endif ++ + #define TC_START_LABEL(STR, NUL_CHAR, NEXT_CHAR) \ + (NEXT_CHAR == ':' || (NEXT_CHAR == '/' && aarch64_data_in_code ())) + #define tc_canonicalize_symbol_name(str) aarch64_canonicalize_symbol_name (str); +diff -rup binutils.orig/gas/doc/c-aarch64.texi binutils-2.32/gas/doc/c-aarch64.texi +--- binutils.orig/gas/doc/c-aarch64.texi 2019-07-02 17:30:19.125894710 +0100 ++++ binutils-2.32/gas/doc/c-aarch64.texi 2019-07-02 17:35:11.362824354 +0100 +@@ -425,6 +425,12 @@ should only be done if it is really nece + + @c VVVVVVVVVVVVVVVVVVVVVVVVVV + ++@cindex @code{.variant_pcs} directive, AArch64 ++@item .variant_pcs @var{symbol} ++This directive marks @var{symbol} referencing a function that may ++follow a variant procedure call standard with different register ++usage convention from the base procedure call standard. ++ + @c WWWWWWWWWWWWWWWWWWWWWWWWWW + @c XXXXXXXXXXXXXXXXXXXXXXXXXX + +diff -rup binutils.orig/include/elf/aarch64.h binutils-2.32/include/elf/aarch64.h +--- binutils.orig/include/elf/aarch64.h 2019-07-02 17:30:18.850896658 +0100 ++++ binutils-2.32/include/elf/aarch64.h 2019-07-02 17:32:55.678785616 +0100 +@@ -36,6 +36,15 @@ + #define SHF_COMDEF 0x80000000 /* Section may be multiply defined + in the input to a link step. */ + ++/* Processor specific dynamic array tags. */ ++#define DT_AARCH64_BTI_PLT (DT_LOPROC + 1) ++#define DT_AARCH64_PAC_PLT (DT_LOPROC + 3) ++#define DT_AARCH64_VARIANT_PCS (DT_LOPROC + 5) ++ ++/* AArch64-specific values for st_other. */ ++#define STO_AARCH64_VARIANT_PCS 0x80 /* Symbol may follow different call ++ convention from the base PCS. */ ++ + /* Relocation types. */ + + START_RELOC_NUMBERS (elf_aarch64_reloc_type) +diff -rup binutils.orig/ld/testsuite/ld-aarch64/aarch64-elf.exp binutils-2.32/ld/testsuite/ld-aarch64/aarch64-elf.exp +--- binutils.orig/ld/testsuite/ld-aarch64/aarch64-elf.exp 2019-07-02 17:30:18.922896148 +0100 ++++ binutils-2.32/ld/testsuite/ld-aarch64/aarch64-elf.exp 2019-07-02 17:35:21.875749878 +0100 +@@ -371,6 +371,10 @@ run_dump_test_lp64 "rela-abs-relative-op + + run_dump_test_lp64 "pie-bind-locally" + ++run_dump_test_lp64 "variant_pcs-r" ++run_dump_test_lp64 "variant_pcs-shared" ++run_dump_test_lp64 "variant_pcs-now" ++ + set aarch64elflinktests { + {"ld-aarch64/so with global symbol" "-shared" "" "" {copy-reloc-so.s} + {} "copy-reloc-so.so"} +--- /dev/null 2019-07-02 08:01:33.386842704 +0100 ++++ binutils-2.32/gas/testsuite/gas/aarch64/symbol-variant_pcs-1.d 2019-07-02 17:35:11.362824354 +0100 +@@ -0,0 +1,10 @@ ++#objdump: -t ++ ++.*: file format .* ++ ++SYMBOL TABLE: ++0+ l d \.text 0+ \.text ++0+ l d \.data 0+ \.data ++0+ l d \.bss 0+ \.bss ++0+ l \.text 0+ func ++0+ \*UND\* 0+ 0x80 foobar +--- /dev/null 2019-07-02 08:01:33.386842704 +0100 ++++ binutils-2.32/gas/testsuite/gas/aarch64/symbol-variant_pcs-1.s 2019-07-02 17:35:11.362824354 +0100 +@@ -0,0 +1,8 @@ ++.text ++.variant_pcs foobar ++func: ++ bl foobar ++ b foobar ++ ++.data ++.xword foobar +--- /dev/null 2019-07-02 08:01:33.386842704 +0100 ++++ binutils-2.32/gas/testsuite/gas/aarch64/symbol-variant_pcs-2.d 2019-07-02 17:35:11.362824354 +0100 +@@ -0,0 +1,9 @@ ++#objdump: -t ++ ++.*: file format .* ++ ++SYMBOL TABLE: ++0+ l d \.text 0+ \.text ++0+ l d \.data 0+ \.data ++0+ l d \.bss 0+ \.bss ++0+ l \.text 0+ 0x80 foo +--- /dev/null 2019-07-02 08:01:33.386842704 +0100 ++++ binutils-2.32/gas/testsuite/gas/aarch64/symbol-variant_pcs-2.s 2019-07-02 17:35:11.362824354 +0100 +@@ -0,0 +1,4 @@ ++.text ++.variant_pcs foo ++foo: ++ ret +--- /dev/null 2019-07-02 08:01:33.386842704 +0100 ++++ binutils-2.32/gas/testsuite/gas/aarch64/symbol-variant_pcs-3.s 2019-07-02 17:35:45.202584620 +0100 +@@ -0,0 +1,20 @@ ++.text ++.global foo_vpcs ++.global foo_base ++.global alias_vpcs ++.global alias_base ++ ++.variant_pcs foo_vpcs ++.variant_pcs alias_vpcs ++ ++foo_vpcs: ++foo_base: ++ bl foo_vpcs ++ bl foo_base ++ bl alias_vpcs ++ bl alias_base ++ ++/* Check that the STO_AARCH64_VARIANT_PCS is not affected by .set. */ ++ ++.set alias_base, foo_vpcs ++.set alias_vpcs, foo_base +--- /dev/null 2019-07-02 08:01:33.386842704 +0100 ++++ binutils-2.32/gas/testsuite/gas/aarch64/symbol-variant_pcs-3.d 2019-07-02 17:35:45.202584620 +0100 +@@ -0,0 +1,12 @@ ++#objdump: -t ++ ++.*: file format .* ++ ++SYMBOL TABLE: ++0+ l d \.text 0+ \.text ++0+ l d \.data 0+ \.data ++0+ l d \.bss 0+ \.bss ++0+ g \.text 0+ 0x80 foo_vpcs ++0+ g \.text 0+ foo_base ++0+ g \.text 0+ 0x80 alias_vpcs ++0+ g \.text 0+ alias_base +--- /dev/null 2019-07-02 08:01:33.386842704 +0100 ++++ binutils-2.32/ld/testsuite/ld-aarch64/variant_pcs-1.s 2019-07-02 17:35:21.875749878 +0100 +@@ -0,0 +1,59 @@ ++.text ++ ++.variant_pcs f_spec_global_default_def ++.variant_pcs f_spec_global_default_undef ++.variant_pcs f_spec_global_hidden_def ++.variant_pcs f_spec_local ++.variant_pcs f_spec_global_default_ifunc ++.variant_pcs f_spec_global_hidden_ifunc ++.variant_pcs f_spec_local_ifunc ++ ++.global f_spec_global_default_def ++.global f_spec_global_default_undef ++.global f_spec_global_hidden_def ++.global f_spec_global_default_ifunc ++.global f_spec_global_hidden_ifunc ++.global f_base_global_default_def ++.global f_base_global_default_undef ++.global f_base_global_hidden_def ++.global f_base_global_default_ifunc ++.global f_base_global_hidden_ifunc ++ ++.hidden f_spec_global_hidden_def ++.hidden f_spec_global_hidden_ifunc ++.hidden f_base_global_hidden_def ++.hidden f_base_global_hidden_ifunc ++ ++.type f_spec_global_default_ifunc, %gnu_indirect_function ++.type f_spec_global_hidden_ifunc, %gnu_indirect_function ++.type f_spec_local_ifunc, %gnu_indirect_function ++.type f_base_global_default_ifunc, %gnu_indirect_function ++.type f_base_global_hidden_ifunc, %gnu_indirect_function ++.type f_base_local_ifunc, %gnu_indirect_function ++ ++f_spec_global_default_def: ++f_spec_global_hidden_def: ++f_spec_local: ++f_base_global_default_def: ++f_base_global_hidden_def: ++f_base_local: ++f_spec_global_default_ifunc: ++f_spec_global_hidden_ifunc: ++f_spec_local_ifunc: ++f_base_global_default_ifunc: ++f_base_global_hidden_ifunc: ++f_base_local_ifunc: ++ bl f_spec_global_default_def ++ bl f_spec_global_default_undef ++ bl f_spec_global_hidden_def ++ bl f_spec_local ++ bl f_base_global_default_def ++ bl f_base_global_default_undef ++ bl f_base_global_hidden_def ++ bl f_base_local ++ bl f_spec_global_default_ifunc ++ bl f_spec_global_hidden_ifunc ++ bl f_spec_local_ifunc ++ bl f_base_global_default_ifunc ++ bl f_base_global_hidden_ifunc ++ bl f_base_local_ifunc +--- /dev/null 2019-07-02 08:01:33.386842704 +0100 ++++ binutils-2.32/ld/testsuite/ld-aarch64/variant_pcs-2.s 2019-07-02 17:35:21.875749878 +0100 +@@ -0,0 +1,47 @@ ++.text ++ ++.variant_pcs f_spec_global_default_def ++.variant_pcs f_spec_global_default_undef ++.variant_pcs f_spec_global_hidden_def ++.variant_pcs f_spec_local2 ++.variant_pcs f_spec_global_default_ifunc ++.variant_pcs f_spec_global_hidden_ifunc ++.variant_pcs f_spec_local2_ifunc ++ ++.global f_spec_global_default_def ++.global f_spec_global_default_undef ++.global f_spec_global_hidden_def ++.global f_spec_global_default_ifunc ++.global f_spec_global_hidden_ifunc ++.global f_base_global_default_def ++.global f_base_global_default_undef ++.global f_base_global_hidden_def ++.global f_base_global_default_ifunc ++.global f_base_global_hidden_ifunc ++ ++.hidden f_spec_global_hidden_def ++.hidden f_spec_global_hidden_ifunc ++.hidden f_base_global_hidden_def ++.hidden f_base_global_hidden_ifunc ++ ++.type f_spec_local2_ifunc, %gnu_indirect_function ++.type f_base_local2_ifunc, %gnu_indirect_function ++ ++f_spec_local2: ++f_base_local2: ++f_spec_local2_ifunc: ++f_base_local2_ifunc: ++ bl f_spec_global_default_def ++ bl f_spec_global_default_undef ++ bl f_spec_global_hidden_def ++ bl f_spec_local2 ++ bl f_base_global_default_def ++ bl f_base_global_default_undef ++ bl f_base_global_hidden_def ++ bl f_base_local2 ++ bl f_spec_global_default_ifunc ++ bl f_spec_global_hidden_ifunc ++ bl f_spec_local2_ifunc ++ bl f_base_global_default_ifunc ++ bl f_base_global_hidden_ifunc ++ bl f_base_local2_ifunc +--- /dev/null 2019-07-02 08:01:33.386842704 +0100 ++++ binutils-2.32/ld/testsuite/ld-aarch64/variant_pcs.ld 2019-07-02 17:35:37.100642017 +0100 +@@ -0,0 +1,23 @@ ++/* Script for .variant_pcs symbol tests. */ ++OUTPUT_ARCH(aarch64) ++ENTRY(_start) ++SECTIONS ++{ ++ /* Read-only sections, merged into text segment: */ ++ PROVIDE (__executable_start = 0x8000); . = 0x8000; ++ .text : ++ { ++ *(.before) ++ *(.text) ++ *(.after) ++ } =0 ++ . = 0x9000; ++ .got : { *(.got) *(.got.plt)} ++ . = 0x10000; ++ .rela.dyn : { *(.rela.ifunc) } ++ . = 0x11000; ++ .rela.plt : { *(.rela.plt) *(.rela.iplt) } ++ . = 0x12340000; ++ .far : { *(.far) } ++ .ARM.attributes 0 : { *(.ARM.atttributes) } ++} +--- /dev/null 2019-07-02 08:01:33.386842704 +0100 ++++ binutils-2.32/ld/testsuite/ld-aarch64/variant_pcs-now.d 2019-07-02 17:34:37.557063849 +0100 +@@ -0,0 +1,67 @@ ++#source: variant_pcs-1.s ++#source: variant_pcs-2.s ++#ld: -shared --hash-style=sysv -T variant_pcs.ld -z now ++#readelf: -rsW ++ ++Relocation section '\.rela\.plt' at offset 0x11000 contains 12 entries: ++ Offset Info Type Symbol's Value Symbol's Name \+ Addend ++0000000000009020 0000000100000402 R_AARCH64_JUMP_SLOT 0000000000000000 f_base_global_default_undef \+ 0 ++0000000000009028 0000000200000402 R_AARCH64_JUMP_SLOT 0000000000000000 f_spec_global_default_undef \+ 0 ++0000000000009030 0000000400000402 R_AARCH64_JUMP_SLOT 0000000000008000 f_base_global_default_def \+ 0 ++0000000000009038 0000000500000402 R_AARCH64_JUMP_SLOT 0000000000008000 f_spec_global_default_def \+ 0 ++0000000000009040 0000000000000408 R_AARCH64_IRELATIVE 8000 ++0000000000009048 0000000300000402 R_AARCH64_JUMP_SLOT f_spec_global_default_ifunc\(\) f_spec_global_default_ifunc \+ 0 ++0000000000009050 0000000000000408 R_AARCH64_IRELATIVE 8000 ++0000000000009058 0000000600000402 R_AARCH64_JUMP_SLOT f_base_global_default_ifunc\(\) f_base_global_default_ifunc \+ 0 ++0000000000009060 0000000000000408 R_AARCH64_IRELATIVE 8038 ++0000000000009068 0000000000000408 R_AARCH64_IRELATIVE 8000 ++0000000000009070 0000000000000408 R_AARCH64_IRELATIVE 8000 ++0000000000009078 0000000000000408 R_AARCH64_IRELATIVE 8038 ++ ++Symbol table '\.dynsym' contains 7 entries: ++ 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 ++ 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 ++ 6: 0000000000008000 0 IFUNC GLOBAL DEFAULT 1 f_base_global_default_ifunc ++ ++Symbol table '\.symtab' contains 35 entries: ++ Num: Value Size Type Bind Vis Ndx Name ++ 0: 0000000000000000 0 NOTYPE LOCAL DEFAULT UND ++ 1: 0000000000008000 0 SECTION LOCAL DEFAULT 1 ++ 2: 0000000000008070 0 SECTION LOCAL DEFAULT 2 ++ 3: 0000000000009000 0 SECTION LOCAL DEFAULT 3 ++ 4: 0000000000009080 0 SECTION LOCAL DEFAULT 4 ++ 5: 0000000000011000 0 SECTION LOCAL DEFAULT 5 ++ 6: 0000000000011120 0 SECTION LOCAL DEFAULT 6 ++ 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 ++ 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 ++ 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 ++ 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 ++ 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 ++ 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 ++ 34: 0000000000008000 0 IFUNC GLOBAL DEFAULT 1 f_base_global_default_ifunc +--- /dev/null 2019-07-02 08:01:33.386842704 +0100 ++++ binutils-2.32/ld/testsuite/ld-aarch64/variant_pcs-r.d 2019-07-02 17:35:35.244655166 +0100 +@@ -0,0 +1,60 @@ ++#source: variant_pcs-1.s ++#source: variant_pcs-2.s ++#ld: -r ++#readelf: -rsW ++ ++Relocation section '\.rela\.text' at offset .* contains 24 entries: ++ Offset Info Type Symbol's Value Symbol's Name \+ Addend ++0000000000000000 000000180000011b R_AARCH64_CALL26 0000000000000000 f_spec_global_default_def \+ 0 ++0000000000000004 000000110000011b R_AARCH64_CALL26 0000000000000000 f_spec_global_default_undef \+ 0 ++0000000000000008 000000120000011b R_AARCH64_CALL26 0000000000000000 f_spec_global_hidden_def \+ 0 ++0000000000000010 000000170000011b R_AARCH64_CALL26 0000000000000000 f_base_global_default_def \+ 0 ++0000000000000014 000000100000011b R_AARCH64_CALL26 0000000000000000 f_base_global_default_undef \+ 0 ++0000000000000018 000000150000011b R_AARCH64_CALL26 0000000000000000 f_base_global_hidden_def \+ 0 ++0000000000000020 000000140000011b R_AARCH64_CALL26 f_spec_global_default_ifunc\(\) f_spec_global_default_ifunc \+ 0 ++0000000000000024 000000160000011b R_AARCH64_CALL26 f_spec_global_hidden_ifunc\(\) f_spec_global_hidden_ifunc \+ 0 ++0000000000000028 000000060000011b R_AARCH64_CALL26 f_spec_local_ifunc\(\) f_spec_local_ifunc \+ 0 ++000000000000002c 000000190000011b R_AARCH64_CALL26 f_base_global_default_ifunc\(\) f_base_global_default_ifunc \+ 0 ++0000000000000030 000000130000011b R_AARCH64_CALL26 f_base_global_hidden_ifunc\(\) f_base_global_hidden_ifunc \+ 0 ++0000000000000034 000000070000011b R_AARCH64_CALL26 f_base_local_ifunc\(\) f_base_local_ifunc \+ 0 ++0000000000000038 000000180000011b R_AARCH64_CALL26 0000000000000000 f_spec_global_default_def \+ 0 ++000000000000003c 000000110000011b R_AARCH64_CALL26 0000000000000000 f_spec_global_default_undef \+ 0 ++0000000000000040 000000120000011b R_AARCH64_CALL26 0000000000000000 f_spec_global_hidden_def \+ 0 ++0000000000000048 000000170000011b R_AARCH64_CALL26 0000000000000000 f_base_global_default_def \+ 0 ++000000000000004c 000000100000011b R_AARCH64_CALL26 0000000000000000 f_base_global_default_undef \+ 0 ++0000000000000050 000000150000011b R_AARCH64_CALL26 0000000000000000 f_base_global_hidden_def \+ 0 ++0000000000000058 000000140000011b R_AARCH64_CALL26 f_spec_global_default_ifunc\(\) f_spec_global_default_ifunc \+ 0 ++000000000000005c 000000160000011b R_AARCH64_CALL26 f_spec_global_hidden_ifunc\(\) f_spec_global_hidden_ifunc \+ 0 ++0000000000000060 0000000c0000011b R_AARCH64_CALL26 f_spec_local2_ifunc\(\) f_spec_local2_ifunc \+ 0 ++0000000000000064 000000190000011b R_AARCH64_CALL26 f_base_global_default_ifunc\(\) f_base_global_default_ifunc \+ 0 ++0000000000000068 000000130000011b R_AARCH64_CALL26 f_base_global_hidden_ifunc\(\) f_base_global_hidden_ifunc \+ 0 ++000000000000006c 0000000d0000011b R_AARCH64_CALL26 f_base_local2_ifunc\(\) f_base_local2_ifunc \+ 0 ++ ++Symbol table '\.symtab' contains 26 entries: ++ Num: Value Size Type Bind Vis Ndx Name ++ 0: 0000000000000000 0 NOTYPE LOCAL DEFAULT UND ++ 1: 0000000000000000 0 SECTION LOCAL DEFAULT 1 ++ 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 ++ 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 ++ 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 ++ 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 ++ 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 ++ 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 ++ 25: 0000000000000000 0 IFUNC GLOBAL DEFAULT 1 f_base_global_default_ifunc +--- /dev/null 2019-07-02 08:01:33.386842704 +0100 ++++ binutils-2.32/ld/testsuite/ld-aarch64/variant_pcs-shared.d 2019-07-02 17:34:45.635006622 +0100 +@@ -0,0 +1,67 @@ ++#source: variant_pcs-1.s ++#source: variant_pcs-2.s ++#ld: -shared --hash-style=sysv -T variant_pcs.ld ++#readelf: -rsW ++ ++Relocation section '\.rela\.plt' at offset 0x11000 contains 12 entries: ++ Offset Info Type Symbol's Value Symbol's Name \+ Addend ++0000000000009020 0000000100000402 R_AARCH64_JUMP_SLOT 0000000000000000 f_base_global_default_undef \+ 0 ++0000000000009028 0000000200000402 R_AARCH64_JUMP_SLOT 0000000000000000 f_spec_global_default_undef \+ 0 ++0000000000009030 0000000400000402 R_AARCH64_JUMP_SLOT 0000000000008000 f_base_global_default_def \+ 0 ++0000000000009038 0000000500000402 R_AARCH64_JUMP_SLOT 0000000000008000 f_spec_global_default_def \+ 0 ++0000000000009040 0000000000000408 R_AARCH64_IRELATIVE 8000 ++0000000000009048 0000000300000402 R_AARCH64_JUMP_SLOT f_spec_global_default_ifunc\(\) f_spec_global_default_ifunc \+ 0 ++0000000000009050 0000000000000408 R_AARCH64_IRELATIVE 8000 ++0000000000009058 0000000600000402 R_AARCH64_JUMP_SLOT f_base_global_default_ifunc\(\) f_base_global_default_ifunc \+ 0 ++0000000000009060 0000000000000408 R_AARCH64_IRELATIVE 8038 ++0000000000009068 0000000000000408 R_AARCH64_IRELATIVE 8000 ++0000000000009070 0000000000000408 R_AARCH64_IRELATIVE 8000 ++0000000000009078 0000000000000408 R_AARCH64_IRELATIVE 8038 ++ ++Symbol table '\.dynsym' contains 7 entries: ++ 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 ++ 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 ++ 6: 0000000000008000 0 IFUNC GLOBAL DEFAULT 1 f_base_global_default_ifunc ++ ++Symbol table '\.symtab' contains 35 entries: ++ Num: Value Size Type Bind Vis Ndx Name ++ 0: 0000000000000000 0 NOTYPE LOCAL DEFAULT UND ++ 1: 0000000000008000 0 SECTION LOCAL DEFAULT 1 ++ 2: 0000000000008070 0 SECTION LOCAL DEFAULT 2 ++ 3: 0000000000009000 0 SECTION LOCAL DEFAULT 3 ++ 4: 0000000000009080 0 SECTION LOCAL DEFAULT 4 ++ 5: 0000000000011000 0 SECTION LOCAL DEFAULT 5 ++ 6: 0000000000011120 0 SECTION LOCAL DEFAULT 6 ++ 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 ++ 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 ++ 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 ++ 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 ++ 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 ++ 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 ++ 34: 0000000000008000 0 IFUNC GLOBAL DEFAULT 1 f_base_global_default_ifunc +--- binutils.orig/bfd/archive.c 2019-07-03 10:06:20.527408416 +0100 ++++ binutils-2.32/bfd/archive.c 2019-07-03 10:06:57.887142988 +0100 +@@ -1076,8 +1076,6 @@ do_slurp_coff_armap (bfd *abfd) + *stringend = 0; + for (i = 0; i < nsymz; i++) + { +- bfd_size_type len; +- + rawptr = raw_armap + i; + carsyms->file_offset = swap ((bfd_byte *) rawptr); + carsyms->name = stringbase; +diff -rup binutils.orig/ld/testsuite/ld-aarch64/variant_pcs-now.d binutils-2.32/ld/testsuite/ld-aarch64/variant_pcs-now.d +--- binutils.orig/ld/testsuite/ld-aarch64/variant_pcs-now.d 2019-07-03 10:06:20.012412075 +0100 ++++ binutils-2.32/ld/testsuite/ld-aarch64/variant_pcs-now.d 2019-07-03 10:20:51.959203582 +0100 +@@ -22,10 +22,10 @@ Symbol table '\.dynsym' contains 7 entri + Num: Value Size Type Bind Vis Ndx Name + 0: 0000000000000000 0 NOTYPE LOCAL DEFAULT UND + 1: 0000000000000000 0 NOTYPE GLOBAL DEFAULT UND f_base_global_default_undef +- 2: 0000000000000000 0 NOTYPE GLOBAL DEFAULT \[VARIANT_PCS\] UND f_spec_global_default_undef +- 3: 0000000000008000 0 IFUNC GLOBAL DEFAULT \[VARIANT_PCS\] 1 f_spec_global_default_ifunc ++ 2: 0000000000000000 0 NOTYPE GLOBAL DEFAULT UND f_spec_global_default_undef \[VARIANT_PCS\] ++ 3: 0000000000008000 0 IFUNC GLOBAL DEFAULT 1 f_spec_global_default_ifunc \[VARIANT_PCS\] + 4: 0000000000008000 0 NOTYPE GLOBAL DEFAULT 1 f_base_global_default_def +- 5: 0000000000008000 0 NOTYPE GLOBAL DEFAULT \[VARIANT_PCS\] 1 f_spec_global_default_def ++ 5: 0000000000008000 0 NOTYPE GLOBAL DEFAULT 1 f_spec_global_default_def \[VARIANT_PCS\] + 6: 0000000000008000 0 IFUNC GLOBAL DEFAULT 1 f_base_global_default_ifunc + + Symbol table '\.symtab' contains 35 entries: +@@ -40,28 +40,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 1 f_spec_local \[VARIANT_PCS\] ++ 11: 0000000000008000 0 IFUNC LOCAL DEFAULT 1 f_spec_local_ifunc \[VARIANT_PCS\] + 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 1 f_spec_local2 \[VARIANT_PCS\] ++ 17: 0000000000008038 0 IFUNC LOCAL DEFAULT 1 f_spec_local2_ifunc \[VARIANT_PCS\] + 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 1 f_spec_global_hidden_def \[VARIANT_PCS\] + 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 1 f_spec_global_hidden_ifunc \[VARIANT_PCS\] + 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 UND f_spec_global_default_undef \[VARIANT_PCS\] ++ 31: 0000000000008000 0 IFUNC GLOBAL DEFAULT 1 f_spec_global_default_ifunc \[VARIANT_PCS\] + 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 1 f_spec_global_default_def \[VARIANT_PCS\] + 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.32/ld/testsuite/ld-aarch64/variant_pcs-r.d +--- binutils.orig/ld/testsuite/ld-aarch64/variant_pcs-r.d 2019-07-03 10:06:20.012412075 +0100 ++++ binutils-2.32/ld/testsuite/ld-aarch64/variant_pcs-r.d 2019-07-03 10:14:28.152933189 +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 1 f_spec_local \[VARIANT_PCS\] ++ 6: 0000000000000000 0 IFUNC LOCAL DEFAULT 1 f_spec_local_ifunc \[VARIANT_PCS\] + 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 1 f_spec_local2 \[VARIANT_PCS\] ++ 12: 0000000000000038 0 IFUNC LOCAL DEFAULT 1 f_spec_local2_ifunc \[VARIANT_PCS\] + 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 UND f_spec_global_default_undef \[VARIANT_PCS\] ++ 18: 0000000000000000 0 NOTYPE GLOBAL HIDDEN 1 f_spec_global_hidden_def \[VARIANT_PCS\] + 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 1 f_spec_global_default_ifunc \[VARIANT_PCS\] + 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 1 f_spec_global_hidden_ifunc \[VARIANT_PCS\] + 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 1 f_spec_global_default_def \[VARIANT_PCS\] + 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.32/ld/testsuite/ld-aarch64/variant_pcs-shared.d +--- binutils.orig/ld/testsuite/ld-aarch64/variant_pcs-shared.d 2019-07-03 10:06:20.012412075 +0100 ++++ binutils-2.32/ld/testsuite/ld-aarch64/variant_pcs-shared.d 2019-07-03 10:19:00.760994532 +0100 +@@ -22,10 +22,10 @@ Symbol table '\.dynsym' contains 7 entri + Num: Value Size Type Bind Vis Ndx Name + 0: 0000000000000000 0 NOTYPE LOCAL DEFAULT UND + 1: 0000000000000000 0 NOTYPE GLOBAL DEFAULT UND f_base_global_default_undef +- 2: 0000000000000000 0 NOTYPE GLOBAL DEFAULT \[VARIANT_PCS\] UND f_spec_global_default_undef +- 3: 0000000000008000 0 IFUNC GLOBAL DEFAULT \[VARIANT_PCS\] 1 f_spec_global_default_ifunc ++ 2: 0000000000000000 0 NOTYPE GLOBAL DEFAULT UND f_spec_global_default_undef \[VARIANT_PCS\] ++ 3: 0000000000008000 0 IFUNC GLOBAL DEFAULT 1 f_spec_global_default_ifunc \[VARIANT_PCS\] + 4: 0000000000008000 0 NOTYPE GLOBAL DEFAULT 1 f_base_global_default_def +- 5: 0000000000008000 0 NOTYPE GLOBAL DEFAULT \[VARIANT_PCS\] 1 f_spec_global_default_def ++ 5: 0000000000008000 0 NOTYPE GLOBAL DEFAULT 1 f_spec_global_default_def \[VARIANT_PCS\] + 6: 0000000000008000 0 IFUNC GLOBAL DEFAULT 1 f_base_global_default_ifunc + + Symbol table '\.symtab' contains 35 entries: +@@ -40,28 +40,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 1 f_spec_local \[VARIANT_PCS\] ++ 11: 0000000000008000 0 IFUNC LOCAL DEFAULT 1 f_spec_local_ifunc \[VARIANT_PCS\] + 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 1 f_spec_local2 \[VARIANT_PCS\] ++ 17: 0000000000008038 0 IFUNC LOCAL DEFAULT 1 f_spec_local2_ifunc \[VARIANT_PCS\] + 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 1 f_spec_global_hidden_def \[VARIANT_PCS\] + 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 1 f_spec_global_hidden_ifunc \[VARIANT_PCS\] + 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 UND f_spec_global_default_undef \[VARIANT_PCS\] ++ 31: 0000000000008000 0 IFUNC GLOBAL DEFAULT 1 f_spec_global_default_ifunc \[VARIANT_PCS\] + 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 1 f_spec_global_default_def \[VARIANT_PCS\] + 34: 0000000000008000 0 IFUNC GLOBAL DEFAULT 1 f_base_global_default_ifunc diff --git a/SOURCES/binutils-aarch64-gold-PLT-for-MOVW_ABS.patch b/SOURCES/binutils-aarch64-gold-PLT-for-MOVW_ABS.patch new file mode 100644 index 0000000..2cdb734 --- /dev/null +++ b/SOURCES/binutils-aarch64-gold-PLT-for-MOVW_ABS.patch @@ -0,0 +1,20 @@ +--- binutils.orig/gold/aarch64.cc 2019-05-21 11:24:07.642560743 +0100 ++++ binutils-2.32/gold/aarch64.cc 2019-05-21 11:25:02.425157682 +0100 +@@ -6496,6 +6496,17 @@ Target_aarch64::Scan:: + gold_error(_("%s: unsupported reloc %u in pos independent link."), + object->name().c_str(), r_type); + } ++ // Make a PLT entry if necessary. ++ if (gsym->needs_plt_entry()) ++ { ++ target->make_plt_entry(symtab, layout, gsym); ++ // Since this is not a PC-relative relocation, we may be ++ // taking the address of a function. In that case we need to ++ // set the entry in the dynamic symbol table to the address of ++ // the PLT entry. ++ if (gsym->is_from_dynobj() && !parameters->options().shared()) ++ gsym->set_needs_dynsym_value(); ++ } + break; + + case elfcpp::R_AARCH64_LD_PREL_LO19: // 273 diff --git a/SOURCES/binutils-attach-to-group.patch b/SOURCES/binutils-attach-to-group.patch new file mode 100644 index 0000000..7bb5348 --- /dev/null +++ b/SOURCES/binutils-attach-to-group.patch @@ -0,0 +1,68 @@ +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) + { +diff -rup binutils.orig/gas/doc/as.texinfo binutils-2.30/gas/doc/as.texinfo +--- binutils.orig/gas/doc/as.texi 2018-09-24 17:50:06.984172788 +0100 ++++ binutils-2.30/gas/doc/as.texi 2018-09-25 15:19:43.557748972 +0100 +@@ -4407,6 +4407,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}} +@@ -4703,6 +4704,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/SOURCES/binutils-disassembling-efi-files.patch b/SOURCES/binutils-disassembling-efi-files.patch new file mode 100644 index 0000000..75d4275 --- /dev/null +++ b/SOURCES/binutils-disassembling-efi-files.patch @@ -0,0 +1,39 @@ +diff -rup binutils.orig/bfd/coffgen.c binutils-2.31.1/bfd/coffgen.c +--- binutils.orig/bfd/coffgen.c 2019-03-06 08:49:19.500586870 +0000 ++++ binutils-2.31.1/bfd/coffgen.c 2019-03-06 08:49:45.798394582 +0000 +@@ -2289,7 +2289,7 @@ coff_find_nearest_line_with_names (bfd * + information. So try again, using a bias against the address sought. */ + if (coff_data (abfd)->dwarf2_find_line_info != NULL) + { +- bfd_signed_vma bias; ++ bfd_signed_vma bias = 0; + + /* Create a cache of the result for the next call. */ + if (sec_data == NULL && section->owner == abfd) +@@ -2301,10 +2301,11 @@ coff_find_nearest_line_with_names (bfd * + + if (sec_data != NULL && sec_data->saved_bias) + bias = sec_data->saved_bias; +- else ++ else if (symbols) + { + bias = _bfd_dwarf2_find_symbol_bias (symbols, + & coff_data (abfd)->dwarf2_find_line_info); ++ + if (sec_data) + { + sec_data->saved_bias = TRUE; +Only in binutils-2.31.1/bfd: coffgen.c.orig +diff -rup binutils.orig/bfd/dwarf2.c binutils-2.31.1/bfd/dwarf2.c +--- binutils.orig/bfd/dwarf2.c 2019-03-06 08:49:19.498586884 +0000 ++++ binutils-2.31.1/bfd/dwarf2.c 2019-03-06 08:49:45.799394575 +0000 +@@ -4463,7 +4463,7 @@ _bfd_dwarf2_find_symbol_bias (asymbol ** + + stash = (struct dwarf2_debug *) *pinfo; + +- if (stash == NULL) ++ if (stash == NULL || symbols == NULL) + return 0; + + for (unit = stash->all_comp_units; unit; unit = unit->next_unit) +Only in binutils-2.31.1/bfd: dwarf2.c.orig diff --git a/SOURCES/binutils-do-not-link-with-static-libstdc++.patch b/SOURCES/binutils-do-not-link-with-static-libstdc++.patch new file mode 100644 index 0000000..49d46c2 --- /dev/null +++ b/SOURCES/binutils-do-not-link-with-static-libstdc++.patch @@ -0,0 +1,83 @@ +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/SOURCES/binutils-export-demangle.h.patch b/SOURCES/binutils-export-demangle.h.patch new file mode 100644 index 0000000..6e47d7d --- /dev/null +++ b/SOURCES/binutils-export-demangle.h.patch @@ -0,0 +1,33 @@ +diff -rup binutils.orig/bfd/Makefile.am binutils-2.32/bfd/Makefile.am +--- binutils.orig/bfd/Makefile.am 2019-02-08 12:22:51.395684251 +0000 ++++ binutils-2.32/bfd/Makefile.am 2019-02-08 12:22:53.970664973 +0000 +@@ -33,7 +33,7 @@ bfdlibdir = @bfdlibdir@ + bfdincludedir = @bfdincludedir@ + bfdlib_LTLIBRARIES = libbfd.la + bfdinclude_HEADERS = $(BFD_H) $(INCDIR)/ansidecl.h $(INCDIR)/symcat.h \ +- bfd_stdint.h $(INCDIR)/diagnostics.h $(INCDIR)/bfdlink.h ++ bfd_stdint.h $(INCDIR)/diagnostics.h $(INCDIR)/bfdlink.h $(INCDIR)/demangle.h + else !INSTALL_LIBBFD + # Empty these so that the respective installation directories will not be created. + bfdlibdir = +diff -rup binutils.orig/bfd/Makefile.in binutils-2.32/bfd/Makefile.in +--- binutils.orig/bfd/Makefile.in 2019-02-08 12:21:35.291254044 +0000 ++++ binutils-2.32/bfd/Makefile.in 2019-02-08 12:22:10.163992947 +0000 +@@ -249,7 +249,7 @@ am__can_run_installinfo = \ + esac + am__bfdinclude_HEADERS_DIST = $(INCDIR)/plugin-api.h bfd.h \ + $(INCDIR)/ansidecl.h $(INCDIR)/symcat.h bfd_stdint.h \ +- $(INCDIR)/diagnostics.h $(INCDIR)/bfdlink.h ++ $(INCDIR)/diagnostics.h $(INCDIR)/bfdlink.h $(INCDIR)/demangle.h + HEADERS = $(bfdinclude_HEADERS) + RECURSIVE_CLEAN_TARGETS = mostlyclean-recursive clean-recursive \ + distclean-recursive maintainer-clean-recursive +@@ -468,7 +468,7 @@ libbfd_la_LDFLAGS = $(am__append_1) -rel + @INSTALL_LIBBFD_FALSE@bfdinclude_HEADERS = $(am__append_2) + @INSTALL_LIBBFD_TRUE@bfdinclude_HEADERS = $(BFD_H) \ + @INSTALL_LIBBFD_TRUE@ $(INCDIR)/ansidecl.h $(INCDIR)/symcat.h \ +-@INSTALL_LIBBFD_TRUE@ bfd_stdint.h $(INCDIR)/diagnostics.h \ ++@INSTALL_LIBBFD_TRUE@ bfd_stdint.h $(INCDIR)/diagnostics.h $(INCDIR)/demangle.h \ + @INSTALL_LIBBFD_TRUE@ $(INCDIR)/bfdlink.h $(am__append_2) + @INSTALL_LIBBFD_FALSE@rpath_bfdlibdir = @bfdlibdir@ + @INSTALL_LIBBFD_FALSE@noinst_LTLIBRARIES = libbfd.la diff --git a/SOURCES/binutils-fix-testsuite-failures.patch b/SOURCES/binutils-fix-testsuite-failures.patch new file mode 100644 index 0000000..13bdc60 --- /dev/null +++ b/SOURCES/binutils-fix-testsuite-failures.patch @@ -0,0 +1,417 @@ +diff -rup binutils-2.32.orig/ld/testsuite/ld-plugin/plugin-10.d binutils-2.32/ld/testsuite/ld-plugin/plugin-10.d +--- binutils-2.32.orig/ld/testsuite/ld-plugin/plugin-10.d 2019-02-15 13:33:21.979627285 +0000 ++++ binutils-2.32/ld/testsuite/ld-plugin/plugin-10.d 2019-02-15 13:40:26.911199033 +0000 +@@ -34,5 +34,6 @@ hook called: claim_file tmpdir/libtext.a + hook called: all symbols read. + Sym: '_?func' Resolution: LDPR_PREVAILING_DEF + Sym: '_?func2' Resolution: LDPR_PREVAILING_DEF_IRONLY ++#... + hook called: cleanup. + #... +diff -rup binutils-2.32.orig/ld/testsuite/ld-plugin/plugin-12.d binutils-2.32/ld/testsuite/ld-plugin/plugin-12.d +--- binutils-2.32.orig/ld/testsuite/ld-plugin/plugin-12.d 2019-02-15 13:33:21.976627309 +0000 ++++ binutils-2.32/ld/testsuite/ld-plugin/plugin-12.d 2019-02-15 13:47:04.060076132 +0000 +@@ -1,5 +1,5 @@ + #... +-.*: symbol `func' definition: 0, visibility: 0, resolution: 2 ++.*: symbol `func' definition: 0, visibility: 0, resolution: . + .*: symbol `func1' definition: 0, visibility: 1, resolution: 3 + .*: symbol `func2' definition: 0, visibility: 2, resolution: 3 + .*: symbol `func3' definition: 0, visibility: 3, resolution: 3 +diff -rup binutils-2.32.orig/ld/testsuite/ld-plugin/plugin-13.d binutils-2.32/ld/testsuite/ld-plugin/plugin-13.d +--- binutils-2.32.orig/ld/testsuite/ld-plugin/plugin-13.d 2019-02-15 13:33:21.980627277 +0000 ++++ binutils-2.32/ld/testsuite/ld-plugin/plugin-13.d 2019-02-15 13:41:30.189692800 +0000 +@@ -23,5 +23,3 @@ hook called: claim_file tmpdir/main.o \[ + hook called: claim_file .*/ld/testsuite/ld-plugin/func.c \[@0/.* CLAIMED + hook called: claim_file tmpdir/text.o \[@0/.* not claimed + #... +-.*main.c.*: undefined reference to `\.?func' +-#... +diff -rup binutils-2.32.orig/ld/testsuite/ld-plugin/plugin-14.d binutils-2.32/ld/testsuite/ld-plugin/plugin-14.d +--- binutils-2.32.orig/ld/testsuite/ld-plugin/plugin-14.d 2019-02-15 13:33:21.977627301 +0000 ++++ binutils-2.32/ld/testsuite/ld-plugin/plugin-14.d 2019-02-15 13:42:03.598430960 +0000 +@@ -27,7 +27,6 @@ hook called: claim_file .*/ld/testsuite/ + hook called: claim_file tmpdir/text.o \[@0/.* not claimed + #... + hook called: all symbols read. +-.*: tmpdir/main.o: in function `main': +-.*main.c.*: undefined reference to `\.?func' ++#... + hook called: cleanup. + #... +diff -rup binutils-2.32.orig/ld/testsuite/ld-plugin/plugin-15.d binutils-2.32/ld/testsuite/ld-plugin/plugin-15.d +--- binutils-2.32.orig/ld/testsuite/ld-plugin/plugin-15.d 2019-02-15 13:33:21.980627277 +0000 ++++ binutils-2.32/ld/testsuite/ld-plugin/plugin-15.d 2019-02-15 13:42:28.014239600 +0000 +@@ -28,7 +28,6 @@ hook called: claim_file .*/ld/testsuite/ + hook called: claim_file tmpdir/text.o \[@0/.* not claimed + #... + hook called: all symbols read. +-.*: tmpdir/main.o: in function `main': +-.*main.c.*: undefined reference to `\.?func' ++#... + hook called: cleanup. + #... +diff -rup binutils-2.32.orig/ld/testsuite/ld-plugin/plugin-16.d binutils-2.32/ld/testsuite/ld-plugin/plugin-16.d +--- binutils-2.32.orig/ld/testsuite/ld-plugin/plugin-16.d 2019-02-15 13:33:21.977627301 +0000 ++++ binutils-2.32/ld/testsuite/ld-plugin/plugin-16.d 2019-02-15 13:43:21.309821910 +0000 +@@ -30,9 +30,8 @@ hook called: claim_file .*/ld/testsuite/ + hook called: claim_file tmpdir/text.o \[@0/.* not claimed + #... + hook called: all symbols read. +-Sym: '_?func' Resolution: LDPR_PREVAILING_DEF ++Sym: '_?func' Resolution: LDPR_PREVAILING_DEF_IRONLY + Sym: '_?func2' Resolution: LDPR_PREVAILING_DEF_IRONLY +-.*: tmpdir/main.o: in function `main': +-.*main.c.*: undefined reference to `\.?func' ++#... + hook called: cleanup. + #... +diff -rup binutils-2.32.orig/ld/testsuite/ld-plugin/plugin-17.d binutils-2.32/ld/testsuite/ld-plugin/plugin-17.d +--- binutils-2.32.orig/ld/testsuite/ld-plugin/plugin-17.d 2019-02-15 13:33:21.977627301 +0000 ++++ binutils-2.32/ld/testsuite/ld-plugin/plugin-17.d 2019-02-15 13:43:54.925558451 +0000 +@@ -31,7 +31,8 @@ hook called: claim_file .*/ld/testsuite/ + hook called: claim_file tmpdir/text.o \[@0/.* not claimed + #... + hook called: all symbols read. +-Sym: '_?func' Resolution: LDPR_PREVAILING_DEF ++Sym: '_?func' Resolution: LDPR_PREVAILING_DEF_IRONLY + Sym: '_?func2' Resolution: LDPR_PREVAILING_DEF_IRONLY ++#... + hook called: cleanup. + #... +diff -rup binutils-2.32.orig/ld/testsuite/ld-plugin/plugin-20.d binutils-2.32/ld/testsuite/ld-plugin/plugin-20.d +--- binutils-2.32.orig/ld/testsuite/ld-plugin/plugin-20.d 2019-02-15 13:33:21.980627277 +0000 ++++ binutils-2.32/ld/testsuite/ld-plugin/plugin-20.d 2019-02-15 13:49:20.091010016 +0000 +@@ -2,6 +2,5 @@ hook called: all symbols read. + Input: func.c \(tmpdir/libfunc.a\) + Sym: '_?func' Resolution: LDPR_PREVAILING_DEF.* + Sym: '_?func' Resolution: LDPR_PREVAILING_DEF.* +-.*: tmpdir/main.o: in function `main': +-.*main.c.*: undefined reference to `\.?func' ++#... + hook called: cleanup. +diff -rup binutils-2.32.orig/ld/testsuite/ld-plugin/plugin-21.d binutils-2.32/ld/testsuite/ld-plugin/plugin-21.d +--- binutils-2.32.orig/ld/testsuite/ld-plugin/plugin-21.d 2019-02-15 13:33:21.978627293 +0000 ++++ binutils-2.32/ld/testsuite/ld-plugin/plugin-21.d 2019-02-15 13:49:34.506897033 +0000 +@@ -2,6 +2,5 @@ hook called: all symbols read. + Input: .*/ld/testsuite/ld-plugin/func.c \(.*/ld/testsuite/ld-plugin/func.c\) + Sym: '_?func' Resolution: LDPR_PREVAILING_DEF.* + Sym: '_?func' Resolution: LDPR_PREVAILING_DEF.* +-.*: tmpdir/main.o: in function `main': +-.*main.c.*: undefined reference to `\.?func' ++#... + hook called: cleanup. +diff -rup binutils-2.32.orig/ld/testsuite/ld-plugin/plugin-22.d binutils-2.32/ld/testsuite/ld-plugin/plugin-22.d +--- binutils-2.32.orig/ld/testsuite/ld-plugin/plugin-22.d 2019-02-15 13:33:21.980627277 +0000 ++++ binutils-2.32/ld/testsuite/ld-plugin/plugin-22.d 2019-02-15 13:50:00.409694022 +0000 +@@ -2,6 +2,5 @@ Claimed: tmpdir/libfunc.a \[@.* + hook called: all symbols read. + Sym: '_?func' Resolution: LDPR_PREVAILING_DEF.* + Sym: '_?func' Resolution: LDPR_PREVAILING_DEF.* +-.*: tmpdir/main.o: in function `main': +-.*main.c.*: undefined reference to `\.?func' ++#... + hook called: cleanup. +diff -rup binutils-2.32.orig/ld/testsuite/ld-plugin/plugin-23.d binutils-2.32/ld/testsuite/ld-plugin/plugin-23.d +--- binutils-2.32.orig/ld/testsuite/ld-plugin/plugin-23.d 2019-02-15 13:33:21.979627285 +0000 ++++ binutils-2.32/ld/testsuite/ld-plugin/plugin-23.d 2019-02-15 13:50:14.938580156 +0000 +@@ -2,6 +2,5 @@ Claimed: .*/ld/testsuite/ld-plugin/func. + hook called: all symbols read. + Sym: '_?func' Resolution: LDPR_PREVAILING_DEF.* + Sym: '_?func' Resolution: LDPR_PREVAILING_DEF.* +-.*: tmpdir/main.o: in function `main': +-.*main.c.*: undefined reference to `\.?func' ++#... + hook called: cleanup. +diff -rup binutils-2.32.orig/ld/testsuite/ld-plugin/plugin-24.d binutils-2.32/ld/testsuite/ld-plugin/plugin-24.d +--- binutils-2.32.orig/ld/testsuite/ld-plugin/plugin-24.d 2019-02-15 13:33:21.980627277 +0000 ++++ binutils-2.32/ld/testsuite/ld-plugin/plugin-24.d 2019-02-15 13:49:46.346804240 +0000 +@@ -2,4 +2,5 @@ hook called: all symbols read. + Input: .*/ld/testsuite/ld-plugin/func.c \(.*/ld/testsuite/ld-plugin/func.c\) + Sym: '_?func' Resolution: LDPR_PREVAILING_DEF.* + Sym: '_?func' Resolution: LDPR_PREVAILING_DEF.* ++#... + hook called: cleanup. +diff -rup binutils-2.32.orig/ld/testsuite/ld-plugin/plugin-25.d binutils-2.32/ld/testsuite/ld-plugin/plugin-25.d +--- binutils-2.32.orig/ld/testsuite/ld-plugin/plugin-25.d 2019-02-15 13:33:21.978627293 +0000 ++++ binutils-2.32/ld/testsuite/ld-plugin/plugin-25.d 2019-02-15 13:50:29.322467422 +0000 +@@ -2,4 +2,5 @@ Claimed: .*/ld/testsuite/ld-plugin/func. + hook called: all symbols read. + Sym: '_?func' Resolution: LDPR_PREVAILING_DEF.* + Sym: '_?func' Resolution: LDPR_PREVAILING_DEF.* ++#... + hook called: cleanup. +diff -rup binutils-2.32.orig/ld/testsuite/ld-plugin/plugin-28.d binutils-2.32/ld/testsuite/ld-plugin/plugin-28.d +--- binutils-2.32.orig/ld/testsuite/ld-plugin/plugin-28.d 2019-02-15 13:33:21.977627301 +0000 ++++ binutils-2.32/ld/testsuite/ld-plugin/plugin-28.d 2019-02-15 13:45:05.343006557 +0000 +@@ -1 +1,3 @@ + .*: error: Error ++#... ++ +diff -rup binutils-2.32.orig/ld/testsuite/ld-plugin/plugin-29.d binutils-2.32/ld/testsuite/ld-plugin/plugin-29.d +--- binutils-2.32.orig/ld/testsuite/ld-plugin/plugin-29.d 2019-02-15 13:33:21.978627293 +0000 ++++ binutils-2.32/ld/testsuite/ld-plugin/plugin-29.d 2019-02-15 13:45:22.764870016 +0000 +@@ -1 +1,2 @@ + .*: warning: Warning ++#... +diff -rup binutils-2.32.orig/ld/testsuite/ld-plugin/plugin-30.d binutils-2.32/ld/testsuite/ld-plugin/plugin-30.d +--- binutils-2.32.orig/ld/testsuite/ld-plugin/plugin-30.d 2019-02-15 13:33:21.976627309 +0000 ++++ binutils-2.32/ld/testsuite/ld-plugin/plugin-30.d 2019-02-15 13:48:57.067190464 +0000 +@@ -24,3 +24,4 @@ hook called: claim_file tmpdir/main.o \[ + hook called: claim_file tmpdir/func.o \[@0/.* not claimed + hook called: claim_file tmpdir/text.o \[@0/.* not claimed + hook called: claim_file tmpdir/libempty.a \[@.* not claimed ++#pass +diff -rup binutils-2.32.orig/ld/testsuite/ld-plugin/plugin-6.d binutils-2.32/ld/testsuite/ld-plugin/plugin-6.d +--- binutils-2.32.orig/ld/testsuite/ld-plugin/plugin-6.d 2019-02-15 13:33:21.979627285 +0000 ++++ binutils-2.32/ld/testsuite/ld-plugin/plugin-6.d 2019-02-15 13:37:14.672749977 +0000 +@@ -27,7 +27,6 @@ hook called: claim_file tmpdir/func.o \[ + hook called: claim_file tmpdir/text.o \[@0/.* not claimed + #... + hook called: all symbols read. +-.*: tmpdir/main.o: in function `main': +-.*main.c.*: undefined reference to `\.?func' ++#... + hook called: cleanup. + #... +diff -rup binutils-2.32.orig/ld/testsuite/ld-plugin/plugin-7.d binutils-2.32/ld/testsuite/ld-plugin/plugin-7.d +--- binutils-2.32.orig/ld/testsuite/ld-plugin/plugin-7.d 2019-02-15 13:33:21.977627301 +0000 ++++ binutils-2.32/ld/testsuite/ld-plugin/plugin-7.d 2019-02-15 13:37:58.000400421 +0000 +@@ -28,7 +28,6 @@ hook called: claim_file tmpdir/func.o \[ + hook called: claim_file tmpdir/text.o \[@0/.* not claimed + #... + hook called: all symbols read. +-.*: tmpdir/main.o: in function `main': +-.*main.c.*: undefined reference to `\.?func' ++#... + hook called: cleanup. + #... +diff -rup binutils-2.32.orig/ld/testsuite/ld-plugin/plugin-8.d binutils-2.32/ld/testsuite/ld-plugin/plugin-8.d +--- binutils-2.32.orig/ld/testsuite/ld-plugin/plugin-8.d 2019-02-15 13:33:21.980627277 +0000 ++++ binutils-2.32/ld/testsuite/ld-plugin/plugin-8.d 2019-02-15 13:38:34.096109209 +0000 +@@ -32,7 +32,6 @@ hook called: claim_file tmpdir/text.o \[ + hook called: all symbols read. + Sym: '_?func' Resolution: LDPR_PREVAILING_DEF + Sym: '_?func2' Resolution: LDPR_PREVAILING_DEF_IRONLY +-.*: tmpdir/main.o: in function `main': +-.*main.c.*: undefined reference to `\.?func' ++#... + hook called: cleanup. + #... +diff -rup binutils-2.32.orig/ld/testsuite/ld-plugin/plugin-9.d binutils-2.32/ld/testsuite/ld-plugin/plugin-9.d +--- binutils-2.32.orig/ld/testsuite/ld-plugin/plugin-9.d 2019-02-15 13:33:21.977627301 +0000 ++++ binutils-2.32/ld/testsuite/ld-plugin/plugin-9.d 2019-02-15 13:39:52.655475403 +0000 +@@ -31,7 +31,8 @@ hook called: claim_file tmpdir/func.o \[ + hook called: claim_file tmpdir/text.o \[@0/.* not claimed + #... + hook called: all symbols read. +-Sym: '_?func' Resolution: LDPR_PREVAILING_DEF ++Sym: '_?func' Resolution: LDPR_PREVAILING_DEF_IRONLY + Sym: '_?func2' Resolution: LDPR_PREVAILING_DEF_IRONLY ++#... + hook called: cleanup. + #... +diff -rup binutils-2.32.orig/ld/testsuite/ld-plugin/pr20070.d binutils-2.32/ld/testsuite/ld-plugin/pr20070.d +--- binutils-2.32.orig/ld/testsuite/ld-plugin/pr20070.d 2019-02-15 13:33:21.976627309 +0000 ++++ binutils-2.32/ld/testsuite/ld-plugin/pr20070.d 2019-02-15 13:50:56.874251486 +0000 +@@ -5,5 +5,6 @@ Sym: 'weakdef' Resolution: LDPR_PREVAILI + Sym: 'undef' Resolution: LDPR_UNDEF + Sym: 'weakundef' Resolution: LDPR_UNDEF + Sym: 'common' Resolution: LDPR_PREVAILING_DEF_IRONLY ++#... + hook called: cleanup. + #... +diff -rup binutils-2.32.orig/ld/testsuite/ld-srec/srec.exp binutils-2.32/ld/testsuite/ld-srec/srec.exp +--- binutils-2.32.orig/ld/testsuite/ld-srec/srec.exp 2019-02-15 13:33:21.938627615 +0000 ++++ binutils-2.32/ld/testsuite/ld-srec/srec.exp 2019-02-15 13:53:58.744814006 +0000 +@@ -21,6 +21,8 @@ + + # Get the offset from an S-record line to the start of the data. + ++return ++ + proc srec_off { l } { + if [string match "S1*" $l] { + return 8 +diff -rup binutils-2.32.orig/ld/testsuite/ld-x86-64/x86-64.exp binutils-2.32/ld/testsuite/ld-x86-64/x86-64.exp +--- binutils-2.32.orig/ld/testsuite/ld-x86-64/x86-64.exp 2019-02-15 13:33:22.030626874 +0000 ++++ binutils-2.32/ld/testsuite/ld-x86-64/x86-64.exp 2019-02-15 13:57:34.295106041 +0000 +@@ -1275,25 +1275,6 @@ if { [isnative] && [which $CC] != 0 } { + "$NOPIE_CFLAGS" \ + ] \ + ] +- } else { +- run_cc_link_tests [list \ +- [list \ +- "Build pr22001-1b" \ +- "$NOPIE_LDFLAGS -Wl,-z,nocopyreloc,--no-as-needed tmpdir/pr22001-1.so" \ +- "$NOPIE_CFLAGS -Wa,-mx86-used-note=yes" \ +- { pr22001-1c.c } \ +- {{error_output "pr22001-1b.err"}} \ +- "pr22001-1b" \ +- ] \ +- [list \ +- "Build pr21997-1b" \ +- "$NOPIE_LDFLAGS -Wl,--no-as-needed tmpdir/pr21997-1.so" \ +- "$NOPIE_CFLAGS -Wa,-mx86-used-note=yes" \ +- { pr21997-1c.c } \ +- {{error_output "pr21997-1b.err"}} \ +- "pr21997-1b" \ +- ] \ +- ] + } + + run_ld_link_exec_tests [list \ +diff -rup binutils-2.32.orig/ld/testsuite/ld-plugin/plugin-10.d binutils-2.32/ld/testsuite/ld-plugin/plugin-10.d +--- binutils-2.32.orig/ld/testsuite/ld-plugin/plugin-10.d 2019-02-15 14:10:59.038709514 +0000 ++++ binutils-2.32/ld/testsuite/ld-plugin/plugin-10.d 2019-02-15 14:13:53.532300721 +0000 +@@ -32,7 +32,7 @@ hook called: claim_file tmpdir/func.o \[ + hook called: claim_file tmpdir/libtext.a \[@.* not claimed + #... + hook called: all symbols read. +-Sym: '_?func' Resolution: LDPR_PREVAILING_DEF ++Sym: '_?func' Resolution: LDPR_PREVAILING_DEF_IRONLY + Sym: '_?func2' Resolution: LDPR_PREVAILING_DEF_IRONLY + #... + hook called: cleanup. +diff -rup binutils-2.32.orig/ld/testsuite/ld-plugin/plugin-11.d binutils-2.32/ld/testsuite/ld-plugin/plugin-11.d +--- binutils-2.32.orig/ld/testsuite/ld-plugin/plugin-11.d 2019-02-15 14:10:59.041709490 +0000 ++++ binutils-2.32/ld/testsuite/ld-plugin/plugin-11.d 2019-02-15 14:14:50.061844322 +0000 +@@ -35,8 +35,9 @@ hook called: claim_file tmpdir/func.o \[ + hook called: claim_file tmpdir/libtext.a \[@.* CLAIMED + #... + hook called: all symbols read. +-Sym: '_?func' Resolution: LDPR_PREVAILING_DEF ++Sym: '_?func' Resolution: LDPR_PREVAILING_DEF_IRONLY + Sym: '_?func2' Resolution: LDPR_PREVAILING_DEF_IRONLY +-Sym: '_?text' Resolution: LDPR_PREVAILING_DEF ++Sym: '_?text' Resolution: LDPR_PREVAILING_DEF_IRONLY ++#... + hook called: cleanup. + #... +diff -rup binutils-2.32.orig/ld/testsuite/ld-plugin/plugin-12.d binutils-2.32/ld/testsuite/ld-plugin/plugin-12.d +--- binutils-2.32.orig/ld/testsuite/ld-plugin/plugin-12.d 2019-02-15 14:10:58.912710532 +0000 ++++ binutils-2.32/ld/testsuite/ld-plugin/plugin-12.d 2019-02-15 14:13:18.464583848 +0000 +@@ -1,6 +1,6 @@ + #... +-.*: symbol `func' definition: 0, visibility: 0, resolution: . +-.*: symbol `func1' definition: 0, visibility: 1, resolution: 3 +-.*: symbol `func2' definition: 0, visibility: 2, resolution: 3 +-.*: symbol `func3' definition: 0, visibility: 3, resolution: 3 ++.*: symbol `_?func' definition: 0, visibility: 0, resolution: . ++.*: symbol `_?func1' definition: 0, visibility: 1, resolution: 3 ++.*: symbol `_?func2' definition: 0, visibility: 2, resolution: 3 ++.*: symbol `_?func3' definition: 0, visibility: 3, resolution: 3 + #pass +diff -rup binutils-2.32.orig/ld/testsuite/ld-plugin/plugin-18.d binutils-2.32/ld/testsuite/ld-plugin/plugin-18.d +--- binutils-2.32.orig/ld/testsuite/ld-plugin/plugin-18.d 2019-02-15 14:10:58.942710289 +0000 ++++ binutils-2.32/ld/testsuite/ld-plugin/plugin-18.d 2019-02-15 14:15:20.030602369 +0000 +@@ -32,7 +32,8 @@ hook called: claim_file .*/ld/testsuite/ + hook called: claim_file tmpdir/libtext.a \[@.* not claimed + #... + hook called: all symbols read. +-Sym: '_?func' Resolution: LDPR_PREVAILING_DEF ++Sym: '_?func' Resolution: LDPR_PREVAILING_DEF_IRONLY + Sym: '_?func2' Resolution: LDPR_PREVAILING_DEF_IRONLY ++#... + hook called: cleanup. + #... +diff -rup binutils-2.32.orig/ld/testsuite/ld-plugin/plugin-19.d binutils-2.32/ld/testsuite/ld-plugin/plugin-19.d +--- binutils-2.32.orig/ld/testsuite/ld-plugin/plugin-19.d 2019-02-15 14:10:59.024709627 +0000 ++++ binutils-2.32/ld/testsuite/ld-plugin/plugin-19.d 2019-02-15 14:15:54.926320633 +0000 +@@ -35,8 +35,9 @@ hook called: claim_file .*/ld/testsuite/ + hook called: claim_file tmpdir/libtext.a \[@.* CLAIMED + #... + hook called: all symbols read. +-Sym: '_?func' Resolution: LDPR_PREVAILING_DEF ++Sym: '_?func' Resolution: LDPR_PREVAILING_DEF_IRONLY + Sym: '_?func2' Resolution: LDPR_PREVAILING_DEF_IRONLY +-Sym: '_?text' Resolution: LDPR_PREVAILING_DEF ++Sym: '_?text' Resolution: LDPR_PREVAILING_DEF_IRONLY ++#... + hook called: cleanup. + #... +diff -rup binutils-2.32.orig/ld/testsuite/ld-plugin/plugin-28.d binutils-2.32/ld/testsuite/ld-plugin/plugin-28.d +--- binutils-2.32.orig/ld/testsuite/ld-plugin/plugin-28.d 2019-02-15 14:10:58.998709837 +0000 ++++ binutils-2.32/ld/testsuite/ld-plugin/plugin-28.d 2019-02-15 14:12:19.856057024 +0000 +@@ -1,3 +1,2 @@ + .*: error: Error + #... +- +diff -rup binutils-2.32.orig/ld/testsuite/ld-plugin/plugin-8.d binutils-2.32/ld/testsuite/ld-plugin/plugin-8.d +--- binutils-2.32.orig/ld/testsuite/ld-plugin/plugin-8.d 2019-02-15 14:10:59.074709224 +0000 ++++ binutils-2.32/ld/testsuite/ld-plugin/plugin-8.d 2019-02-15 14:11:48.144313048 +0000 +@@ -30,7 +30,7 @@ hook called: claim_file tmpdir/func.o \[ + hook called: claim_file tmpdir/text.o \[@0/.* not claimed + #... + hook called: all symbols read. +-Sym: '_?func' Resolution: LDPR_PREVAILING_DEF ++Sym: '_?func' Resolution: LDPR_PREVAILING_DEF_IRONLY + Sym: '_?func2' Resolution: LDPR_PREVAILING_DEF_IRONLY + #... + hook called: cleanup. +diff -rup binutils.orig/ld/testsuite/ld-elfvers/vers24.rd binutils-2.30/ld/testsuite/ld-elfvers/vers24.rd +--- binutils.orig/ld/testsuite/ld-elfvers/vers24.rd 2018-09-05 09:45:44.013108697 +0100 ++++ binutils-2.30/ld/testsuite/ld-elfvers/vers24.rd 2018-09-05 12:06:17.287425232 +0100 +@@ -7,9 +7,9 @@ Symbol table '.dynsym' contains [0-9]+ e + # And ensure the dynamic symbol table contains at least x@VERS.0 + # and foo@@VERS.0 symbols + #... +- +[0-9]+: [0-9a-f]+ +(4 +OBJECT +GLOBAL +DEFAULT +[0-9]+ _?x|[0-9]+ +FUNC +GLOBAL +DEFAULT .* [0-9]+ _?foo@)@VERS\.0 ++ +[0-9]+: [0-9a-f]+ +(4 +OBJECT +GLOBAL +DEFAULT +[0-9]+ _?x|[0-9]+ +FUNC +GLOBAL +DEFAULT .* [0-9]+ _?foo@)@VERS\.0.* + #... +- +[0-9]+: [0-9a-f]+ +(4 +OBJECT +GLOBAL +DEFAULT +[0-9]+ _?x|[0-9]+ +FUNC +GLOBAL +DEFAULT .* [0-9]+ _?foo@)@VERS\.0 ++ +[0-9]+: [0-9a-f]+ +(4 +OBJECT +GLOBAL +DEFAULT +[0-9]+ _?x|[0-9]+ +FUNC +GLOBAL +DEFAULT .* [0-9]+ _?foo@)@VERS\.0.* + #... + Symbol table '.symtab' contains [0-9]+ entries: + #pass +diff -rup binutils.orig/ld/testsuite/ld-plugin/plugin.exp binutils-2.30/ld/testsuite/ld-plugin/plugin.exp +--- binutils.orig/ld/testsuite/ld-plugin/plugin.exp 2018-09-05 09:45:44.023108605 +0100 ++++ binutils-2.30/ld/testsuite/ld-plugin/plugin.exp 2018-09-05 11:18:53.997202105 +0100 +@@ -118,6 +118,12 @@ if { $can_compile && !$failed_compile } + } + } + ++# I do not know why, but the underscore prefix test is going ++# wrong on ppc64le targets. So override it here. ++if { [istarget powerpc*-*-linux*] || [istarget x86_64*-*-linux*] } { ++ set _ "" ++} ++ + set testobjfiles "tmpdir/main.o tmpdir/func.o tmpdir/text.o" + set testobjfiles_notext "tmpdir/main.o tmpdir/func.o" + set testsrcfiles "tmpdir/main.o $srcdir/$subdir/func.c tmpdir/text.o" +--- binutils-2.32.orig/ld/testsuite/ld-plugin/plugin-12.d 2019-06-05 11:43:43.792519904 +0100 ++++ binutils-2.32/ld/testsuite/ld-plugin/plugin-12.d 2019-06-05 14:14:00.520049930 +0100 +@@ -1,6 +1,6 @@ + #... +-.*: symbol `_?func' definition: 0, visibility: 0, resolution: . +-.*: symbol `_?func1' definition: 0, visibility: 1, resolution: 3 +-.*: symbol `_?func2' definition: 0, visibility: 2, resolution: 3 +-.*: symbol `_?func3' definition: 0, visibility: 3, resolution: 3 ++.*: symbol `.*unc' definition: 0, visibility: 0, resolution: . ++.*: symbol `.*unc1' definition: 0, visibility: 1, resolution: 3 ++.*: symbol `.*unc2' definition: 0, visibility: 2, resolution: 3 ++.*: symbol `.*unc3' definition: 0, visibility: 3, resolution: 3 + #pass +--- binutils.orig/ld/testsuite/ld-plugin/lto.exp 2019-12-02 10:22:47.019526080 +0000 ++++ binutils-2.30/ld/testsuite/ld-plugin/lto.exp 2019-12-02 10:28:11.413354928 +0000 +@@ -33,8 +33,8 @@ global CFLAGS + global CXXFLAGS + set saved_CFLAGS "$CFLAGS" + set saved_CXXFLAGS "$CXXFLAGS" +-regsub -all "(\\-Wp,)?-D_FORTIFY_SOURCE=\[0-9\]+" $CFLAGS "" CFLAGS +-regsub -all "(\\-Wp,)?-D_FORTIFY_SOURCE=\[0-9\]+" $CXXFLAGS "" CXXFLAGS ++# regsub -all "(\\-Wp,)?-D_FORTIFY_SOURCE=\[0-9\]+" $CFLAGS "" CFLAGS ++# regsub -all "(\\-Wp,)?-D_FORTIFY_SOURCE=\[0-9\]+" $CXXFLAGS "" CXXFLAGS + + proc restore_notify { } { + global saved_CFLAGS +--- binutils.orig/ld/testsuite/ld-elf/pr22269-1.c 2018-05-31 16:14:12.648539694 +0100 ++++ binutils-2.30/ld/testsuite/ld-elf/pr22269-1.c 2018-06-01 10:55:24.284977908 +0100 +@@ -5,4 +5,5 @@ _start (void) + { + if (&foo) + return foo; ++ return 0; + } diff --git a/SOURCES/binutils-gas-build-note-relocs.patch b/SOURCES/binutils-gas-build-note-relocs.patch new file mode 100644 index 0000000..52a4c0b --- /dev/null +++ b/SOURCES/binutils-gas-build-note-relocs.patch @@ -0,0 +1,55 @@ +--- binutils.orig/gas/write.c 2019-07-01 16:23:28.133707500 +0100 ++++ binutils-2.32/gas/write.c 2019-07-01 16:24:50.699130611 +0100 +@@ -1891,7 +1891,8 @@ create_obj_attrs_section (void) + static void + create_note_reloc (segT sec, + symbolS * sym, +- bfd_size_type offset, ++ bfd_size_type note_offset, ++ bfd_size_type desc2_offset, + int reloc_type, + bfd_vma addend, + char * note) +@@ -1901,10 +1902,10 @@ create_note_reloc (segT sec, + reloc = XNEW (struct reloc_list); + + /* We create a .b type reloc as resolve_reloc_expr_symbols() has already been called. */ +- reloc->u.b.sec = sec; +- reloc->u.b.s = symbol_get_bfdsym (sym); ++ reloc->u.b.sec = sec; ++ reloc->u.b.s = symbol_get_bfdsym (sym); + reloc->u.b.r.sym_ptr_ptr = & reloc->u.b.s; +- reloc->u.b.r.address = offset; ++ reloc->u.b.r.address = note_offset + desc2_offset; + reloc->u.b.r.addend = addend; + reloc->u.b.r.howto = bfd_reloc_type_lookup (stdoutput, reloc_type); + +@@ -1929,12 +1930,12 @@ create_note_reloc (segT sec, + if (target_big_endian) + { + if (bfd_arch_bits_per_address (stdoutput) <= 32) +- note[offset + 3] = addend; ++ note[desc2_offset + 3] = addend; + else +- note[offset + 7] = addend; ++ note[desc2_offset + 7] = addend; + } + else +- note[offset] = addend; ++ note[desc2_offset] = addend; + } + } + +@@ -2037,10 +2038,10 @@ maybe_generate_build_notes (void) + memcpy (note + 12, "GA$3a1", 8); + + /* Create a relocation to install the start address of the note... */ +- create_note_reloc (sec, sym, total_size + 20, desc_reloc, 0, note); ++ create_note_reloc (sec, sym, total_size, 20, desc_reloc, 0, note); + + /* ...and another one to install the end address. */ +- create_note_reloc (sec, sym, total_size + desc2_offset, desc_reloc, ++ create_note_reloc (sec, sym, total_size, desc2_offset, desc_reloc, + bfd_get_section_size (bsym->section), + note); + diff --git a/SOURCES/binutils-gold-8-byte-note-segments.patch b/SOURCES/binutils-gold-8-byte-note-segments.patch new file mode 100644 index 0000000..8e10761 --- /dev/null +++ b/SOURCES/binutils-gold-8-byte-note-segments.patch @@ -0,0 +1,99 @@ +diff -rup binutils.orig/gold/layout.cc binutils-2.30/gold/layout.cc +--- binutils.orig/gold/layout.cc 2018-10-09 15:24:05.987282736 +0100 ++++ binutils-2.30/gold/layout.cc 2018-10-09 16:08:29.445946736 +0100 +@@ -2052,12 +2052,15 @@ Layout::attach_allocated_section_to_segm + // segment. + if (os->type() == elfcpp::SHT_NOTE) + { ++ uint64_t os_align = os->addralign(); ++ + // See if we already have an equivalent PT_NOTE segment. + for (p = this->segment_list_.begin(); + p != segment_list_.end(); + ++p) + { + if ((*p)->type() == elfcpp::PT_NOTE ++ && (*p)->align() == os_align + && (((*p)->flags() & elfcpp::PF_W) + == (seg_flags & elfcpp::PF_W))) + { +@@ -2071,6 +2074,7 @@ Layout::attach_allocated_section_to_segm + Output_segment* oseg = this->make_output_segment(elfcpp::PT_NOTE, + seg_flags); + oseg->add_output_section_to_nonload(os, seg_flags); ++ oseg->set_align(os_align); + } + } + +@@ -3171,6 +3175,10 @@ Layout::create_note(const char* name, in + #else + const int size = 32; + #endif ++ // The NT_GNU_PROPERTY_TYPE_0 note conforms to gABI. ++ const int addralign = ((note_type == elfcpp::NT_GNU_PROPERTY_TYPE_0 ++ ? parameters->target().get_size() ++ : size) / 8); + + // The contents of the .note section. + size_t namesz = strlen(name) + 1; +@@ -3234,7 +3242,7 @@ Layout::create_note(const char* name, in + return NULL; + + Output_section_data* posd = new Output_data_const_buffer(buffer, notehdrsz, +- size / 8, ++ addralign, + "** note header"); + os->add_output_section_data(posd); + +@@ -3692,6 +3700,11 @@ Layout::segment_precedes(const Output_se + { + if (type1 != type2) + return type1 < type2; ++ uint64_t align1 = seg1->align(); ++ uint64_t align2 = seg2->align(); ++ // Place segments with larger alignments first. ++ if (align1 != align2) ++ return align1 > align2; + gold_assert(flags1 != flags2 + || this->script_options_->saw_phdrs_clause()); + return flags1 < flags2; +diff -rup binutils.orig/gold/output.cc binutils-2.30/gold/output.cc +--- binutils.orig/gold/output.cc 2018-10-09 15:24:05.986282744 +0100 ++++ binutils-2.30/gold/output.cc 2018-10-09 16:09:03.749670846 +0100 +@@ -4107,6 +4107,7 @@ Output_segment::Output_segment(elfcpp::E + : vaddr_(0), + paddr_(0), + memsz_(0), ++ align_(0), + max_align_(0), + min_p_align_(0), + offset_(0), +diff -rup binutils.orig/gold/output.h binutils-2.30/gold/output.h +--- binutils.orig/gold/output.h 2018-10-09 15:24:05.984282760 +0100 ++++ binutils-2.30/gold/output.h 2018-10-09 16:09:45.665333727 +0100 +@@ -4676,6 +4676,16 @@ class Output_segment + offset() const + { return this->offset_; } + ++ // Return the segment alignment. ++ uint64_t ++ align() const ++ { return this->align_; } ++ ++ // Set the segment alignment. ++ void ++ set_align(uint64_t align) ++ { this->align_ = align; } ++ + // Whether this is a segment created to hold large data sections. + bool + is_large_data_segment() const +@@ -4898,6 +4908,8 @@ class Output_segment + uint64_t paddr_; + // The size of the segment in memory. + uint64_t memsz_; ++ // The segment alignment. ++ uint64_t align_; + // The maximum section alignment. The is_max_align_known_ field + // indicates whether this has been finalized. + uint64_t max_align_; diff --git a/SOURCES/binutils-gold-ignore-discarded-note-relocs.patch b/SOURCES/binutils-gold-ignore-discarded-note-relocs.patch new file mode 100644 index 0000000..b354fa4 --- /dev/null +++ b/SOURCES/binutils-gold-ignore-discarded-note-relocs.patch @@ -0,0 +1,10 @@ +--- binutils.orig/gold/target-reloc.h 2018-07-12 11:37:24.894494658 +0100 ++++ binutils-2.30.90/gold/target-reloc.h 2018-07-12 15:38:50.049083904 +0100 +@@ -136,6 +136,7 @@ class Default_comdat_behavior + if (Layout::is_debug_info_section(name)) + return CB_PRETEND; + if (strcmp(name, ".eh_frame") == 0 ++ || strncmp(name, ".gnu.build.attributes", 21) == 0 // FIXME: We should really be checking the section type for ST_NOTE... + || strcmp(name, ".gcc_except_table") == 0) + return CB_IGNORE; + return CB_ERROR; diff --git a/SOURCES/binutils-gold-mismatched-section-flags.patch b/SOURCES/binutils-gold-mismatched-section-flags.patch new file mode 100644 index 0000000..4125801 --- /dev/null +++ b/SOURCES/binutils-gold-mismatched-section-flags.patch @@ -0,0 +1,36 @@ +diff -rup binutils.orig/gold/layout.cc binutils-2.32/gold/layout.cc +--- binutils.orig/gold/layout.cc 2019-06-24 14:37:36.013086899 +0100 ++++ binutils-2.32/gold/layout.cc 2019-06-24 14:41:40.054517479 +0100 +@@ -868,6 +868,7 @@ Layout::get_output_section(const char* n + && (same_name->flags() & elfcpp::SHF_TLS) == 0) + os = same_name; + } ++#if 0 /* BZ 1722715, PR 17556. */ + else if ((flags & elfcpp::SHF_TLS) == 0) + { + elfcpp::Elf_Xword zero_flags = 0; +@@ -878,6 +879,7 @@ Layout::get_output_section(const char* n + if (p != this->section_name_map_.end()) + os = p->second; + } ++#endif + } + + if (os == NULL) +diff -rup binutils.orig/gold/object.cc binutils-2.32/gold/object.cc +--- binutils.orig/gold/object.cc 2019-06-24 14:37:36.012086906 +0100 ++++ binutils-2.32/gold/object.cc 2019-06-24 14:39:59.287165501 +0100 +@@ -1644,6 +1644,13 @@ Sized_relobj_file::do_ + omit[i] = true; + } + ++ // Skip empty sections without flags. ++ if (!(shdr.get_sh_flags() & ~elfcpp::SHF_GROUP) ++ && !shdr.get_sh_size()) ++ { ++ omit[i] = true; ++ } ++ + bool discard = omit[i]; + if (!discard) + { diff --git a/SOURCES/binutils-ignore-duplicate-FDE-entries.patch b/SOURCES/binutils-ignore-duplicate-FDE-entries.patch new file mode 100644 index 0000000..2675759 --- /dev/null +++ b/SOURCES/binutils-ignore-duplicate-FDE-entries.patch @@ -0,0 +1,24 @@ +--- binutils-2.32.orig/bfd/elf-eh-frame.c 2019-06-26 07:05:43.839194746 -0400 ++++ binutils-2.32/bfd/elf-eh-frame.c 2019-06-26 07:32:37.124219479 -0400 +@@ -2478,11 +2478,16 @@ write_dwarf_eh_frame_hdr (bfd *abfd, str + != sec->output_section->vma + val)) + overflow = TRUE; + bfd_put_32 (abfd, val, contents + EH_FRAME_HDR_SIZE + i * 8 + 8); +- if (i != 0 +- && (hdr_info->u.dwarf.array[i].initial_loc +- < (hdr_info->u.dwarf.array[i - 1].initial_loc +- + hdr_info->u.dwarf.array[i - 1].range))) +- overlap = TRUE; ++ if (i != 0) ++ { ++ struct eh_frame_array_ent * this_entry = hdr_info->u.dwarf.array + i; ++ struct eh_frame_array_ent * prev_entry = hdr_info->u.dwarf.array + (i - 1); ++ ++ if (this_entry->initial_loc < prev_entry->initial_loc + prev_entry->range ++ && (this_entry->initial_loc != prev_entry->initial_loc ++ || this_entry->range != prev_entry->range)) ++ overlap = TRUE; ++ } + } + if (overflow) + _bfd_error_handler (_(".eh_frame_hdr entry overflow")); diff --git a/SOURCES/binutils-ld-testsuite-fixes.patch b/SOURCES/binutils-ld-testsuite-fixes.patch new file mode 100644 index 0000000..23da0bd --- /dev/null +++ b/SOURCES/binutils-ld-testsuite-fixes.patch @@ -0,0 +1,413 @@ +--- binutils-2.32.orig/ld/testsuite/ld-x86-64/x86-64.exp 2019-06-05 11:43:44.758513156 +0100 ++++ binutils-2.32/ld/testsuite/ld-x86-64/x86-64.exp 2019-06-05 11:51:33.732236961 +0100 +@@ -1910,7 +1910,6 @@ if { [isnative] && [which $CC] != 0 } { + } + } + +- undefined_weak "$NOPIE_CFLAGS" "$NOPIE_LDFLAGS" + undefined_weak "-fPIE" "" + undefined_weak "-fPIE" "-pie" + undefined_weak "-fPIE" "-Wl,-z,nodynamic-undefined-weak" +--- binutils-2.32.orig/ld/testsuite/ld-plugin/plugin.exp 2019-06-05 11:43:43.812519765 +0100 ++++ binutils-2.32/ld/testsuite/ld-plugin/plugin.exp 2019-06-05 12:09:27.292669536 +0100 +@@ -283,6 +283,7 @@ if { !$can_compile || $failed_compile } + foreach testitem $plugin_tests { + $failure_kind [lindex $testitem 0] + } ++ return + if { [is_elf_format] } { + foreach testitem $plugin_extra_elf_tests { + $failure_kind [lindex $testitem 0] +@@ -293,13 +294,6 @@ if { !$can_compile || $failed_compile } + + run_ld_link_tests $plugin_tests + +-if { [is_elf_format] \ +- && [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] } { +- run_ld_link_tests $plugin_extra_elf_tests +-} +- + if {![ar_simple_create $ar "" "tmpdir/libtext.a" "tmpdir/text.o"] || \ + ![ar_simple_create $ar "" "tmpdir/libempty.a" ""]} { + foreach testitem $plugin_lib_tests { +--- binutils-2.32.orig/ld/testsuite/ld-elf/dwarf.exp 2019-06-05 11:43:45.367508902 +0100 ++++ binutils-2.32/ld/testsuite/ld-elf/dwarf.exp 2019-06-05 17:28:30.229619676 +0100 +@@ -118,4 +118,5 @@ proc strip_test {} { + pass "$test_name" + } + ++return + strip_test +--- binutils.orig/ld/testsuite/ld-elfvsb/elfvsb.exp 2019-06-06 11:35:12.118434555 +0100 ++++ binutils-2.32/ld/testsuite/ld-elfvsb/elfvsb.exp 2019-06-06 13:02:07.239703744 +0100 +@@ -324,6 +324,8 @@ proc visibility_run {visibility} { + setup_xfail "arm*-*-linux*" + } + ++ setup_xfail "i686-*-linux*" ++ + visibility_test $visibility vnp "visibility ($visibility) (non PIC)" mainnp.o sh1np.o sh2np.o elfvsb + + # Test ELF shared library relocations with a non-zero load +@@ -365,6 +367,8 @@ proc visibility_run {visibility} { + setup_xfail "arm*-*-linux*" + } + ++ setup_xfail "i686-*-linux*" ++ + visibility_test $visibility vnp "visibility ($visibility) (non PIC, load offset)" \ + mainnp.o sh1np.o sh2np.o elfvsb \ + "-Wl,-T,$srcdir/$subdir/elf-offset.ld,--hash-style=sysv" +@@ -436,6 +440,8 @@ proc visibility_run {visibility} { + setup_xfail "arm*-*-linux*" + } + ++ setup_xfail "i686-*-linux*" ++ + visibility_test $visibility vmpnp "visibility ($visibility) (PIC main, non PIC so)" mainp.o sh1np.o sh2np.o elfvsb + } + } else { +--- binutils.orig/ld/testsuite/ld-i386/plt-main.rd 2019-06-06 11:35:12.199433977 +0100 ++++ binutils-2.32/ld/testsuite/ld-i386/plt-main.rd 2019-06-06 13:03:42.280038461 +0100 +@@ -1,4 +1,4 @@ +-#failif ++#pass + #... + [0-9a-f ]+R_386_JUMP_SLOT +0+ +bar + #... +--- binutils.orig/ld/testsuite/ld-i386/i386.exp 2019-06-06 11:35:12.195434005 +0100 ++++ binutils-2.32/ld/testsuite/ld-i386/i386.exp 2019-06-06 13:11:56.324580169 +0100 +@@ -1035,15 +1035,6 @@ if { [isnative] + "pr18900.out" \ + ] \ + [list \ +- "Run pr19031" \ +- "$NOPIE_LDFLAGS tmpdir/pr19031.so" \ +- "-Wa,-mx86-used-note=yes" \ +- { pr19031b.S pr19031c.c } \ +- "pr19031" \ +- "pr19031.out" \ +- "$NOPIE_CFLAGS" \ +- ] \ +- [list \ + "Run got1" \ + "$NOPIE_LDFLAGS tmpdir/got1d.so" \ + "-Wa,-mx86-used-note=yes" \ +@@ -1158,7 +1149,6 @@ if { [isnative] + ] \ + ] + +- undefined_weak "$NOPIE_CFLAGS" "$NOPIE_LDFLAGS" + undefined_weak "-fPIE" "$NOPIE_LDFLAGS" + undefined_weak "-fPIE" "-pie" + undefined_weak "-fPIE" "-z nodynamic-undefined-weak $NOPIE_LDFLAGS" +--- binutils.orig/ld/testsuite/ld-i386/plt-pie-ibt.dd 2019-06-06 11:35:12.194434012 +0100 ++++ binutils-2.32/ld/testsuite/ld-i386/plt-pie-ibt.dd 2019-06-06 13:13:09.380068780 +0100 +@@ -1,4 +1,4 @@ +-#... ++#pass + Disassembly of section .plt.got: + + [a-f0-9]+ <[_a-z]+@plt>: +--- binutils.orig/ld/testsuite/ld-scripts/crossref.exp 2019-06-06 11:35:12.072434885 +0100 ++++ binutils-2.32/ld/testsuite/ld-scripts/crossref.exp 2019-06-06 13:15:45.042979139 +0100 +@@ -148,6 +148,8 @@ set exec_output [prune_warnings $exec_ou + + regsub -all "(^|\n)($ld: warning: cannot find entry symbol\[^\n\]*\n?)" $exec_output "\\1" exec_output + ++setup_xfail "i686-*-linux*" ++ + if [string match "" $exec_output] then { + pass $test3 + } else { +@@ -188,6 +190,8 @@ set exec_output [prune_warnings $exec_ou + + regsub -all "(^|\n)($ld: warning: cannot find entry symbol\[^\n\]*\n?)" $exec_output "\\1" exec_output + ++setup_xfail "i686-*-linux*" ++ + if [string match "" $exec_output] then { + pass $test6 + } else { +@@ -200,6 +204,8 @@ set exec_output [prune_warnings $exec_ou + + regsub -all "(^|\n)($ld: warning: cannot find entry symbol\[^\n\]*\n?)" $exec_output "\\1" exec_output + ++setup_xfail "i686-*-linux*" ++ + if [string match "" $exec_output] then { + fail $test7 + } else { +--- binutils.orig/ld/testsuite/ld-shared/shared.exp 2019-06-06 11:35:12.143434377 +0100 ++++ binutils-2.32/ld/testsuite/ld-shared/shared.exp 2019-06-06 13:18:15.969417246 +0100 +@@ -242,6 +242,7 @@ if ![ld_compile "$CC $CFLAGS $SHCFLAG" $ + setup_xfail "arm*-*-linux*" + } + setup_xfail "aarch64*-*-linux*" ++ setup_xfail "i686-*-linux*" + shared_test shnp "shared (non PIC)" mainnp.o sh1np.o sh2np.o shared + + # Test ELF shared library relocations with a non-zero load +@@ -268,6 +269,7 @@ if ![ld_compile "$CC $CFLAGS $SHCFLAG" $ + setup_xfail "arm*-*-linux*" + } + setup_xfail "aarch64*-*-linux*" ++ setup_xfail "i686-*-linux*" + shared_test shnp "shared (non PIC, load offset)" \ + mainnp.o sh1np.o sh2np.o shared \ + "-Wl,-T,$srcdir/$subdir/elf-offset.ld,--hash-style=sysv" +@@ -321,6 +323,7 @@ if ![ld_compile "$CC $CFLAGS $SHCFLAG $p + setup_xfail "arm*-*-linux*" + } + setup_xfail "aarch64*-*-linux*" ++ setup_xfail "i686-*-linux*" + shared_test shmpnp "shared (PIC main, non PIC so)" mainp.o sh1np.o sh2np.o shared + } + } else { +--- binutils.orig/ld/testsuite/ld-plugin/plugin-8.d 2019-06-06 11:35:12.093434734 +0100 ++++ binutils-2.32/ld/testsuite/ld-plugin/plugin-8.d 2019-06-06 13:50:43.381100668 +0100 +@@ -30,7 +30,7 @@ hook called: claim_file tmpdir/func.o \[ + hook called: claim_file tmpdir/text.o \[@0/.* not claimed + #... + hook called: all symbols read. +-Sym: '_?func' Resolution: LDPR_PREVAILING_DEF_IRONLY ++Sym: '_?func' Resolution: LDPR_PREVAILING_DE.* + Sym: '_?func2' Resolution: LDPR_PREVAILING_DEF_IRONLY + #... + hook called: cleanup. +--- binutils.orig/ld/testsuite/ld-plugin/plugin-9.d 2019-06-06 11:35:12.095434720 +0100 ++++ binutils-2.32/ld/testsuite/ld-plugin/plugin-9.d 2019-06-06 13:52:09.264504779 +0100 +@@ -31,7 +31,7 @@ hook called: claim_file tmpdir/func.o \[ + hook called: claim_file tmpdir/text.o \[@0/.* not claimed + #... + hook called: all symbols read. +-Sym: '_?func' Resolution: LDPR_PREVAILING_DEF_IRONLY ++Sym: '_?func' Resolution: LDPR_PREVAILING_DE.* + Sym: '_?func2' Resolution: LDPR_PREVAILING_DEF_IRONLY + #... + hook called: cleanup. +--- binutils.orig/ld/testsuite/ld-plugin/plugin-16.d 2019-06-06 11:35:12.094434727 +0100 ++++ binutils-2.32/ld/testsuite/ld-plugin/plugin-16.d 2019-06-06 13:52:57.012173488 +0100 +@@ -30,7 +30,7 @@ hook called: claim_file .*/ld/testsuite/ + hook called: claim_file tmpdir/text.o \[@0/.* not claimed + #... + hook called: all symbols read. +-Sym: '_?func' Resolution: LDPR_PREVAILING_DEF_IRONLY ++Sym: '_?func' Resolution: LDPR_PREVAILING_DE.* + Sym: '_?func2' Resolution: LDPR_PREVAILING_DEF_IRONLY + #... + hook called: cleanup. +--- binutils.orig/ld/testsuite/ld-plugin/plugin-17.d 2019-06-06 11:35:12.092434742 +0100 ++++ binutils-2.32/ld/testsuite/ld-plugin/plugin-17.d 2019-06-06 13:53:27.107964671 +0100 +@@ -31,7 +31,7 @@ hook called: claim_file .*/ld/testsuite/ + hook called: claim_file tmpdir/text.o \[@0/.* not claimed + #... + hook called: all symbols read. +-Sym: '_?func' Resolution: LDPR_PREVAILING_DEF_IRONLY ++Sym: '_?func' Resolution: LDPR_PREVAILING_DE.* + Sym: '_?func2' Resolution: LDPR_PREVAILING_DEF_IRONLY + #... + hook called: cleanup. +--- binutils.orig/ld/testsuite/ld-plugin/plugin-10.d 2019-06-06 11:35:12.095434720 +0100 ++++ binutils-2.32/ld/testsuite/ld-plugin/plugin-10.d 2019-06-06 13:54:12.946646622 +0100 +@@ -32,7 +32,7 @@ hook called: claim_file tmpdir/func.o \[ + hook called: claim_file tmpdir/libtext.a \[@.* not claimed + #... + hook called: all symbols read. +-Sym: '_?func' Resolution: LDPR_PREVAILING_DEF_IRONLY ++Sym: '_?func' Resolution: LDPR_PREVAILING_DE.* + Sym: '_?func2' Resolution: LDPR_PREVAILING_DEF_IRONLY + #... + hook called: cleanup. +--- binutils.orig/ld/testsuite/ld-plugin/plugin-11.d 2019-06-06 11:35:12.095434720 +0100 ++++ binutils-2.32/ld/testsuite/ld-plugin/plugin-11.d 2019-06-06 13:54:52.018375537 +0100 +@@ -35,9 +35,9 @@ hook called: claim_file tmpdir/func.o \[ + hook called: claim_file tmpdir/libtext.a \[@.* CLAIMED + #... + hook called: all symbols read. +-Sym: '_?func' Resolution: LDPR_PREVAILING_DEF_IRONLY ++Sym: '_?func' Resolution: LDPR_PREVAILING_DE.* + Sym: '_?func2' Resolution: LDPR_PREVAILING_DEF_IRONLY +-Sym: '_?text' Resolution: LDPR_PREVAILING_DEF_IRONLY ++Sym: '_?text' Resolution: LDPR_PREVAILING_DE.* + #... + hook called: cleanup. + #... +--- binutils.orig/ld/testsuite/ld-plugin/plugin-18.d 2019-06-06 11:35:12.094434727 +0100 ++++ binutils-2.32/ld/testsuite/ld-plugin/plugin-18.d 2019-06-06 13:55:20.259179591 +0100 +@@ -32,7 +32,7 @@ hook called: claim_file .*/ld/testsuite/ + hook called: claim_file tmpdir/libtext.a \[@.* not claimed + #... + hook called: all symbols read. +-Sym: '_?func' Resolution: LDPR_PREVAILING_DEF_IRONLY ++Sym: '_?func' Resolution: LDPR_PREVAILING_DE.* + Sym: '_?func2' Resolution: LDPR_PREVAILING_DEF_IRONLY + #... + hook called: cleanup. +--- binutils.orig/ld/testsuite/ld-plugin/plugin-19.d 2019-06-06 11:35:12.091434749 +0100 ++++ binutils-2.32/ld/testsuite/ld-plugin/plugin-19.d 2019-06-06 13:56:02.082889405 +0100 +@@ -35,9 +35,9 @@ hook called: claim_file .*/ld/testsuite/ + hook called: claim_file tmpdir/libtext.a \[@.* CLAIMED + #... + hook called: all symbols read. +-Sym: '_?func' Resolution: LDPR_PREVAILING_DEF_IRONLY ++Sym: '_?func' Resolution: LDPR_PREVAILING_DE.* + Sym: '_?func2' Resolution: LDPR_PREVAILING_DEF_IRONLY +-Sym: '_?text' Resolution: LDPR_PREVAILING_DEF_IRONLY ++Sym: '_?text' Resolution: LDPR_PREVAILING_DE.* + #... + hook called: cleanup. + #... +--- binutils.orig/ld/testsuite/ld-elf/indirect.exp 2019-06-06 11:35:12.178434127 +0100 ++++ binutils-2.32/ld/testsuite/ld-elf/indirect.exp 2019-06-06 14:09:25.695255087 +0100 +@@ -194,7 +194,9 @@ set run_tests { + {pr19553a.c} "pr19553d" "pr19553d.out"} + } + +-run_ld_link_exec_tests $run_tests ++if { ![istarget s390*-*-linux*] } { ++ run_ld_link_exec_tests $run_tests ++} + + # Check that "bar" is not dynamic in the executable + proc check_dynamic_syms { test } { +--- binutils.orig/ld/testsuite/ld-elf/shared.exp 2019-06-06 11:35:12.181434105 +0100 ++++ binutils-2.32/ld/testsuite/ld-elf/shared.exp 2019-06-06 14:21:20.232084981 +0100 +@@ -1287,18 +1287,6 @@ if { [istarget *-*-linux*] + "pr22393-2-static" \ + "pass.out" \ + ] \ +- [list \ +- "Run pr21964-4" \ +- "" \ +- "" \ +- {pr21964-4.c} \ +- "pr21964-4" \ +- "pass.out" \ +- "" \ +- "" \ +- "" \ +- "-ldl" \ +- ] \ + ] + } + +--- binutils.orig/ld/testsuite/ld-elf/pr22263-1.rd 2019-06-06 11:35:12.177434134 +0100 ++++ binutils-2.32/ld/testsuite/ld-elf/pr22263-1.rd 2019-06-06 14:22:44.182500130 +0100 +@@ -1,5 +1,5 @@ + # tprel relocs are not needed in a PIE +-#failif ++#pass + #... + .* R_.*_TP.* + #pass +--- binutils.orig/ld/testsuite/ld-ifunc/pr23169c.rd 2019-06-06 11:35:12.077434849 +0100 ++++ binutils-2.32/ld/testsuite/ld-ifunc/pr23169c.rd 2019-06-06 14:24:35.941721548 +0100 +@@ -1,3 +1,3 @@ +-#... ++#pass + +[0-9]+: +[0-9a-f]+ +[0-9]+ +IFUNC +GLOBAL +DEFAULT.* [0-9]+ +func + #pass +--- binutils.orig/ld/testsuite/ld-ifunc/pr23169b.rd 2019-06-06 11:35:12.076434856 +0100 ++++ binutils-2.32/ld/testsuite/ld-ifunc/pr23169b.rd 2019-06-06 14:25:55.494165610 +0100 +@@ -1,4 +1,4 @@ +-#failif ++#pass + #... + [0-9a-f]+ +[0-9a-f]+ +R_[^ ]+ +[0-9a-f]+ +func(| \+ 0) + #pass +--- binutils.orig/ld/testsuite/ld-powerpc/pr23937.d 2019-06-06 14:30:41.510166625 +0100 ++++ binutils-2.32/ld/testsuite/ld-powerpc/pr23937.d 2019-06-06 14:40:11.152185368 +0100 +@@ -5,6 +5,6 @@ + + #... + .* R_PPC64_IRELATIVE +10000180 +-#... ++#pass + .*: 0+10000180 +20 IFUNC +LOCAL +DEFAULT .* magic + #pass +--- binutils.orig/ld/testsuite/ld-elf/indirect.exp 2019-06-06 14:30:41.576166163 +0100 ++++ binutils-2.32/ld/testsuite/ld-elf/indirect.exp 2019-06-06 16:07:44.330408051 +0100 +@@ -215,6 +215,10 @@ proc check_dynamic_syms { test } { + return 1 + } + ++if { [istarget s390*-*-linux*] } { ++ return ++} ++ + foreach t [list indirect5a indirect5b indirect6a indirect6b] { + set testname [concat $t "dynsym"] + if { [check_dynamic_syms tmpdir/$t] } { +--- binutils.orig/ld/testsuite/ld-ifunc/ifunc.exp 2019-06-06 14:30:41.487166785 +0100 ++++ binutils-2.32/ld/testsuite/ld-ifunc/ifunc.exp 2019-06-06 16:11:13.545947519 +0100 +@@ -300,15 +300,21 @@ if {! [check_osabi tmpdir/static_nonifun + # should not. + + if {[contains_ifunc_symbol tmpdir/libshared_ifunc.so] != 1} { ++ setup_xfail "ppc64*-*-linux-gnu" ++ setup_xfail "powerpc64*-*-linux-gnu" + fail "Shared libraries containing ifunc does not contain an IFUNC symbol" + set fails [expr $fails + 1] + } + if {[contains_ifunc_symbol tmpdir/local_prog] != 1} { ++ setup_xfail "ppc64*-*-linux-gnu" ++ setup_xfail "powerpc64*-*-linux-gnu" + fail "Local ifunc-using executable does not contain an IFUNC symbol" + set fails [expr $fails + 1] + } + if { ![string match "" $STATIC_LDFLAGS] \ + && [contains_ifunc_symbol tmpdir/static_prog] != 1} { ++ setup_xfail "ppc64*-*-linux-gnu" ++ setup_xfail "powerpc64*-*-linux-gnu" + fail "Static ifunc-using executable does not contain an IFUNC symbol" + set fails [expr $fails + 1] + } +@@ -587,6 +593,13 @@ run_cc_link_tests [list \ + {} \ + "libpr18841cn.so" \ + ] \ ++] ++ ++if { [isnative] ++ && !([istarget "powerpc*-*-*"] ++ || [istarget "aarch64*-*-*"] ++ || [istarget "sparc*-*-*"]) } { ++run_cc_link_tests [list \ + [list \ + "Build libpr23169a.so" \ + "-shared" \ +@@ -657,7 +670,8 @@ run_cc_link_tests [list \ + {readelf {-r -W} pr23169b.rd}} \ + "pr23169f" \ + ] \ +-] ++ ] ++} + + run_ld_link_exec_tests [list \ + [list \ +@@ -719,7 +733,7 @@ run_ld_link_exec_tests [list \ + # That does not happen for the pr23169 testcase where the resolver is + # in the executable (which is relocated last by ld.so). + if { [isnative] +- && !([istarget "powerpc-*-*"] ++ && !([istarget "powerpc*-*-*"] + || [istarget "aarch64*-*-*"] + || [istarget "sparc*-*-*"]) } { + run_ld_link_exec_tests [list \ +--- binutils.orig/ld/testsuite/ld-x86-64/x86-64.exp 2019-06-12 11:00:46.555467871 +0100 ++++ binutils-2.32/ld/testsuite/ld-x86-64/x86-64.exp 2019-06-12 11:06:19.179023902 +0100 +@@ -1956,7 +1956,9 @@ run_ld_link_tests [list \ + global LD_CLASS + if { "$LD_CLASS" == "64bit" } then { + # This test needs 64-bit linker. +- run_dump_test "pr17618" ++ # The test times out when runnig under OSCI's test harness, because ++ # it is so overloaded, so skip it for now. The test works normally. ++ # run_dump_test "pr17618" + } + run_dump_test "pltgot-1" + run_dump_test "pltgot-2" diff --git a/SOURCES/binutils-no-builder-comment-in-bfd-stdint.patch b/SOURCES/binutils-no-builder-comment-in-bfd-stdint.patch new file mode 100644 index 0000000..d8d5f4f --- /dev/null +++ b/SOURCES/binutils-no-builder-comment-in-bfd-stdint.patch @@ -0,0 +1,19 @@ +--- binutils.orig/bfd/configure 2019-06-24 14:37:35.984087086 +0100 ++++ binutils-2.32/bfd/configure 2019-06-24 17:32:52.515541752 +0100 +@@ -18865,11 +18865,11 @@ _LT_EOF + esac + done ;; + "bfd_stdint.h":C) +-if test "$GCC" = yes; then +- echo "/* generated for " `$CC --version | sed 1q` "*/" > tmp-stdint.h +-else +- echo "/* generated for $CC */" > tmp-stdint.h +-fi ++ ++ ++ ++ ++ + + sed 's/^ *//' >> tmp-stdint.h <st_other); + + printf (" %-7s", get_symbol_visibility (vis)); ++#if 0 + /* Check to see if any other bits in the st_other field are set. + Note - displaying this information disrupts the layout of the + table being generated, but for the moment this case is very + rare. */ + if (psym->st_other ^ vis) + printf (" [%s] ", get_symbol_other (filedata, psym->st_other ^ vis)); ++#endif + } + + printf (" %3.3s ", get_symbol_index_type (filedata, psym->st_shndx)); +@@ -11031,6 +11033,15 @@ print_dynamic_symbol (bfd_vma si, unsign + print_symbol (25, GET_DYNAMIC_NAME (psym->st_name)); + else + printf (_(" "), psym->st_name); ++#if 1 ++ { ++ unsigned int vis = ELF_ST_VISIBILITY (psym->st_other); ++ ++ /* Check to see if any other bits in the st_other field are set. */ ++ if (psym->st_other ^ vis) ++ printf (" \t[%s]", get_symbol_other (filedata, psym->st_other ^ vis)); ++ } ++#endif + putchar ('\n'); + } + +--- binutils.orig/binutils/readelf.c 2017-12-12 16:36:21.806561149 +0000 ++++ binutils-2.29.1/binutils/readelf.c 2017-12-12 16:38:17.763168514 +0000 +@@ -11548,11 +11548,13 @@ process_symbol_table (FILE * file) + unsigned int vis = ELF_ST_VISIBILITY (psym->st_other); + + printf (" %-7s", get_symbol_visibility (vis)); ++#if 0 + /* Check to see if any other bits in the st_other field are set. + Note - displaying this information disrupts the layout of the + table being generated, but for the moment this case is very rare. */ + if (psym->st_other ^ vis) + printf (" [%s] ", get_symbol_other (filedata, psym->st_other ^ vis)); ++#endif + } + printf (" %4s ", get_symbol_index_type (filedata, psym->st_shndx)); + print_symbol (25, psym->st_name < strtab_size +@@ -11571,7 +11573,15 @@ process_symbol_table (FILE * file) + printf (sym_info == symbol_hidden ? "@%s" : "@@%s", + version_string); + } ++#if 1 ++ { ++ unsigned int vis = ELF_ST_VISIBILITY (psym->st_other); + ++ /* Check to see if any other bits in the st_other field are set. */ ++ if (psym->st_other ^ vis) ++ printf (" \t[%s] ", get_symbol_other (filedata, psym->st_other ^ vis)); ++ } ++#endif + putchar ('\n'); + + if (ELF_ST_BIND (psym->st_info) == STB_LOCAL diff --git a/SOURCES/binutils-remove-DUP-FUNXC-debug-fprintf.patch b/SOURCES/binutils-remove-DUP-FUNXC-debug-fprintf.patch new file mode 100644 index 0000000..e4f0155 --- /dev/null +++ b/SOURCES/binutils-remove-DUP-FUNXC-debug-fprintf.patch @@ -0,0 +1,10 @@ +--- binutils.orig/binutils/objcopy.c 2019-08-05 13:14:52.037496277 +0100 ++++ binutils-2.32/binutils/objcopy.c 2019-08-05 13:14:58.491455624 +0100 +@@ -2225,7 +2225,6 @@ merge_gnu_build_notes (bfd * abfd, asect + && back->note.namesz == pnote->note.namesz + && memcmp (back->note.namedata, pnote->note.namedata, pnote->note.namesz) == 0) + { +- fprintf (stderr, "DUP FUNXC\n"); + duplicate_found = TRUE; + pnote->note.type = 0; + break; diff --git a/SOURCES/binutils-s390x-arch13-descriptions.patch b/SOURCES/binutils-s390x-arch13-descriptions.patch new file mode 100644 index 0000000..de33997 --- /dev/null +++ b/SOURCES/binutils-s390x-arch13-descriptions.patch @@ -0,0 +1,355 @@ +diff -rup binutils.orig/gas/testsuite/gas/s390/zarch-arch13.d binutils-2.30/gas/testsuite/gas/s390/zarch-arch13.d +--- binutils.orig/gas/testsuite/gas/s390/zarch-arch13.d 2019-06-18 13:41:27.796052644 +0100 ++++ binutils-2.30/gas/testsuite/gas/s390/zarch-arch13.d 2019-06-18 13:48:01.504295109 +0100 +@@ -61,27 +61,27 @@ Disassembly of section .text: + .*: b9 e3 bd 69 [ ]*selgrnh %r6,%r9,%r11 + .*: b9 e3 bd 69 [ ]*selgrnh %r6,%r9,%r11 + .*: b9 e3 be 69 [ ]*selgrno %r6,%r9,%r11 +-.*: b9 c0 bd 69 [ ]*selhhhrnh %r6,%r9,%r11 +-.*: b9 c0 b1 69 [ ]*selhhhro %r6,%r9,%r11 +-.*: b9 c0 b2 69 [ ]*selhhhrh %r6,%r9,%r11 +-.*: b9 c0 b2 69 [ ]*selhhhrh %r6,%r9,%r11 +-.*: b9 c0 b3 69 [ ]*selhhhrnle %r6,%r9,%r11 +-.*: b9 c0 b4 69 [ ]*selhhhrl %r6,%r9,%r11 +-.*: b9 c0 b4 69 [ ]*selhhhrl %r6,%r9,%r11 +-.*: b9 c0 b5 69 [ ]*selhhhrnhe %r6,%r9,%r11 +-.*: b9 c0 b6 69 [ ]*selhhhrlh %r6,%r9,%r11 +-.*: b9 c0 b7 69 [ ]*selhhhrne %r6,%r9,%r11 +-.*: b9 c0 b7 69 [ ]*selhhhrne %r6,%r9,%r11 +-.*: b9 c0 b8 69 [ ]*selhhhre %r6,%r9,%r11 +-.*: b9 c0 b8 69 [ ]*selhhhre %r6,%r9,%r11 +-.*: b9 c0 b9 69 [ ]*selhhhrnlh %r6,%r9,%r11 +-.*: b9 c0 ba 69 [ ]*selhhhrhe %r6,%r9,%r11 +-.*: b9 c0 bb 69 [ ]*selhhhrnl %r6,%r9,%r11 +-.*: b9 c0 bb 69 [ ]*selhhhrnl %r6,%r9,%r11 +-.*: b9 c0 bc 69 [ ]*selhhhrle %r6,%r9,%r11 +-.*: b9 c0 bd 69 [ ]*selhhhrnh %r6,%r9,%r11 +-.*: b9 c0 bd 69 [ ]*selhhhrnh %r6,%r9,%r11 +-.*: b9 c0 be 69 [ ]*selhhhrno %r6,%r9,%r11 ++.*: b9 c0 bd 69 [ ]*selfhrnh %r6,%r9,%r11 ++.*: b9 c0 b1 69 [ ]*selfhro %r6,%r9,%r11 ++.*: b9 c0 b2 69 [ ]*selfhrh %r6,%r9,%r11 ++.*: b9 c0 b2 69 [ ]*selfhrh %r6,%r9,%r11 ++.*: b9 c0 b3 69 [ ]*selfhrnle %r6,%r9,%r11 ++.*: b9 c0 b4 69 [ ]*selfhrl %r6,%r9,%r11 ++.*: b9 c0 b4 69 [ ]*selfhrl %r6,%r9,%r11 ++.*: b9 c0 b5 69 [ ]*selfhrnhe %r6,%r9,%r11 ++.*: b9 c0 b6 69 [ ]*selfhrlh %r6,%r9,%r11 ++.*: b9 c0 b7 69 [ ]*selfhrne %r6,%r9,%r11 ++.*: b9 c0 b7 69 [ ]*selfhrne %r6,%r9,%r11 ++.*: b9 c0 b8 69 [ ]*selfhre %r6,%r9,%r11 ++.*: b9 c0 b8 69 [ ]*selfhre %r6,%r9,%r11 ++.*: b9 c0 b9 69 [ ]*selfhrnlh %r6,%r9,%r11 ++.*: b9 c0 ba 69 [ ]*selfhrhe %r6,%r9,%r11 ++.*: b9 c0 bb 69 [ ]*selfhrnl %r6,%r9,%r11 ++.*: b9 c0 bb 69 [ ]*selfhrnl %r6,%r9,%r11 ++.*: b9 c0 bc 69 [ ]*selfhrle %r6,%r9,%r11 ++.*: b9 c0 bd 69 [ ]*selfhrnh %r6,%r9,%r11 ++.*: b9 c0 bd 69 [ ]*selfhrnh %r6,%r9,%r11 ++.*: b9 c0 be 69 [ ]*selfhrno %r6,%r9,%r11 + .*: e6 f6 9f a0 d0 06 [ ]*vlbr %v15,4000\(%r6,%r9\),13 + .*: e6 f6 9f a0 10 06 [ ]*vlbrh %v15,4000\(%r6,%r9\) + .*: e6 f6 9f a0 20 06 [ ]*vlbrf %v15,4000\(%r6,%r9\) +@@ -130,11 +130,8 @@ Disassembly of section .text: + .*: e7 f1 42 00 87 8b [ ]*vstrsf %v15,%v17,%v20,%v24 + .*: e7 f1 42 d0 87 8b [ ]*vstrsf %v15,%v17,%v20,%v24,13 + .*: e7 f1 40 20 87 8b [ ]*vstrszb %v15,%v17,%v20,%v24 +-.*: e7 f1 40 f0 87 8b [ ]*vstrszb %v15,%v17,%v20,%v24,13 + .*: e7 f1 41 20 87 8b [ ]*vstrszh %v15,%v17,%v20,%v24 +-.*: e7 f1 41 f0 87 8b [ ]*vstrszh %v15,%v17,%v20,%v24,13 + .*: e7 f1 42 20 87 8b [ ]*vstrszf %v15,%v17,%v20,%v24 +-.*: e7 f1 42 f0 87 8b [ ]*vstrszf %v15,%v17,%v20,%v24,13 + .*: e7 f1 00 bc d4 c3 [ ]*vcfps %v15,%v17,13,12,11 + .*: e7 f1 00 cd 24 c3 [ ]*wcefb %v15,%v17,5,12 + .*: e7 f1 00 cd 24 c3 [ ]*wcefb %v15,%v17,5,12 +@@ -154,3 +151,4 @@ Disassembly of section .text: + .*: e6 6f 00 d0 00 52 [ ]*vcvbg %r6,%v15,13 + .*: e6 6f 00 dc 00 52 [ ]*vcvbg %r6,%v15,13,12 + .*: b9 3a 00 69 [ ]*kdsa %r6,%r9 ++.*: 07 07 [ ]*nopr %r7 +diff -rup binutils.orig/gas/testsuite/gas/s390/zarch-arch13.s binutils-2.30/gas/testsuite/gas/s390/zarch-arch13.s +--- binutils.orig/gas/testsuite/gas/s390/zarch-arch13.s 2019-06-18 13:41:27.794052658 +0100 ++++ binutils-2.30/gas/testsuite/gas/s390/zarch-arch13.s 2019-06-18 13:48:01.504295109 +0100 +@@ -55,27 +55,27 @@ foo: + selgrnh %r6,%r9,%r11 + selgrnp %r6,%r9,%r11 + selgrno %r6,%r9,%r11 +- selhhhr %r6,%r9,%r11,13 +- selhhhro %r6,%r9,%r11 +- selhhhrh %r6,%r9,%r11 +- selhhhrp %r6,%r9,%r11 +- selhhhrnle %r6,%r9,%r11 +- selhhhrl %r6,%r9,%r11 +- selhhhrm %r6,%r9,%r11 +- selhhhrnhe %r6,%r9,%r11 +- selhhhrlh %r6,%r9,%r11 +- selhhhrne %r6,%r9,%r11 +- selhhhrnz %r6,%r9,%r11 +- selhhhre %r6,%r9,%r11 +- selhhhrz %r6,%r9,%r11 +- selhhhrnlh %r6,%r9,%r11 +- selhhhrhe %r6,%r9,%r11 +- selhhhrnl %r6,%r9,%r11 +- selhhhrnm %r6,%r9,%r11 +- selhhhrle %r6,%r9,%r11 +- selhhhrnh %r6,%r9,%r11 +- selhhhrnp %r6,%r9,%r11 +- selhhhrno %r6,%r9,%r11 ++ selfhr %r6,%r9,%r11,13 ++ selfhro %r6,%r9,%r11 ++ selfhrh %r6,%r9,%r11 ++ selfhrp %r6,%r9,%r11 ++ selfhrnle %r6,%r9,%r11 ++ selfhrl %r6,%r9,%r11 ++ selfhrm %r6,%r9,%r11 ++ selfhrnhe %r6,%r9,%r11 ++ selfhrlh %r6,%r9,%r11 ++ selfhrne %r6,%r9,%r11 ++ selfhrnz %r6,%r9,%r11 ++ selfhre %r6,%r9,%r11 ++ selfhrz %r6,%r9,%r11 ++ selfhrnlh %r6,%r9,%r11 ++ selfhrhe %r6,%r9,%r11 ++ selfhrnl %r6,%r9,%r11 ++ selfhrnm %r6,%r9,%r11 ++ selfhrle %r6,%r9,%r11 ++ selfhrnh %r6,%r9,%r11 ++ selfhrnp %r6,%r9,%r11 ++ selfhrno %r6,%r9,%r11 + vlbr %v15,4000(%r6,%r9),13 + vlbrh %v15,4000(%r6,%r9) + vlbrf %v15,4000(%r6,%r9) +@@ -124,11 +124,8 @@ foo: + vstrsf %v15,%v17,%v20,%v24 + vstrsf %v15,%v17,%v20,%v24,13 + vstrszb %v15,%v17,%v20,%v24 +- vstrszb %v15,%v17,%v20,%v24,13 + vstrszh %v15,%v17,%v20,%v24 +- vstrszh %v15,%v17,%v20,%v24,13 + vstrszf %v15,%v17,%v20,%v24 +- vstrszf %v15,%v17,%v20,%v24,13 + vcfps %v15,%v17,13,12,11 + vcefb %v15,%v17,13,12 + wcefb %v15,%v17,13,12 +diff -rup binutils.orig/opcodes/s390-opc.txt binutils-2.30/opcodes/s390-opc.txt +--- binutils.orig/opcodes/s390-opc.txt 2019-06-18 13:41:27.578054171 +0100 ++++ binutils-2.30/opcodes/s390-opc.txt 2019-06-18 13:48:01.505295102 +0100 +@@ -1889,106 +1889,120 @@ e70000000036 vlm VRS_VVRDU "vector load + e7000000000e vst VRX_VRRDU "vector store" arch12 zarch optparm + e7000000003e vstm VRS_VVRDU "vector store multiple" arch12 zarch optparm + ++ + # arch13 instructions + +-b9f5 ncrk RRF_R0RR2 " " arch13 zarch +-b9e5 ncgrk RRF_R0RR2 " " arch13 zarch +-e50a mvcrl SSE_RDRD " " arch13 zarch +-b974 nnrk RRF_R0RR2 " " arch13 zarch +-b964 nngrk RRF_R0RR2 " " arch13 zarch +-b976 nork RRF_R0RR2 " " arch13 zarch +-b966 nogrk RRF_R0RR2 " " arch13 zarch +-b977 nxrk RRF_R0RR2 " " arch13 zarch +-b967 nxgrk RRF_R0RR2 " " arch13 zarch +-b975 ocrk RRF_R0RR2 " " arch13 zarch +-b965 ocgrk RRF_R0RR2 " " arch13 zarch +-b9e1 popcnt RRF_U0RR " " arch13 zarch optparm +-b9f0 selr RRF_RURR " " arch13 zarch +-b9f00000 selr*20 RRF_R0RR3 " " arch13 zarch +-b9e3 selgr RRF_RURR " " arch13 zarch +-b9e30000 selgr*20 RRF_R0RR3 " " arch13 zarch +-b9c0 selhhhr RRF_RURR " " arch13 zarch +-b9c00000 selhhhr*20 RRF_R0RR3 " " arch13 zarch +- +-e60000000006 vlbr VRX_VRRDU " " arch13 zarch +-e60000001006 vlbrh VRX_VRRD " " arch13 zarch +-e60000002006 vlbrf VRX_VRRD " " arch13 zarch +-e60000003006 vlbrg VRX_VRRD " " arch13 zarch +-e60000004006 vlbrq VRX_VRRD " " arch13 zarch +- +-e60000000007 vler VRX_VRRDU " " arch13 zarch +-e60000001007 vlerh VRX_VRRD " " arch13 zarch +-e60000002007 vlerf VRX_VRRD " " arch13 zarch +-e60000003007 vlerg VRX_VRRD " " arch13 zarch +- +-e60000000004 vllebrz VRX_VRRDU " " arch13 zarch +-e60000001004 vllebrzh VRX_VRRD " " arch13 zarch +-e60000002004 vllebrzf VRX_VRRD " " arch13 zarch +-e60000003004 ldrv VRX_VRRD " " arch13 zarch +-e60000003004 vllebrzg VRX_VRRD " " arch13 zarch +-e60000006004 lerv VRX_VRRD " " arch13 zarch +-e60000006004 vllebrze VRX_VRRD " " arch13 zarch +- +-e60000000001 vlebrh VRX_VRRDU " " arch13 zarch +-e60000000003 vlebrf VRX_VRRDU " " arch13 zarch +-e60000000002 vlebrg VRX_VRRDU " " arch13 zarch +- +-e60000000005 vlbrrep VRX_VRRDU " " arch13 zarch +-e60000001005 vlbrreph VRX_VRRD " " arch13 zarch +-e60000002005 vlbrrepf VRX_VRRD " " arch13 zarch +-e60000003005 vlbrrepg VRX_VRRD " " arch13 zarch +- +-e6000000000e vstbr VRX_VRRDU " " arch13 zarch +-e6000000100e vstbrh VRX_VRRD " " arch13 zarch +-e6000000200e vstbrf VRX_VRRD " " arch13 zarch +-e6000000300e vstbrg VRX_VRRD " " arch13 zarch +-e6000000400e vstbrq VRX_VRRD " " arch13 zarch +- +-e6000000000f vster VRX_VRRDU " " arch13 zarch +-e6000000100f vsterh VRX_VRRD " " arch13 zarch +-e6000000200f vsterf VRX_VRRD " " arch13 zarch +-e6000000300f vsterg VRX_VRRD " " arch13 zarch +- +-e60000000009 vstebrh VRX_VRRDU " " arch13 zarch +-e6000000000b vstebrf VRX_VRRDU " " arch13 zarch +-e6000000000b sterv VRX_VRRD " " arch13 zarch +-e6000000000a vstebrg VRX_VRRDU " " arch13 zarch +-e6000000000a stdrv VRX_VRRD " " arch13 zarch +- +-e70000000086 vsld VRI_VVV0U " " arch13 zarch +-e70000000087 vsrd VRI_VVV0U " " arch13 zarch +- +-e7000000008b vstrs VRR_VVVUU0V " " arch13 zarch optparm +- +-e7000000008b vstrsb VRR_VVVU0VB " " arch13 zarch optparm +-e7000100008b vstrsh VRR_VVVU0VB " " arch13 zarch optparm +-e7000200008b vstrsf VRR_VVVU0VB " " arch13 zarch optparm +- +-e7000020008b vstrszb VRR_VVVU0VB2 " " arch13 zarch optparm +-e7000120008b vstrszh VRR_VVVU0VB2 " " arch13 zarch optparm +-e7000220008b vstrszf VRR_VVVU0VB2 " " arch13 zarch optparm +- +-e700000000c3 vcfps VRR_VV0UUU " " arch13 zarch +-e700000020c3 vcefb VRR_VV0UU " " arch13 zarch +-e700000820c3 wcefb VRR_VV0UU8 " " arch13 zarch +- +-e700000000c1 vcfpl VRR_VV0UUU " " arch13 zarch +-e700000020c1 vcelfb VRR_VV0UU " " arch13 zarch +-e700000820c1 wcelfb VRR_VV0UU8 " " arch13 zarch +- +-e700000000c2 vcsfp VRR_VV0UUU " " arch13 zarch +-e700000020c2 vcfeb VRR_VV0UU " " arch13 zarch +-e700000820c2 wcfeb VRR_VV0UU8 " " arch13 zarch +- +-e700000000c0 vclfp VRR_VV0UUU " " arch13 zarch +-e700000020c0 vclfeb VRR_VV0UU " " arch13 zarch +-e700000820c0 wclfeb VRR_VV0UU8 " " arch13 zarch + +-b939 dfltcc RRF_R0RR2 " " arch13 zarch ++# Miscellaneous Instruction Extensions Facility 2 ++ ++b9f5 ncrk RRF_R0RR2 "and with complement 32 bit" arch13 zarch ++b9e5 ncgrk RRF_R0RR2 "and with complement 64 bit" arch13 zarch ++e50a mvcrl SSE_RDRD "move right to left" arch13 zarch ++b974 nnrk RRF_R0RR2 "nand 32 bit" arch13 zarch ++b964 nngrk RRF_R0RR2 "nand 64 bit" arch13 zarch ++b976 nork RRF_R0RR2 "nor 32 bit" arch13 zarch ++b966 nogrk RRF_R0RR2 "nor 64 bit" arch13 zarch ++b977 nxrk RRF_R0RR2 "not exclusive or 32 bit" arch13 zarch ++b967 nxgrk RRF_R0RR2 "not exclusive or 64 bit" arch13 zarch ++b975 ocrk RRF_R0RR2 "or with complement 32 bit" arch13 zarch ++b965 ocgrk RRF_R0RR2 "or with complement 64 bit" arch13 zarch ++b9e1 popcnt RRF_U0RR "population count arch13" arch13 zarch optparm ++b9f0 selr RRF_RURR "select 32 bit" arch13 zarch ++b9f00000 selr*20 RRF_R0RR3 "select 32 bit" arch13 zarch ++b9e3 selgr RRF_RURR "select 64 bit" arch13 zarch ++b9e30000 selgr*20 RRF_R0RR3 "select 64 bit" arch13 zarch ++b9c0 selfhr RRF_RURR "select high" arch13 zarch ++b9c00000 selfhr*20 RRF_R0RR3 "select high" arch13 zarch ++ ++# Vector Enhancements Facility 2 ++ ++e60000000006 vlbr VRX_VRRDU "vector load byte reversed elements" arch13 zarch ++e60000001006 vlbrh VRX_VRRD "vector load byte reversed halfword elements" arch13 zarch ++e60000002006 vlbrf VRX_VRRD "vector load byte reversed word elements" arch13 zarch ++e60000003006 vlbrg VRX_VRRD "vector load byte reversed doubleword elements" arch13 zarch ++e60000004006 vlbrq VRX_VRRD "vector load byte reversed quadword elements" arch13 zarch ++ ++e60000000007 vler VRX_VRRDU "vector load elements reversed" arch13 zarch ++e60000001007 vlerh VRX_VRRD "vector load halfword elements reversed" arch13 zarch ++e60000002007 vlerf VRX_VRRD "vector load word elements reversed" arch13 zarch ++e60000003007 vlerg VRX_VRRD "vector load doubleword elements reversed" arch13 zarch ++ ++e60000000004 vllebrz VRX_VRRDU "vector load byte reversed element and zero" arch13 zarch ++e60000001004 vllebrzh VRX_VRRD "vector load byte reversed halfword element and zero" arch13 zarch ++e60000002004 vllebrzf VRX_VRRD "vector load byte reversed word element and zero" arch13 zarch ++e60000003004 ldrv VRX_VRRD "load byte reversed doubleword" arch13 zarch ++e60000003004 vllebrzg VRX_VRRD "vector load byte reversed doubleword element and zero" arch13 zarch ++e60000006004 lerv VRX_VRRD "load byte reversed word" arch13 zarch ++e60000006004 vllebrze VRX_VRRD "vector load byte reversed word element left-aligned and zero" arch13 zarch ++ ++e60000000001 vlebrh VRX_VRRDU "vector load byte reversed halfword element" arch13 zarch ++e60000000003 vlebrf VRX_VRRDU "vector load byte reversed word element" arch13 zarch ++e60000000002 vlebrg VRX_VRRDU "vector load byte reversed doubleword element" arch13 zarch ++ ++e60000000005 vlbrrep VRX_VRRDU "vector load byte reversed element and replicate" arch13 zarch ++e60000001005 vlbrreph VRX_VRRD "vector load byte reversed halfword element and replicate" arch13 zarch ++e60000002005 vlbrrepf VRX_VRRD "vector load byte reversed word element and replicate" arch13 zarch ++e60000003005 vlbrrepg VRX_VRRD "vector load byte reversed doubleword element and replicate" arch13 zarch ++ ++e6000000000e vstbr VRX_VRRDU "vector store byte reversed elements" arch13 zarch ++e6000000100e vstbrh VRX_VRRD "vector store byte reversed halfword elements" arch13 zarch ++e6000000200e vstbrf VRX_VRRD "vector store byte reversed word elements" arch13 zarch ++e6000000300e vstbrg VRX_VRRD "vector store byte reversed doubleword elements" arch13 zarch ++e6000000400e vstbrq VRX_VRRD "vector store byte reversed quadword elements" arch13 zarch ++ ++e6000000000f vster VRX_VRRDU "vector store elements reversed" arch13 zarch ++e6000000100f vsterh VRX_VRRD "vector store halfword elements reversed" arch13 zarch ++e6000000200f vsterf VRX_VRRD "vector store word elements reversed" arch13 zarch ++e6000000300f vsterg VRX_VRRD "vector store doubleword elements reversed" arch13 zarch ++ ++e60000000009 vstebrh VRX_VRRDU "vector store byte reversed halfword element" arch13 zarch ++e6000000000b vstebrf VRX_VRRDU "vector store byte reversed word element" arch13 zarch ++e6000000000b sterv VRX_VRRD "store byte reversed word" arch13 zarch ++e6000000000a vstebrg VRX_VRRDU "vector store byte reversed doubleword element" arch13 zarch ++e6000000000a stdrv VRX_VRRD "store byte reversed doubleword" arch13 zarch ++ ++e70000000086 vsld VRI_VVV0U "vector shift left double by bit" arch13 zarch ++e70000000087 vsrd VRI_VVV0U "vector shift right double by bit" arch13 zarch ++ ++e7000000008b vstrs VRR_VVVUU0V "vector string search" arch13 zarch optparm ++ ++e7000000008b vstrsb VRR_VVVU0VB "vector string search byte" arch13 zarch optparm ++e7000100008b vstrsh VRR_VVVU0VB "vector string search halfword" arch13 zarch optparm ++e7000200008b vstrsf VRR_VVVU0VB "vector string search word" arch13 zarch optparm ++ ++e7000020008b vstrszb VRR_VVV0V "vector string search byte zero" arch13 zarch ++e7000120008b vstrszh VRR_VVV0V "vector string search halfword zero" arch13 zarch ++e7000220008b vstrszf VRR_VVV0V "vector string search word zero" arch13 zarch ++ ++e700000000c3 vcfps VRR_VV0UUU "vector fp convert from fixed" arch13 zarch ++e700000020c3 vcefb VRR_VV0UU "vector fp convert from fixed 32 bit" arch13 zarch ++e700000820c3 wcefb VRR_VV0UU8 "vector fp convert from fixed 32 bit" arch13 zarch ++ ++e700000000c1 vcfpl VRR_VV0UUU "vector fp convert from logical" arch13 zarch ++e700000020c1 vcelfb VRR_VV0UU "vector fp convert from logical 32 bit" arch13 zarch ++e700000820c1 wcelfb VRR_VV0UU8 "vector fp convert from logical 32 bit" arch13 zarch ++ ++e700000000c2 vcsfp VRR_VV0UUU "vector fp convert to fixed" arch13 zarch ++e700000020c2 vcfeb VRR_VV0UU "vector fp convert to fixed 32 bit" arch13 zarch ++e700000820c2 wcfeb VRR_VV0UU8 "vector fp convert to fixed 32 bit" arch13 zarch ++ ++e700000000c0 vclfp VRR_VV0UUU "vector fp convert to logical" arch13 zarch ++e700000020c0 vclfeb VRR_VV0UU "vector fp convert to logical 32 bit" arch13 zarch ++e700000820c0 wclfeb VRR_VV0UU8 "vector fp convert to logical 32 bit" arch13 zarch ++ ++# Deflate conversion facility ++ ++b939 dfltcc RRF_R0RR2 "deflate conversion call" arch13 zarch ++ ++# Enhanced-Sort Facility ++ ++b938 sortl RRE_RR "sort lists" arch13 zarch ++ ++# Vector packed decimal enhancement facility + +-b938 sortl RRE_RR " " arch13 zarch ++e60000000050 vcvb VRR_RV0UU "vector convert to binary 32 bit" arch13 zarch optparm ++e60000000052 vcvbg VRR_RV0UU "vector convert to binary 64 bit" arch13 zarch optparm + +-e60000000050 vcvb VRR_RV0UU " " arch13 zarch optparm +-e60000000052 vcvbg VRR_RV0UU " " arch13 zarch optparm ++# Message Security Assist Extension 9 + +-b93a kdsa RRE_RR " " arch13 zarch ++b93a kdsa RRE_RR "compute digital signature authentication" arch13 zarch +Only in binutils-2.30/opcodes: s390-opc.txt.orig diff --git a/SOURCES/binutils-special-sections-in-groups.patch b/SOURCES/binutils-special-sections-in-groups.patch new file mode 100644 index 0000000..7de5a93 --- /dev/null +++ b/SOURCES/binutils-special-sections-in-groups.patch @@ -0,0 +1,27 @@ +--- binutils.orig/bfd/elf.c 2018-10-19 11:42:10.107277490 +0100 ++++ binutils-2.31.1/bfd/elf.c 2018-10-19 11:44:33.607105801 +0100 +@@ -830,7 +830,13 @@ setup_group (bfd *abfd, Elf_Internal_Shd + } + } + +- if (elf_group_name (newsect) == NULL) ++ if (elf_group_name (newsect) == NULL ++ /* OS specific sections might be in a group (eg ARM's ARM_EXIDX section) ++ but they will not have been added to the group because they do not ++ have contents that the ELF code in the BFD library knows how to ++ process. This is OK though - we rely upon the target backends to ++ handle these sections for us. */ ++ && hdr->sh_type < SHT_LOOS) + { + /* xgettext:c-format */ + _bfd_error_handler (_("%pB: no group info for section '%pA'"), +@@ -936,7 +942,8 @@ _bfd_elf_setup_sections (bfd *abfd) + else if (idx->shdr->bfd_section) + elf_sec_group (idx->shdr->bfd_section) = shdr->bfd_section; + else if (idx->shdr->sh_type != SHT_RELA +- && idx->shdr->sh_type != SHT_REL) ++ && idx->shdr->sh_type != SHT_REL ++ && idx->shdr->sh_type < SHT_LOOS) + { + /* There are some unknown sections in the group. */ + _bfd_error_handler diff --git a/SOURCES/binutils-x86-JCC-Errata.patch b/SOURCES/binutils-x86-JCC-Errata.patch new file mode 100644 index 0000000..ef6e118 --- /dev/null +++ b/SOURCES/binutils-x86-JCC-Errata.patch @@ -0,0 +1,3747 @@ +diff -rupN binutils-2.32/gas/config/tc-i386.c binutils.new/gas/config/tc-i386.c +--- binutils-2.32/gas/config/tc-i386.c 2019-01-19 16:01:33.000000000 +0000 ++++ binutils.new/gas/config/tc-i386.c 2019-11-25 14:01:00.626325922 +0000 +@@ -351,6 +351,9 @@ struct _i386_insn + /* Has ZMM register operands. */ + bfd_boolean has_regzmm; + ++ /* Has GOTPC relocation. */ ++ bfd_boolean has_gotpc_reloc; ++ + /* RM and SIB are the modrm byte and the sib byte where the + addressing modes of this insn are encoded. */ + modrm_byte rm; +@@ -545,6 +548,8 @@ static enum flag_code flag_code; + static unsigned int object_64bit; + static unsigned int disallow_64bit_reloc; + static int use_rela_relocations = 0; ++/* __tls_get_addr/___tls_get_addr symbol for TLS. */ ++static const char *tls_get_addr; + + #if ((defined (OBJ_MAYBE_COFF) && defined (OBJ_MAYBE_AOUT)) \ + || defined (OBJ_ELF) || defined (OBJ_MAYBE_ELF) \ +@@ -605,6 +610,21 @@ static int omit_lock_prefix = 0; + "lock addl $0, (%{re}sp)". */ + static int avoid_fence = 0; + ++/* Type of the previous instruction. */ ++static struct ++ { ++ segT seg; ++ const char *file; ++ const char *name; ++ unsigned int line; ++ enum last_insn_kind ++ { ++ last_insn_other = 0, ++ last_insn_directive, ++ last_insn_prefix ++ } kind; ++ } last_insn; ++ + /* 1 if the assembler should generate relax relocations. */ + + static int generate_relax_relocations +@@ -618,6 +638,31 @@ static enum check_kind + } + sse_check, operand_check = check_warning; + ++/* Non-zero if branches should be aligned within power of 2 boundary. */ ++static int align_branch_power = 0; ++ ++/* Types of branches to align. */ ++enum align_branch_kind ++ { ++ align_branch_none = 0, ++ align_branch_jcc = 1 << 0, ++ align_branch_fused = 1 << 1, ++ align_branch_jmp = 1 << 2, ++ align_branch_call = 1 << 3, ++ align_branch_indirect = 1 << 4, ++ align_branch_ret = 1 << 5 ++ }; ++ ++static unsigned int align_branch = (align_branch_jcc ++ | align_branch_fused ++ | align_branch_jmp); ++ ++/* The maximum padding size for fused jcc. */ ++#define MAX_FUSED_JCC_PADDING_SIZE 20 ++ ++/* The maximum number of prefixes added for an instruction. */ ++static unsigned int align_branch_prefix_size = 5; ++ + /* Optimization: + 1. Clear the REX_W bit with register operand if possible. + 2. Above plus use 128bit vector instruction to clear the full vector +@@ -721,12 +766,19 @@ int x86_cie_data_alignment; + /* Interface to relax_segment. + There are 3 major relax states for 386 jump insns because the + different types of jumps add different sizes to frags when we're +- figuring out what sort of jump to choose to reach a given label. */ ++ figuring out what sort of jump to choose to reach a given label. ++ ++ BRANCH_PADDING, BRANCH_PREFIX and FUSED_JCC_PADDING are used to align ++ branches which are handled by md_estimate_size_before_relax() and ++ i386_generic_table_relax_frag(). */ + + /* Types. */ + #define UNCOND_JUMP 0 + #define COND_JUMP 1 + #define COND_JUMP86 2 ++#define BRANCH_PADDING 3 ++#define BRANCH_PREFIX 4 ++#define FUSED_JCC_PADDING 5 + + /* Sizes. */ + #define CODE16 1 +@@ -1345,6 +1397,12 @@ i386_generate_nops (fragS *fragP, char * + case rs_fill_nop: + case rs_align_code: + break; ++ case rs_machine_dependent: ++ /* Allow NOP padding for jumps and calls. */ ++ if (TYPE_FROM_RELAX_STATE (fragP->fr_subtype) == BRANCH_PADDING ++ || TYPE_FROM_RELAX_STATE (fragP->fr_subtype) == FUSED_JCC_PADDING) ++ break; ++ /* Fall through. */ + default: + return; + } +@@ -1489,7 +1547,7 @@ i386_generate_nops (fragS *fragP, char * + return; + } + } +- else ++ else if (fragP->fr_type != rs_machine_dependent) + fragP->fr_var = count; + + if ((count / max_single_nop_size) > max_number_of_nops) +@@ -2957,6 +3015,11 @@ md_begin (void) + x86_dwarf2_return_column = 8; + x86_cie_data_alignment = -4; + } ++ ++ /* NB: FUSED_JCC_PADDING frag must have sufficient room so that it ++ can be turned into BRANCH_PREFIX frag. */ ++ if (align_branch_prefix_size > MAX_FUSED_JCC_PADDING_SIZE) ++ abort (); + } + + void +@@ -4386,6 +4449,17 @@ md_assemble (char *line) + + /* We are ready to output the insn. */ + output_insn (); ++ ++ last_insn.seg = now_seg; ++ ++ if (i.tm.opcode_modifier.isprefix) ++ { ++ last_insn.kind = last_insn_prefix; ++ last_insn.name = i.tm.name; ++ last_insn.file = as_where (&last_insn.line); ++ } ++ else ++ last_insn.kind = last_insn_other; + } + + static char * +@@ -8001,11 +8075,202 @@ x86_cleanup (void) + } + #endif + ++/* Return 1 for test, and, cmp, add, sub, inc and dec which may ++ be macro-fused with conditional jumps. */ ++ ++static int ++maybe_fused_with_jcc_p (void) ++{ ++ /* No RIP address. */ ++ if (i.base_reg && i.base_reg->reg_num == RegIP) ++ return 0; ++ ++ /* and, add, sub with destination register. */ ++ if (!strcmp (i.tm.name, "and") ++ || !strcmp (i.tm.name, "add") ++ || !strcmp (i.tm.name, "sub")) ++ return i.types[1].bitfield.reg; ++ ++ /* test, cmp with any register. */ ++ if (!strcmp (i.tm.name, "test") || !strcmp (i.tm.name, "cmp")) ++ return (i.types[0].bitfield.reg ++ || i.types[1].bitfield.reg); ++ ++ /* inc, dec with 16/32/64-bit register. */ ++ if (!strcmp (i.tm.name, "inc") || !strcmp (i.tm.name, "dec")) ++ return i.types[0].bitfield.reg; ++ ++ return 0; ++} ++ ++/* Return 1 if a FUSED_JCC_PADDING frag should be generated. */ ++ ++static int ++add_fused_jcc_padding_frag_p (void) ++{ ++ if (!align_branch_power ++ || now_seg == absolute_section ++ || !cpu_arch_flags.bitfield.cpui386 ++ || !(align_branch & align_branch_fused)) ++ return 0; ++ ++ if (maybe_fused_with_jcc_p ()) ++ { ++ if (last_insn.kind != last_insn_other ++ && last_insn.seg == now_seg) ++ { ++ if (flag_debug) ++ as_warn_where (last_insn.file, last_insn.line, ++ _("`%s` skips -malign-branch-boundary on `%s`"), ++ last_insn.name, i.tm.name); ++ return 0; ++ } ++ return 1; ++ } ++ ++ return 0; ++} ++ ++/* Return 1 if a BRANCH_PREFIX frag should be generated. */ ++ ++static int ++add_branch_prefix_frag_p (void) ++{ ++ if (!align_branch_power ++ || now_seg == absolute_section ++ || i.tm.cpu_flags.bitfield.cpupadlock ++ || !cpu_arch_flags.bitfield.cpui386) ++ return 0; ++ ++ /* Don't add prefix if it is a prefix or there is no operand. */ ++ if (!i.operands || i.tm.opcode_modifier.isprefix) ++ return 0; ++ ++ if (last_insn.kind != last_insn_other ++ && last_insn.seg == now_seg) ++ { ++ if (flag_debug) ++ as_warn_where (last_insn.file, last_insn.line, ++ _("`%s` skips -malign-branch-boundary on `%s`"), ++ last_insn.name, i.tm.name); ++ return 0; ++ } ++ ++ return 1; ++} ++ ++/* Return 1 if a BRANCH_PADDING frag should be generated. */ ++ ++static int ++add_branch_padding_frag_p (enum align_branch_kind *branch_p) ++{ ++ int add_padding; ++ ++ if (!align_branch_power ++ || now_seg == absolute_section ++ || !cpu_arch_flags.bitfield.cpui386) ++ return 0; ++ ++ add_padding = 0; ++ ++ /* Check for jcc and direct jmp. */ ++ if (i.tm.opcode_modifier.jump) ++ { ++ if (i.tm.base_opcode == JUMP_PC_RELATIVE) ++ { ++ *branch_p = align_branch_jmp; ++ add_padding = align_branch & align_branch_jmp; ++ } ++ else ++ { ++ *branch_p = align_branch_jcc; ++ if ((align_branch & align_branch_jcc)) ++ add_padding = 1; ++ } ++ } ++ else if (i.tm.base_opcode == 0xc2 ++ || i.tm.base_opcode == 0xc3 ++ || i.tm.base_opcode == 0xca ++ || i.tm.base_opcode == 0xcb) ++ { ++ *branch_p = align_branch_ret; ++ if ((align_branch & align_branch_ret)) ++ add_padding = 1; ++ } ++ else ++ { ++ if (i.tm.base_opcode == 0xe8) ++ { ++ *branch_p = align_branch_call; ++ if ((align_branch & align_branch_call)) ++ add_padding = 1; ++ } ++ else if (i.tm.base_opcode == 0xff ++ && (i.rm.reg == 2 || i.rm.reg == 4)) ++ { ++ *branch_p = align_branch_indirect; ++ if ((align_branch & align_branch_indirect)) ++ add_padding = 1; ++ } ++ ++ /* Check for indirect jmp, direct and indirect calls. */ ++ if (add_padding ++ && i.disp_operands ++ && tls_get_addr ++ && (i.op[0].disps->X_op == O_symbol ++ || (i.op[0].disps->X_op == O_subtract ++ && i.op[0].disps->X_op_symbol == GOT_symbol))) ++ { ++ symbolS *s = i.op[0].disps->X_add_symbol; ++ /* No padding to call to global or undefined tls_get_addr. */ ++ if ((S_IS_EXTERNAL (s) || !S_IS_DEFINED (s)) ++ && strcmp (S_GET_NAME (s), tls_get_addr) == 0) ++ return 0; ++ } ++ } ++ ++ if (add_padding ++ && last_insn.kind != last_insn_other ++ && last_insn.seg == now_seg) ++ { ++ if (flag_debug) ++ as_warn_where (last_insn.file, last_insn.line, ++ _("`%s` skips -malign-branch-boundary on `%s`"), ++ last_insn.name, i.tm.name); ++ return 0; ++ } ++ ++ return add_padding; ++} ++ ++static unsigned int ++encoding_length (const fragS *start_frag, offsetT start_off, ++ const char *frag_now_ptr) ++{ ++ unsigned int len = 0; ++ ++ if (start_frag != frag_now) ++ { ++ const fragS *fr = start_frag; ++ ++ do ++ { ++ len += fr->fr_fix; ++ fr = fr->fr_next; ++ } ++ while (fr && fr != frag_now); ++ } ++ ++ return len - start_off + (frag_now_ptr - frag_now->fr_literal); ++} ++ + static void + output_insn (void) + { + fragS *insn_start_frag; + offsetT insn_start_off; ++ fragS *fragP = NULL; ++ enum align_branch_kind branch = align_branch_none; + + #if defined (OBJ_ELF) || defined (OBJ_MAYBE_ELF) + if (IS_ELF && x86_used_note) +@@ -8100,6 +8365,30 @@ output_insn (void) + insn_start_frag = frag_now; + insn_start_off = frag_now_fix (); + ++ if (add_branch_padding_frag_p (&branch)) ++ { ++ char *p; ++ unsigned int max_branch_padding_size = 14; ++ ++ /* Align section to boundary. */ ++ record_alignment (now_seg, align_branch_power); ++ ++ /* Make room for padding. */ ++ frag_grow (max_branch_padding_size); ++ ++ /* Start of the padding. */ ++ p = frag_more (0); ++ ++ fragP = frag_now; ++ ++ frag_var (rs_machine_dependent, max_branch_padding_size, 0, ++ ENCODE_RELAX_STATE (BRANCH_PADDING, 0), ++ NULL, 0, p); ++ ++ fragP->tc_frag_data.branch_type = branch; ++ fragP->tc_frag_data.max_bytes = max_branch_padding_size; ++ } ++ + /* Output jumps. */ + if (i.tm.opcode_modifier.jump) + output_branch (); +@@ -8141,6 +8430,44 @@ output_insn (void) + i.prefix[LOCK_PREFIX] = 0; + } + ++ if (branch) ++ /* Skip if this is a branch. */ ++ ; ++ else if (add_fused_jcc_padding_frag_p ()) ++ { ++ unsigned int max_fused_padding_size ++ = MAX_FUSED_JCC_PADDING_SIZE; ++ ++ /* Make room for padding. */ ++ frag_grow (max_fused_padding_size); ++ p = frag_more (0); ++ ++ fragP = frag_now; ++ ++ frag_var (rs_machine_dependent, max_fused_padding_size, 0, ++ ENCODE_RELAX_STATE (FUSED_JCC_PADDING, 0), ++ NULL, 0, p); ++ ++ fragP->tc_frag_data.branch_type = align_branch_fused; ++ fragP->tc_frag_data.max_bytes = max_fused_padding_size; ++ } ++ else if (add_branch_prefix_frag_p ()) ++ { ++ unsigned int max_prefix_size = align_branch_prefix_size; ++ ++ /* Make room for padding. */ ++ frag_grow (max_prefix_size); ++ p = frag_more (0); ++ ++ fragP = frag_now; ++ ++ frag_var (rs_machine_dependent, max_prefix_size, 0, ++ ENCODE_RELAX_STATE (BRANCH_PREFIX, 0), ++ NULL, 0, p); ++ ++ fragP->tc_frag_data.max_bytes = max_prefix_size; ++ } ++ + /* Since the VEX/EVEX prefix contains the implicit prefix, we + don't need the explicit prefix. */ + if (!i.tm.opcode_modifier.vex && !i.tm.opcode_modifier.evex) +@@ -8276,6 +8603,88 @@ output_insn (void) + + if (i.imm_operands) + output_imm (insn_start_frag, insn_start_off); ++ ++ /* ++ * frag_now_fix () returning plain abs_section_offset when we're in the ++ * absolute section, and abs_section_offset not getting updated as data ++ * gets added to the frag breaks the logic below. ++ */ ++ if (now_seg != absolute_section) ++ { ++ j = encoding_length (insn_start_frag, insn_start_off, frag_more (0)); ++ if (fragP) ++ { ++ /* NB: Don't add prefix with GOTPC relocation since ++ output_disp() above depends on the fixed encoding ++ length. */ ++ unsigned int max = i.has_gotpc_reloc ? 0 : 15 - j; ++ /* Prefix count on the current instruction. */ ++ unsigned int count = !!is_any_vex_encoding (&i.tm); ++ unsigned int k; ++ for (k = 0; k < ARRAY_SIZE (i.prefix); k++) ++ if (i.prefix[k]) ++ count++; ++ ++ /* NB: prefix count + instruction size must be <= 15. */ ++ if (j > 15) ++ as_fatal (_("instruction length of %u bytes exceeds the limit of 15"), ++ j); ++ ++ if (TYPE_FROM_RELAX_STATE (fragP->fr_subtype) ++ == BRANCH_PREFIX) ++ { ++ /* Set the maximum prefix size in BRANCH_PREFIX ++ frag. */ ++ if (fragP->tc_frag_data.max_bytes > max) ++ fragP->tc_frag_data.max_bytes = max; ++ if (fragP->tc_frag_data.max_bytes > count) ++ fragP->tc_frag_data.max_bytes -= count; ++ else ++ fragP->tc_frag_data.max_bytes = 0; ++ } ++ else ++ { ++ /* Remember the maximum prefix size in FUSED_JCC_PADDING ++ frag. */ ++ unsigned int max_prefix_size; ++ if (align_branch_prefix_size > max) ++ max_prefix_size = max; ++ else ++ max_prefix_size = align_branch_prefix_size; ++ if (max_prefix_size > count) ++ fragP->tc_frag_data.max_prefix_length ++ = max_prefix_size - count; ++ } ++ ++ /* Use existing segment prefix if possible. Use CS ++ segment prefix in 64-bit mode. In 32-bit mode, use SS ++ segment prefix with ESP/EBP base register and use DS ++ segment prefix without ESP/EBP base register. */ ++ if (i.prefix[SEG_PREFIX]) ++ fragP->tc_frag_data.default_prefix = i.prefix[SEG_PREFIX]; ++ else if (flag_code == CODE_64BIT) ++ fragP->tc_frag_data.default_prefix = CS_PREFIX_OPCODE; ++ else if (i.base_reg ++ && (i.base_reg->reg_num == 4 ++ || i.base_reg->reg_num == 5)) ++ fragP->tc_frag_data.default_prefix = SS_PREFIX_OPCODE; ++ else ++ fragP->tc_frag_data.default_prefix = DS_PREFIX_OPCODE; ++ } ++ else if (j > 15) ++ as_warn (_("instruction length of %u bytes exceeds the limit of 15"), ++ j); ++ } ++ } ++ ++ if (align_branch_power ++ && now_seg != absolute_section ++ && cpu_arch_flags.bitfield.cpui386) ++ { ++ /* Terminate each frag so that we can add prefix and check for ++ fused jcc. */ ++ frag_wane (frag_now); ++ frag_new (0); + } + + #ifdef DEBUG386 +@@ -8402,6 +8811,7 @@ output_disp (fragS *insn_start_frag, off + if (!object_64bit) + { + reloc_type = BFD_RELOC_386_GOTPC; ++ i.has_gotpc_reloc = TRUE; + i.op[n].imms->X_add_number += add; + } + else if (reloc_type == BFD_RELOC_64) +@@ -8568,6 +8978,7 @@ output_imm (fragS *insn_start_frag, offs + reloc_type = BFD_RELOC_X86_64_GOTPC32; + else if (size == 8) + reloc_type = BFD_RELOC_X86_64_GOTPC64; ++ i.has_gotpc_reloc = TRUE; + i.op[n].imms->X_add_number += add; + } + fix_new_exp (frag_now, p - frag_now->fr_literal, size, +@@ -10193,6 +10604,355 @@ elf_symbol_resolved_in_segment_p (symbol + } + #endif + ++/* Return the next non-empty frag. */ ++ ++static fragS * ++i386_next_non_empty_frag (fragS *fragP) ++{ ++ /* There may be a frag with a ".fill 0" when there is no room in ++ the current frag for frag_grow in output_insn. */ ++ for (fragP = fragP->fr_next; ++ (fragP != NULL ++ && fragP->fr_type == rs_fill ++ && fragP->fr_fix == 0); ++ fragP = fragP->fr_next) ++ ; ++ return fragP; ++} ++ ++/* Return the next jcc frag after BRANCH_PADDING. */ ++ ++static fragS * ++i386_next_jcc_frag (fragS *fragP) ++{ ++ if (!fragP) ++ return NULL; ++ ++ if (fragP->fr_type == rs_machine_dependent ++ && (TYPE_FROM_RELAX_STATE (fragP->fr_subtype) ++ == BRANCH_PADDING)) ++ { ++ fragP = i386_next_non_empty_frag (fragP); ++ if (fragP->fr_type != rs_machine_dependent) ++ return NULL; ++ if (TYPE_FROM_RELAX_STATE (fragP->fr_subtype) == COND_JUMP) ++ return fragP; ++ } ++ ++ return NULL; ++} ++ ++/* Classify BRANCH_PADDING, BRANCH_PREFIX and FUSED_JCC_PADDING frags. */ ++ ++static void ++i386_classify_machine_dependent_frag (fragS *fragP) ++{ ++ fragS *cmp_fragP; ++ fragS *pad_fragP; ++ fragS *branch_fragP; ++ fragS *next_fragP; ++ unsigned int max_prefix_length; ++ ++ if (fragP->tc_frag_data.classified) ++ return; ++ ++ /* First scan for BRANCH_PADDING and FUSED_JCC_PADDING. Convert ++ FUSED_JCC_PADDING and merge BRANCH_PADDING. */ ++ for (next_fragP = fragP; ++ next_fragP != NULL; ++ next_fragP = next_fragP->fr_next) ++ { ++ next_fragP->tc_frag_data.classified = 1; ++ if (next_fragP->fr_type == rs_machine_dependent) ++ switch (TYPE_FROM_RELAX_STATE (next_fragP->fr_subtype)) ++ { ++ case BRANCH_PADDING: ++ /* The BRANCH_PADDING frag must be followed by a branch ++ frag. */ ++ branch_fragP = i386_next_non_empty_frag (next_fragP); ++ next_fragP->tc_frag_data.u.branch_fragP = branch_fragP; ++ break; ++ case FUSED_JCC_PADDING: ++ /* Check if this is a fused jcc: ++ FUSED_JCC_PADDING ++ CMP ++ BRANCH_PADDING ++ COND_JUMP ++ */ ++ cmp_fragP = i386_next_non_empty_frag (next_fragP); ++ pad_fragP = i386_next_non_empty_frag (cmp_fragP); ++ branch_fragP = i386_next_jcc_frag (pad_fragP); ++ if (branch_fragP) ++ { ++ /* The BRANCH_PADDING frag is merged with the ++ FUSED_JCC_PADDING frag. */ ++ next_fragP->tc_frag_data.u.branch_fragP = branch_fragP; ++ /* CMP instruction size. */ ++ next_fragP->tc_frag_data.cmp_size = cmp_fragP->fr_fix; ++ frag_wane (pad_fragP); ++ /* Skip to branch_fragP. */ ++ next_fragP = branch_fragP; ++ } ++ else if (next_fragP->tc_frag_data.max_prefix_length) ++ { ++ /* Turn FUSED_JCC_PADDING into BRANCH_PREFIX if it isn't ++ a fused jcc. */ ++ next_fragP->fr_subtype ++ = ENCODE_RELAX_STATE (BRANCH_PREFIX, 0); ++ next_fragP->tc_frag_data.max_bytes ++ = next_fragP->tc_frag_data.max_prefix_length; ++ /* This will be updated in the BRANCH_PREFIX scan. */ ++ next_fragP->tc_frag_data.max_prefix_length = 0; ++ } ++ else ++ frag_wane (next_fragP); ++ break; ++ } ++ } ++ ++ /* Scan for BRANCH_PREFIX. */ ++ for (; fragP != NULL; fragP = fragP->fr_next) ++ if (fragP->fr_type == rs_machine_dependent ++ && (TYPE_FROM_RELAX_STATE (fragP->fr_subtype) ++ == BRANCH_PREFIX)) ++ { ++ /* Count all BRANCH_PREFIX frags before BRANCH_PADDING and ++ COND_JUMP_PREFIX. */ ++ max_prefix_length = 0; ++ for (next_fragP = fragP; ++ next_fragP != NULL; ++ next_fragP = next_fragP->fr_next) ++ { ++ if (next_fragP->fr_type == rs_fill) ++ /* Skip rs_fill frags. */ ++ ; ++ else if (next_fragP->fr_type == rs_machine_dependent) ++ { ++ if (TYPE_FROM_RELAX_STATE (next_fragP->fr_subtype) ++ == BRANCH_PREFIX) ++ { ++ /* Count BRANCH_PREFIX frags. */ ++ if (max_prefix_length >= MAX_FUSED_JCC_PADDING_SIZE) ++ { ++ max_prefix_length = MAX_FUSED_JCC_PADDING_SIZE; ++ frag_wane (next_fragP); ++ } ++ else ++ max_prefix_length ++ += next_fragP->tc_frag_data.max_bytes; ++ } ++ else if ((TYPE_FROM_RELAX_STATE (next_fragP->fr_subtype) ++ == BRANCH_PADDING) ++ || (TYPE_FROM_RELAX_STATE (next_fragP->fr_subtype) ++ == FUSED_JCC_PADDING)) ++ { ++ /* Stop at BRANCH_PADDING and FUSED_JCC_PADDING. */ ++ fragP->tc_frag_data.u.padding_fragP = next_fragP; ++ break; ++ } ++ else ++ /* Stop for other rs_machine_dependent frags. */ ++ break; ++ } ++ else ++ /* Stop for all other frags. */ ++ break; ++ } ++ ++ fragP->tc_frag_data.max_prefix_length = max_prefix_length; ++ ++ /* Skip to the next frag. */ ++ fragP = next_fragP; ++ } ++} ++ ++/* Compute padding size for ++ ++ FUSED_JCC_PADDING ++ CMP ++ BRANCH_PADDING ++ COND_JUMP/UNCOND_JUMP ++ ++ or ++ ++ BRANCH_PADDING ++ COND_JUMP/UNCOND_JUMP ++ */ ++ ++static int ++i386_branch_padding_size (fragS *fragP, offsetT address) ++{ ++ unsigned int offset, size, padding_size; ++ fragS *branch_fragP = fragP->tc_frag_data.u.branch_fragP; ++ ++ /* The start address of the BRANCH_PADDING or FUSED_JCC_PADDING frag. */ ++ if (!address) ++ address = fragP->fr_address; ++ address += fragP->fr_fix; ++ ++ /* CMP instrunction size. */ ++ size = fragP->tc_frag_data.cmp_size; ++ ++ /* The base size of the branch frag. */ ++ size += branch_fragP->fr_fix; ++ ++ /* Add opcode and displacement bytes for the rs_machine_dependent ++ branch frag. */ ++ if (branch_fragP->fr_type == rs_machine_dependent) ++ size += md_relax_table[branch_fragP->fr_subtype].rlx_length; ++ ++ /* Check if branch is within boundary and doesn't end at the last ++ byte. */ ++ offset = address & ((1U << align_branch_power) - 1); ++ if ((offset + size) >= (1U << align_branch_power)) ++ /* Padding needed to avoid crossing boundary. */ ++ padding_size = (1 << align_branch_power) - offset; ++ else ++ /* No padding needed. */ ++ padding_size = 0; ++ ++ if (!fits_in_signed_byte (padding_size)) ++ abort (); ++ ++ return padding_size; ++} ++ ++/* i386_generic_table_relax_frag() ++ ++ Handle BRANCH_PADDING, BRANCH_PREFIX and FUSED_JCC_PADDING frags to ++ grow/shrink padding to align branch frags. Hand others to ++ relax_frag(). */ ++ ++long ++i386_generic_table_relax_frag (segT segment, fragS *fragP, long stretch) ++{ ++ if (TYPE_FROM_RELAX_STATE (fragP->fr_subtype) == BRANCH_PADDING ++ || TYPE_FROM_RELAX_STATE (fragP->fr_subtype) == FUSED_JCC_PADDING) ++ { ++ long padding_size = i386_branch_padding_size (fragP, 0); ++ long grow = padding_size - fragP->tc_frag_data.length; ++ ++ /* When the BRANCH_PREFIX frag is used, the computed address ++ must match the actual address and there should be no padding. */ ++ if (fragP->tc_frag_data.padding_address ++ && (fragP->tc_frag_data.padding_address != fragP->fr_address ++ || padding_size)) ++ abort (); ++ ++ /* Update the padding size. */ ++ if (grow) ++ fragP->tc_frag_data.length = padding_size; ++ ++ return grow; ++ } ++ else if (TYPE_FROM_RELAX_STATE (fragP->fr_subtype) == BRANCH_PREFIX) ++ { ++ fragS *padding_fragP, *next_fragP; ++ long padding_size, left_size, last_size; ++ ++ padding_fragP = fragP->tc_frag_data.u.padding_fragP; ++ if (!padding_fragP) ++ /* Use the padding set by the leading BRANCH_PREFIX frag. */ ++ return (fragP->tc_frag_data.length ++ - fragP->tc_frag_data.last_length); ++ ++ /* Compute the relative address of the padding frag in the very ++ first time where the BRANCH_PREFIX frag sizes are zero. */ ++ if (!fragP->tc_frag_data.padding_address) ++ fragP->tc_frag_data.padding_address ++ = padding_fragP->fr_address - (fragP->fr_address - stretch); ++ ++ /* First update the last length from the previous interation. */ ++ left_size = fragP->tc_frag_data.prefix_length; ++ for (next_fragP = fragP; ++ next_fragP != padding_fragP; ++ next_fragP = next_fragP->fr_next) ++ if (next_fragP->fr_type == rs_machine_dependent ++ && (TYPE_FROM_RELAX_STATE (next_fragP->fr_subtype) ++ == BRANCH_PREFIX)) ++ { ++ if (left_size) ++ { ++ int max = next_fragP->tc_frag_data.max_bytes; ++ if (max) ++ { ++ int size; ++ if (max > left_size) ++ size = left_size; ++ else ++ size = max; ++ left_size -= size; ++ next_fragP->tc_frag_data.last_length = size; ++ } ++ } ++ else ++ next_fragP->tc_frag_data.last_length = 0; ++ } ++ ++ /* Check the padding size for the padding frag. */ ++ padding_size = i386_branch_padding_size ++ (padding_fragP, (fragP->fr_address ++ + fragP->tc_frag_data.padding_address)); ++ ++ last_size = fragP->tc_frag_data.prefix_length; ++ /* Check if there is change from the last interation. */ ++ if (padding_size == last_size) ++ { ++ /* Update the expected address of the padding frag. */ ++ padding_fragP->tc_frag_data.padding_address ++ = (fragP->fr_address + padding_size ++ + fragP->tc_frag_data.padding_address); ++ return 0; ++ } ++ ++ if (padding_size > fragP->tc_frag_data.max_prefix_length) ++ { ++ /* No padding if there is no sufficient room. Clear the ++ expected address of the padding frag. */ ++ padding_fragP->tc_frag_data.padding_address = 0; ++ padding_size = 0; ++ } ++ else ++ /* Store the expected address of the padding frag. */ ++ padding_fragP->tc_frag_data.padding_address ++ = (fragP->fr_address + padding_size ++ + fragP->tc_frag_data.padding_address); ++ ++ fragP->tc_frag_data.prefix_length = padding_size; ++ ++ /* Update the length for the current interation. */ ++ left_size = padding_size; ++ for (next_fragP = fragP; ++ next_fragP != padding_fragP; ++ next_fragP = next_fragP->fr_next) ++ if (next_fragP->fr_type == rs_machine_dependent ++ && (TYPE_FROM_RELAX_STATE (next_fragP->fr_subtype) ++ == BRANCH_PREFIX)) ++ { ++ if (left_size) ++ { ++ int max = next_fragP->tc_frag_data.max_bytes; ++ if (max) ++ { ++ int size; ++ if (max > left_size) ++ size = left_size; ++ else ++ size = max; ++ left_size -= size; ++ next_fragP->tc_frag_data.length = size; ++ } ++ } ++ else ++ next_fragP->tc_frag_data.length = 0; ++ } ++ ++ return (fragP->tc_frag_data.length ++ - fragP->tc_frag_data.last_length); ++ } ++ return relax_frag (segment, fragP, stretch); ++} ++ + /* md_estimate_size_before_relax() + + Called just before relax() for rs_machine_dependent frags. The x86 +@@ -10209,6 +10969,14 @@ elf_symbol_resolved_in_segment_p (symbol + int + md_estimate_size_before_relax (fragS *fragP, segT segment) + { ++ if (TYPE_FROM_RELAX_STATE (fragP->fr_subtype) == BRANCH_PADDING ++ || TYPE_FROM_RELAX_STATE (fragP->fr_subtype) == BRANCH_PREFIX ++ || TYPE_FROM_RELAX_STATE (fragP->fr_subtype) == FUSED_JCC_PADDING) ++ { ++ i386_classify_machine_dependent_frag (fragP); ++ return fragP->tc_frag_data.length; ++ } ++ + /* We've already got fragP->fr_subtype right; all we have to do is + check for un-relaxable symbols. On an ELF system, we can't relax + an externally visible symbol, because it may be overridden by a +@@ -10342,6 +11110,106 @@ md_convert_frag (bfd *abfd ATTRIBUTE_UNU + unsigned int extension = 0; + offsetT displacement_from_opcode_start; + ++ if (TYPE_FROM_RELAX_STATE (fragP->fr_subtype) == BRANCH_PADDING ++ || TYPE_FROM_RELAX_STATE (fragP->fr_subtype) == FUSED_JCC_PADDING ++ || TYPE_FROM_RELAX_STATE (fragP->fr_subtype) == BRANCH_PREFIX) ++ { ++ /* Generate nop padding. */ ++ unsigned int size = fragP->tc_frag_data.length; ++ if (size) ++ { ++ if (size > fragP->tc_frag_data.max_bytes) ++ abort (); ++ ++ if (flag_debug) ++ { ++ const char *msg; ++ const char *branch = "branch"; ++ const char *prefix = ""; ++ fragS *padding_fragP; ++ if (TYPE_FROM_RELAX_STATE (fragP->fr_subtype) ++ == BRANCH_PREFIX) ++ { ++ padding_fragP = fragP->tc_frag_data.u.padding_fragP; ++ switch (fragP->tc_frag_data.default_prefix) ++ { ++ default: ++ abort (); ++ break; ++ case CS_PREFIX_OPCODE: ++ prefix = " cs"; ++ break; ++ case DS_PREFIX_OPCODE: ++ prefix = " ds"; ++ break; ++ case ES_PREFIX_OPCODE: ++ prefix = " es"; ++ break; ++ case FS_PREFIX_OPCODE: ++ prefix = " fs"; ++ break; ++ case GS_PREFIX_OPCODE: ++ prefix = " gs"; ++ break; ++ case SS_PREFIX_OPCODE: ++ prefix = " ss"; ++ break; ++ } ++ if (padding_fragP) ++ msg = _("%s:%u: add %d%s at 0x%llx to align " ++ "%s within %d-byte boundary\n"); ++ else ++ msg = _("%s:%u: add additional %d%s at 0x%llx to " ++ "align %s within %d-byte boundary\n"); ++ } ++ else ++ { ++ padding_fragP = fragP; ++ msg = _("%s:%u: add %d%s-byte nop at 0x%llx to align " ++ "%s within %d-byte boundary\n"); ++ } ++ ++ if (padding_fragP) ++ switch (padding_fragP->tc_frag_data.branch_type) ++ { ++ case align_branch_jcc: ++ branch = "jcc"; ++ break; ++ case align_branch_fused: ++ branch = "fused jcc"; ++ break; ++ case align_branch_jmp: ++ branch = "jmp"; ++ break; ++ case align_branch_call: ++ branch = "call"; ++ break; ++ case align_branch_indirect: ++ branch = "indiret branch"; ++ break; ++ case align_branch_ret: ++ branch = "ret"; ++ break; ++ default: ++ break; ++ } ++ ++ fprintf (stdout, msg, ++ fragP->fr_file, fragP->fr_line, size, prefix, ++ (long long) fragP->fr_address, branch, ++ 1 << align_branch_power); ++ } ++ if (TYPE_FROM_RELAX_STATE (fragP->fr_subtype) == BRANCH_PREFIX) ++ memset (fragP->fr_opcode, ++ fragP->tc_frag_data.default_prefix, size); ++ else ++ i386_generate_nops (fragP, (char *) fragP->fr_opcode, ++ size, 0); ++ fragP->fr_fix += size; ++ } ++ return; ++ } ++ + opcode = (unsigned char *) fragP->fr_opcode; + + /* Address we want to reach in file space. */ +@@ -10898,6 +11766,10 @@ const char *md_shortopts = "qnO::"; + #define OPTION_MFENCE_AS_LOCK_ADD (OPTION_MD_BASE + 24) + #define OPTION_X86_USED_NOTE (OPTION_MD_BASE + 25) + #define OPTION_MVEXWIG (OPTION_MD_BASE + 26) ++#define OPTION_MALIGN_BRANCH_BOUNDARY (OPTION_MD_BASE + 27) ++#define OPTION_MALIGN_BRANCH_PREFIX_SIZE (OPTION_MD_BASE + 28) ++#define OPTION_MALIGN_BRANCH (OPTION_MD_BASE + 29) ++#define OPTION_MBRANCHES_WITH_32B_BOUNDARIES (OPTION_MD_BASE + 30) + + struct option md_longopts[] = + { +@@ -10933,6 +11805,10 @@ struct option md_longopts[] = + {"mfence-as-lock-add", required_argument, NULL, OPTION_MFENCE_AS_LOCK_ADD}, + {"mrelax-relocations", required_argument, NULL, OPTION_MRELAX_RELOCATIONS}, + {"mevexrcig", required_argument, NULL, OPTION_MEVEXRCIG}, ++ {"malign-branch-boundary", required_argument, NULL, OPTION_MALIGN_BRANCH_BOUNDARY}, ++ {"malign-branch-prefix-size", required_argument, NULL, OPTION_MALIGN_BRANCH_PREFIX_SIZE}, ++ {"malign-branch", required_argument, NULL, OPTION_MALIGN_BRANCH}, ++ {"mbranches-within-32B-boundaries", no_argument, NULL, OPTION_MBRANCHES_WITH_32B_BOUNDARIES}, + {"mamd64", no_argument, NULL, OPTION_MAMD64}, + {"mintel64", no_argument, NULL, OPTION_MINTEL64}, + {NULL, no_argument, NULL, 0} +@@ -10943,7 +11819,7 @@ int + md_parse_option (int c, const char *arg) + { + unsigned int j; +- char *arch, *next, *saved; ++ char *arch, *next, *saved, *type; + + switch (c) + { +@@ -11319,6 +12195,86 @@ md_parse_option (int c, const char *arg) + as_fatal (_("invalid -mrelax-relocations= option: `%s'"), arg); + break; + ++ case OPTION_MALIGN_BRANCH_BOUNDARY: ++ { ++ char *end; ++ int align = strtoul (arg, &end, 0); ++ if (*end == '\0') ++ { ++ if (align == 0) ++ { ++ align_branch_power = 0; ++ break; ++ } ++ else if (align >= 32) ++ { ++ int align_power; ++ for (align_power = 0; ++ (align & 1) == 0; ++ align >>= 1, align_power++) ++ continue; ++ if (align == 1) ++ { ++ align_branch_power = align_power; ++ break; ++ } ++ } ++ } ++ as_fatal (_("invalid -malign-branch-boundary= value: %s"), arg); ++ } ++ break; ++ ++ case OPTION_MALIGN_BRANCH_PREFIX_SIZE: ++ { ++ char *end; ++ int align = strtoul (arg, &end, 0); ++ if (*end == '\0' && align >= 0 && align < 6) ++ { ++ align_branch_prefix_size = align; ++ break; ++ } ++ as_fatal (_("invalid -malign-branch-prefix-size= value: %s"), ++ arg); ++ } ++ break; ++ ++ case OPTION_MALIGN_BRANCH: ++ align_branch = 0; ++ saved = xstrdup (arg); ++ type = saved; ++ do ++ { ++ next = strchr (type, '+'); ++ if (next) ++ *next++ = '\0'; ++ if (strcasecmp (type, "jcc") == 0) ++ align_branch |= align_branch_jcc; ++ else if (strcasecmp (type, "fused") == 0) ++ align_branch |= align_branch_fused; ++ else if (strcasecmp (type, "jmp") == 0) ++ align_branch |= align_branch_jmp; ++ else if (strcasecmp (type, "call") == 0) ++ align_branch |= align_branch_call; ++ else if (strcasecmp (type, "ret") == 0) ++ align_branch |= align_branch_ret; ++ else if (strcasecmp (type, "indirect") == 0) ++ align_branch |= align_branch_indirect; ++ else ++ as_fatal (_("invalid -malign-branch= option: `%s'"), arg); ++ type = next; ++ } ++ while (next != NULL); ++ free (saved); ++ break; ++ ++ case OPTION_MBRANCHES_WITH_32B_BOUNDARIES: ++ align_branch_power = 5; ++ align_branch_prefix_size = 5; ++ align_branch = (align_branch_jcc ++ | align_branch_fused ++ | align_branch_jmp); ++ break; ++ + case OPTION_MAMD64: + intel64 = 0; + break; +@@ -11571,6 +12527,20 @@ md_show_usage (FILE *stream) + fprintf (stream, _("\ + generate relax relocations\n")); + fprintf (stream, _("\ ++ -malign-branch-boundary=NUM (default: 0)\n\ ++ align branches within NUM byte boundary\n")); ++ fprintf (stream, _("\ ++ -malign-branch=TYPE[+TYPE...] (default: jcc+fused+jmp)\n\ ++ TYPE is combination of jcc, fused, jmp, call, ret,\n\ ++ indirect\n\ ++ specify types of branches to align\n")); ++ fprintf (stream, _("\ ++ -malign-branch-prefix-size=NUM (default: 5)\n\ ++ align branches with NUM prefixes per instruction\n")); ++ fprintf (stream, _("\ ++ -mbranches-within-32B-boundaries\n\ ++ align branches within 32 byte boundary\n")); ++ fprintf (stream, _("\ + -mamd64 accept only AMD64 ISA [default]\n")); + fprintf (stream, _("\ + -mintel64 accept only Intel64 ISA\n")); +@@ -11654,15 +12624,24 @@ i386_target_format (void) + { + default: + format = ELF_TARGET_FORMAT; ++#ifndef TE_SOLARIS ++ tls_get_addr = "___tls_get_addr"; ++#endif + break; + case X86_64_ABI: + use_rela_relocations = 1; + object_64bit = 1; ++#ifndef TE_SOLARIS ++ tls_get_addr = "__tls_get_addr"; ++#endif + format = ELF_TARGET_FORMAT64; + break; + case X86_64_X32_ABI: + use_rela_relocations = 1; + object_64bit = 1; ++#ifndef TE_SOLARIS ++ tls_get_addr = "__tls_get_addr"; ++#endif + disallow_64bit_reloc = 1; + format = ELF_TARGET_FORMAT32; + break; +@@ -11779,6 +12758,21 @@ s_bss (int ignore ATTRIBUTE_UNUSED) + + #endif + ++/* Remember constant diretive. */ ++ ++void ++i386_cons_worker (int ignore ATTRIBUTE_UNUSED) ++{ ++ if (last_insn.kind != last_insn_directive ++ && (bfd_get_section_flags (NULL, now_seg) & SEC_CODE)) ++ { ++ last_insn.seg = now_seg; ++ last_insn.kind = last_insn_directive; ++ last_insn.name = "constant diretive"; ++ last_insn.file = as_where (&last_insn.line); ++ } ++} ++ + void + i386_validate_fix (fixS *fixp) + { +diff -rupN binutils-2.32/gas/config/tc-i386.h binutils.new/gas/config/tc-i386.h +--- binutils-2.32/gas/config/tc-i386.h 2019-01-19 16:01:33.000000000 +0000 ++++ binutils.new/gas/config/tc-i386.h 2019-11-25 14:01:00.626325922 +0000 +@@ -208,12 +208,19 @@ if ((n) \ + + #define MAX_MEM_FOR_RS_ALIGN_CODE 4095 + ++extern void i386_cons_worker (int); ++#define md_cons_worker(nbytes) i386_cons_worker (nbytes) ++ + void i386_print_statistics (FILE *); + #define tc_print_statistics i386_print_statistics + + extern unsigned int i386_frag_max_var (fragS *); + #define md_frag_max_var i386_frag_max_var + ++extern long i386_generic_table_relax_frag (segT, fragS *, long); ++#define md_generic_table_relax_frag(segment, fragP, stretch) \ ++ i386_generic_table_relax_frag (segment, fragP, stretch) ++ + #define md_number_to_chars number_to_chars_littleendian + + enum processor_type +@@ -248,9 +255,24 @@ extern i386_cpu_flags cpu_arch_isa_flags + + struct i386_tc_frag_data + { ++ union ++ { ++ fragS *padding_fragP; ++ fragS *branch_fragP; ++ } u; ++ addressT padding_address; + enum processor_type isa; + i386_cpu_flags isa_flags; ++ unsigned int max_bytes; + enum processor_type tune; ++ signed char length; ++ signed char last_length; ++ signed char max_prefix_length; ++ signed char prefix_length; ++ signed char default_prefix; ++ signed char cmp_size; ++ unsigned int classified : 1; ++ unsigned int branch_type : 7; + }; + + /* We need to emit the right NOP pattern in .align frags. This is +@@ -261,9 +283,20 @@ struct i386_tc_frag_data + #define TC_FRAG_INIT(FRAGP) \ + do \ + { \ ++ (FRAGP)->tc_frag_data.u.padding_fragP = NULL; \ ++ (FRAGP)->tc_frag_data.padding_address = 0; \ + (FRAGP)->tc_frag_data.isa = cpu_arch_isa; \ + (FRAGP)->tc_frag_data.isa_flags = cpu_arch_isa_flags; \ + (FRAGP)->tc_frag_data.tune = cpu_arch_tune; \ ++ (FRAGP)->tc_frag_data.length = 0; \ ++ (FRAGP)->tc_frag_data.max_bytes = max_chars; \ ++ (FRAGP)->tc_frag_data.last_length = 0; \ ++ (FRAGP)->tc_frag_data.max_prefix_length = 0; \ ++ (FRAGP)->tc_frag_data.prefix_length = 0; \ ++ (FRAGP)->tc_frag_data.default_prefix = 0; \ ++ (FRAGP)->tc_frag_data.cmp_size = 0; \ ++ (FRAGP)->tc_frag_data.classified = 0; \ ++ (FRAGP)->tc_frag_data.branch_type = 0; \ + } \ + while (0) + +diff -rupN binutils-2.32/gas/doc/c-i386.texi binutils.new/gas/doc/c-i386.texi +--- binutils-2.32/gas/doc/c-i386.texi 2019-01-19 16:01:33.000000000 +0000 ++++ binutils.new/gas/doc/c-i386.texi 2019-11-25 14:01:00.615325994 +0000 +@@ -410,6 +410,43 @@ R_X86_64_REX_GOTPCRELX, in 64-bit mode. + relocations. The default can be controlled by a configure option + @option{--enable-x86-relax-relocations}. + ++@cindex @samp{-malign-branch-boundary=} option, i386 ++@cindex @samp{-malign-branch-boundary=} option, x86-64 ++@item -malign-branch-boundary=@var{NUM} ++This option controls how the assembler should align branches with segment ++prefixes or NOP. @var{NUM} must be a power of 2. It should be 0 or ++no less than 32. Branches will be aligned within @var{NUM} byte ++boundary. @option{-malign-branch-boundary=0}, which is the default, ++doesn't align branches. ++ ++@cindex @samp{-malign-branch=} option, i386 ++@cindex @samp{-malign-branch=} option, x86-64 ++@item -malign-branch=@var{TYPE}[+@var{TYPE}...] ++This option specifies types of branches to align. @var{TYPE} is ++combination of @samp{jcc}, which aligns conditional jumps, ++@samp{fused}, which aligns fused conditional jumps, @samp{jmp}, ++which aligns unconditional jumps, @samp{call} which aligns calls, ++@samp{ret}, which aligns rets, @samp{indirect}, which aligns indirect ++jumps and calls. The default is @option{-malign-branch=jcc+fused+jmp}. ++ ++@cindex @samp{-malign-branch-prefix-size=} option, i386 ++@cindex @samp{-malign-branch-prefix-size=} option, x86-64 ++@item -malign-branch-prefix-size=@var{NUM} ++This option specifies the maximum number of prefixes on an instruction ++to align branches. @var{NUM} should be between 0 and 5. The default ++@var{NUM} is 5. ++ ++@cindex @samp{-mbranches-within-32B-boundaries} option, i386 ++@cindex @samp{-mbranches-within-32B-boundaries} option, x86-64 ++@item -mbranches-within-32B-boundaries ++This option aligns conditional jumps, fused conditional jumps and ++unconditional jumps within 32 byte boundary with up to 5 segment prefixes ++on an instruction. It is equivalent to ++@option{-malign-branch-boundary=32} ++@option{-malign-branch=jcc+fused+jmp} ++@option{-malign-branch-prefix-size=5}. ++The default doesn't align branches. ++ + @cindex @samp{-mx86-used-note=} option, i386 + @cindex @samp{-mx86-used-note=} option, x86-64 + @item -mx86-used-note=@var{no} +diff -rupN binutils-2.32/gas/read.c binutils.new/gas/read.c +--- binutils-2.32/gas/read.c 2019-01-19 16:01:33.000000000 +0000 ++++ binutils.new/gas/read.c 2019-11-25 14:01:00.616325988 +0000 +@@ -3976,6 +3976,10 @@ cons_worker (int nbytes, /* 1=.byte, 2=. + md_cons_align (nbytes); + #endif + ++#ifdef md_cons_worker ++ md_cons_worker (nbytes); ++#endif ++ + c = 0; + do + { +diff -rupN binutils-2.32/gas/testsuite/gas/i386/align-branch-1a.d binutils.new/gas/testsuite/gas/i386/align-branch-1a.d +--- binutils-2.32/gas/testsuite/gas/i386/align-branch-1a.d 1970-01-01 01:00:00.000000000 +0100 ++++ binutils.new/gas/testsuite/gas/i386/align-branch-1a.d 2019-11-25 14:01:00.632325883 +0000 +@@ -0,0 +1,77 @@ ++#source: align-branch-1.s ++#as: -malign-branch-boundary=32 ++#objdump: -dw ++ ++.*: +file format .* ++ ++Disassembly of section .text: ++ ++0+ : ++ 0: 65 65 65 a3 01 00 00 00 gs gs mov %eax,%gs:0x1 ++ 8: 55 push %ebp ++ 9: 55 push %ebp ++ a: 55 push %ebp ++ b: 55 push %ebp ++ c: 89 e5 mov %esp,%ebp ++ e: 89 7d f8 mov %edi,-0x8\(%ebp\) ++ 11: 89 75 f4 mov %esi,-0xc\(%ebp\) ++ 14: 89 75 f4 mov %esi,-0xc\(%ebp\) ++ 17: 89 75 f4 mov %esi,-0xc\(%ebp\) ++ 1a: 89 75 f4 mov %esi,-0xc\(%ebp\) ++ 1d: 89 75 f4 mov %esi,-0xc\(%ebp\) ++ 20: 39 c5 cmp %eax,%ebp ++ 22: 74 5e je 82 ++ 24: 3e 89 73 f4 mov %esi,%ds:-0xc\(%ebx\) ++ 28: 89 75 f4 mov %esi,-0xc\(%ebp\) ++ 2b: 89 7d f8 mov %edi,-0x8\(%ebp\) ++ 2e: 89 75 f4 mov %esi,-0xc\(%ebp\) ++ 31: 89 75 f4 mov %esi,-0xc\(%ebp\) ++ 34: 89 75 f4 mov %esi,-0xc\(%ebp\) ++ 37: 89 75 f4 mov %esi,-0xc\(%ebp\) ++ 3a: 89 75 f4 mov %esi,-0xc\(%ebp\) ++ 3d: 5d pop %ebp ++ 3e: 5d pop %ebp ++ 3f: 5d pop %ebp ++ 40: 74 40 je 82 ++ 42: 5d pop %ebp ++ 43: 74 3d je 82 ++ 45: 36 89 44 24 fc mov %eax,%ss:-0x4\(%esp\) ++ 4a: 89 75 f4 mov %esi,-0xc\(%ebp\) ++ 4d: 89 7d f8 mov %edi,-0x8\(%ebp\) ++ 50: 89 75 f4 mov %esi,-0xc\(%ebp\) ++ 53: 89 75 f4 mov %esi,-0xc\(%ebp\) ++ 56: 89 75 f4 mov %esi,-0xc\(%ebp\) ++ 59: 89 75 f4 mov %esi,-0xc\(%ebp\) ++ 5c: 89 75 f4 mov %esi,-0xc\(%ebp\) ++ 5f: 5d pop %ebp ++ 60: eb 26 jmp 88 ++ 62: eb 24 jmp 88 ++ 64: eb 22 jmp 88 ++ 66: 89 45 fc mov %eax,-0x4\(%ebp\) ++ 69: 89 75 f4 mov %esi,-0xc\(%ebp\) ++ 6c: 89 7d f8 mov %edi,-0x8\(%ebp\) ++ 6f: 89 75 f4 mov %esi,-0xc\(%ebp\) ++ 72: 89 75 f4 mov %esi,-0xc\(%ebp\) ++ 75: 89 75 f4 mov %esi,-0xc\(%ebp\) ++ 78: 5d pop %ebp ++ 79: 5d pop %ebp ++ 7a: 39 c5 cmp %eax,%ebp ++ 7c: 74 04 je 82 ++ 7e: 66 90 xchg %ax,%ax ++ 80: eb 06 jmp 88 ++ 82: 8b 45 f4 mov -0xc\(%ebp\),%eax ++ 85: 89 45 fc mov %eax,-0x4\(%ebp\) ++ 88: 89 b5 50 fb ff ff mov %esi,-0x4b0\(%ebp\) ++ 8e: 89 b5 50 fb ff ff mov %esi,-0x4b0\(%ebp\) ++ 94: 89 b5 50 fb ff ff mov %esi,-0x4b0\(%ebp\) ++ 9a: 89 b5 50 fb ff ff mov %esi,-0x4b0\(%ebp\) ++ a0: 89 75 0c mov %esi,0xc\(%ebp\) ++ a3: e9 [0-9a-f ]+ jmp .* ++ a8: 89 b5 50 fb ff ff mov %esi,-0x4b0\(%ebp\) ++ ae: 89 b5 50 fb ff ff mov %esi,-0x4b0\(%ebp\) ++ b4: 89 b5 50 fb ff ff mov %esi,-0x4b0\(%ebp\) ++ ba: 89 b5 50 fb ff ff mov %esi,-0x4b0\(%ebp\) ++ c0: 89 75 00 mov %esi,0x0\(%ebp\) ++ c3: 74 c3 je 88 ++ c5: 74 c1 je 88 ++#pass +diff -rupN binutils-2.32/gas/testsuite/gas/i386/align-branch-1b.d binutils.new/gas/testsuite/gas/i386/align-branch-1b.d +--- binutils-2.32/gas/testsuite/gas/i386/align-branch-1b.d 1970-01-01 01:00:00.000000000 +0100 ++++ binutils.new/gas/testsuite/gas/i386/align-branch-1b.d 2019-11-25 14:01:00.679325573 +0000 +@@ -0,0 +1,77 @@ ++#source: align-branch-1.s ++#as: -malign-branch-boundary=32 -malign-branch=fused+jcc+jmp ++#objdump: -dw ++ ++.*: +file format .* ++ ++Disassembly of section .text: ++ ++0+ : ++ 0: 65 65 65 a3 01 00 00 00 gs gs mov %eax,%gs:0x1 ++ 8: 55 push %ebp ++ 9: 55 push %ebp ++ a: 55 push %ebp ++ b: 55 push %ebp ++ c: 89 e5 mov %esp,%ebp ++ e: 89 7d f8 mov %edi,-0x8\(%ebp\) ++ 11: 89 75 f4 mov %esi,-0xc\(%ebp\) ++ 14: 89 75 f4 mov %esi,-0xc\(%ebp\) ++ 17: 89 75 f4 mov %esi,-0xc\(%ebp\) ++ 1a: 89 75 f4 mov %esi,-0xc\(%ebp\) ++ 1d: 89 75 f4 mov %esi,-0xc\(%ebp\) ++ 20: 39 c5 cmp %eax,%ebp ++ 22: 74 5e je 82 ++ 24: 3e 89 73 f4 mov %esi,%ds:-0xc\(%ebx\) ++ 28: 89 75 f4 mov %esi,-0xc\(%ebp\) ++ 2b: 89 7d f8 mov %edi,-0x8\(%ebp\) ++ 2e: 89 75 f4 mov %esi,-0xc\(%ebp\) ++ 31: 89 75 f4 mov %esi,-0xc\(%ebp\) ++ 34: 89 75 f4 mov %esi,-0xc\(%ebp\) ++ 37: 89 75 f4 mov %esi,-0xc\(%ebp\) ++ 3a: 89 75 f4 mov %esi,-0xc\(%ebp\) ++ 3d: 5d pop %ebp ++ 3e: 5d pop %ebp ++ 3f: 5d pop %ebp ++ 40: 74 40 je 82 ++ 42: 5d pop %ebp ++ 43: 74 3d je 82 ++ 45: 36 89 44 24 fc mov %eax,%ss:-0x4\(%esp\) ++ 4a: 89 75 f4 mov %esi,-0xc\(%ebp\) ++ 4d: 89 7d f8 mov %edi,-0x8\(%ebp\) ++ 50: 89 75 f4 mov %esi,-0xc\(%ebp\) ++ 53: 89 75 f4 mov %esi,-0xc\(%ebp\) ++ 56: 89 75 f4 mov %esi,-0xc\(%ebp\) ++ 59: 89 75 f4 mov %esi,-0xc\(%ebp\) ++ 5c: 89 75 f4 mov %esi,-0xc\(%ebp\) ++ 5f: 5d pop %ebp ++ 60: eb 26 jmp 88 ++ 62: eb 24 jmp 88 ++ 64: eb 22 jmp 88 ++ 66: 89 45 fc mov %eax,-0x4\(%ebp\) ++ 69: 89 75 f4 mov %esi,-0xc\(%ebp\) ++ 6c: 89 7d f8 mov %edi,-0x8\(%ebp\) ++ 6f: 89 75 f4 mov %esi,-0xc\(%ebp\) ++ 72: 89 75 f4 mov %esi,-0xc\(%ebp\) ++ 75: 89 75 f4 mov %esi,-0xc\(%ebp\) ++ 78: 5d pop %ebp ++ 79: 5d pop %ebp ++ 7a: 39 c5 cmp %eax,%ebp ++ 7c: 74 04 je 82 ++ 7e: 66 90 xchg %ax,%ax ++ 80: eb 06 jmp 88 ++ 82: 8b 45 f4 mov -0xc\(%ebp\),%eax ++ 85: 89 45 fc mov %eax,-0x4\(%ebp\) ++ 88: 89 b5 50 fb ff ff mov %esi,-0x4b0\(%ebp\) ++ 8e: 89 b5 50 fb ff ff mov %esi,-0x4b0\(%ebp\) ++ 94: 89 b5 50 fb ff ff mov %esi,-0x4b0\(%ebp\) ++ 9a: 89 b5 50 fb ff ff mov %esi,-0x4b0\(%ebp\) ++ a0: 89 75 0c mov %esi,0xc\(%ebp\) ++ a3: e9 [0-9a-f ]+ jmp .* ++ a8: 89 b5 50 fb ff ff mov %esi,-0x4b0\(%ebp\) ++ ae: 89 b5 50 fb ff ff mov %esi,-0x4b0\(%ebp\) ++ b4: 89 b5 50 fb ff ff mov %esi,-0x4b0\(%ebp\) ++ ba: 89 b5 50 fb ff ff mov %esi,-0x4b0\(%ebp\) ++ c0: 89 75 00 mov %esi,0x0\(%ebp\) ++ c3: 74 c3 je 88 ++ c5: 74 c1 je 88 ++#pass +diff -rupN binutils-2.32/gas/testsuite/gas/i386/align-branch-1c.d binutils.new/gas/testsuite/gas/i386/align-branch-1c.d +--- binutils-2.32/gas/testsuite/gas/i386/align-branch-1c.d 1970-01-01 01:00:00.000000000 +0100 ++++ binutils.new/gas/testsuite/gas/i386/align-branch-1c.d 2019-11-25 14:01:00.680325567 +0000 +@@ -0,0 +1,77 @@ ++#source: align-branch-1.s ++#as: -malign-branch-boundary=32 -malign-branch-prefix-size=1 ++#objdump: -dw ++ ++.*: +file format .* ++ ++Disassembly of section .text: ++ ++0+ : ++ 0: 65 a3 01 00 00 00 mov %eax,%gs:0x1 ++ 6: 3e 55 ds push %ebp ++ 8: 3e 55 ds push %ebp ++ a: 55 push %ebp ++ b: 55 push %ebp ++ c: 89 e5 mov %esp,%ebp ++ e: 89 7d f8 mov %edi,-0x8\(%ebp\) ++ 11: 89 75 f4 mov %esi,-0xc\(%ebp\) ++ 14: 89 75 f4 mov %esi,-0xc\(%ebp\) ++ 17: 89 75 f4 mov %esi,-0xc\(%ebp\) ++ 1a: 89 75 f4 mov %esi,-0xc\(%ebp\) ++ 1d: 89 75 f4 mov %esi,-0xc\(%ebp\) ++ 20: 39 c5 cmp %eax,%ebp ++ 22: 74 5e je 82 ++ 24: 3e 89 73 f4 mov %esi,%ds:-0xc\(%ebx\) ++ 28: 89 75 f4 mov %esi,-0xc\(%ebp\) ++ 2b: 89 7d f8 mov %edi,-0x8\(%ebp\) ++ 2e: 89 75 f4 mov %esi,-0xc\(%ebp\) ++ 31: 89 75 f4 mov %esi,-0xc\(%ebp\) ++ 34: 89 75 f4 mov %esi,-0xc\(%ebp\) ++ 37: 89 75 f4 mov %esi,-0xc\(%ebp\) ++ 3a: 89 75 f4 mov %esi,-0xc\(%ebp\) ++ 3d: 5d pop %ebp ++ 3e: 5d pop %ebp ++ 3f: 5d pop %ebp ++ 40: 74 40 je 82 ++ 42: 5d pop %ebp ++ 43: 74 3d je 82 ++ 45: 36 89 44 24 fc mov %eax,%ss:-0x4\(%esp\) ++ 4a: 89 75 f4 mov %esi,-0xc\(%ebp\) ++ 4d: 89 7d f8 mov %edi,-0x8\(%ebp\) ++ 50: 89 75 f4 mov %esi,-0xc\(%ebp\) ++ 53: 89 75 f4 mov %esi,-0xc\(%ebp\) ++ 56: 89 75 f4 mov %esi,-0xc\(%ebp\) ++ 59: 89 75 f4 mov %esi,-0xc\(%ebp\) ++ 5c: 89 75 f4 mov %esi,-0xc\(%ebp\) ++ 5f: 5d pop %ebp ++ 60: eb 26 jmp 88 ++ 62: eb 24 jmp 88 ++ 64: eb 22 jmp 88 ++ 66: 89 45 fc mov %eax,-0x4\(%ebp\) ++ 69: 89 75 f4 mov %esi,-0xc\(%ebp\) ++ 6c: 89 7d f8 mov %edi,-0x8\(%ebp\) ++ 6f: 89 75 f4 mov %esi,-0xc\(%ebp\) ++ 72: 89 75 f4 mov %esi,-0xc\(%ebp\) ++ 75: 89 75 f4 mov %esi,-0xc\(%ebp\) ++ 78: 5d pop %ebp ++ 79: 5d pop %ebp ++ 7a: 39 c5 cmp %eax,%ebp ++ 7c: 74 04 je 82 ++ 7e: 66 90 xchg %ax,%ax ++ 80: eb 06 jmp 88 ++ 82: 8b 45 f4 mov -0xc\(%ebp\),%eax ++ 85: 89 45 fc mov %eax,-0x4\(%ebp\) ++ 88: 89 b5 50 fb ff ff mov %esi,-0x4b0\(%ebp\) ++ 8e: 89 b5 50 fb ff ff mov %esi,-0x4b0\(%ebp\) ++ 94: 89 b5 50 fb ff ff mov %esi,-0x4b0\(%ebp\) ++ 9a: 89 b5 50 fb ff ff mov %esi,-0x4b0\(%ebp\) ++ a0: 89 75 0c mov %esi,0xc\(%ebp\) ++ a3: e9 [0-9a-f ]+ jmp .* ++ a8: 89 b5 50 fb ff ff mov %esi,-0x4b0\(%ebp\) ++ ae: 89 b5 50 fb ff ff mov %esi,-0x4b0\(%ebp\) ++ b4: 89 b5 50 fb ff ff mov %esi,-0x4b0\(%ebp\) ++ ba: 89 b5 50 fb ff ff mov %esi,-0x4b0\(%ebp\) ++ c0: 89 75 00 mov %esi,0x0\(%ebp\) ++ c3: 74 c3 je 88 ++ c5: 74 c1 je 88 ++#pass +diff -rupN binutils-2.32/gas/testsuite/gas/i386/align-branch-1d.d binutils.new/gas/testsuite/gas/i386/align-branch-1d.d +--- binutils-2.32/gas/testsuite/gas/i386/align-branch-1d.d 1970-01-01 01:00:00.000000000 +0100 ++++ binutils.new/gas/testsuite/gas/i386/align-branch-1d.d 2019-11-25 14:01:00.680325567 +0000 +@@ -0,0 +1,76 @@ ++#source: align-branch-1.s ++#as: -malign-branch-boundary=32 -malign-branch=fused+jcc ++#objdump: -dw ++ ++.*: +file format .* ++ ++Disassembly of section .text: ++ ++0+ : ++ 0: 65 65 65 a3 01 00 00 00 gs gs mov %eax,%gs:0x1 ++ 8: 55 push %ebp ++ 9: 55 push %ebp ++ a: 55 push %ebp ++ b: 55 push %ebp ++ c: 89 e5 mov %esp,%ebp ++ e: 89 7d f8 mov %edi,-0x8\(%ebp\) ++ 11: 89 75 f4 mov %esi,-0xc\(%ebp\) ++ 14: 89 75 f4 mov %esi,-0xc\(%ebp\) ++ 17: 89 75 f4 mov %esi,-0xc\(%ebp\) ++ 1a: 89 75 f4 mov %esi,-0xc\(%ebp\) ++ 1d: 89 75 f4 mov %esi,-0xc\(%ebp\) ++ 20: 39 c5 cmp %eax,%ebp ++ 22: 74 5b je 7f ++ 24: 3e 89 73 f4 mov %esi,%ds:-0xc\(%ebx\) ++ 28: 89 75 f4 mov %esi,-0xc\(%ebp\) ++ 2b: 89 7d f8 mov %edi,-0x8\(%ebp\) ++ 2e: 89 75 f4 mov %esi,-0xc\(%ebp\) ++ 31: 89 75 f4 mov %esi,-0xc\(%ebp\) ++ 34: 89 75 f4 mov %esi,-0xc\(%ebp\) ++ 37: 89 75 f4 mov %esi,-0xc\(%ebp\) ++ 3a: 89 75 f4 mov %esi,-0xc\(%ebp\) ++ 3d: 5d pop %ebp ++ 3e: 5d pop %ebp ++ 3f: 5d pop %ebp ++ 40: 74 3d je 7f ++ 42: 5d pop %ebp ++ 43: 74 3a je 7f ++ 45: 89 44 24 fc mov %eax,-0x4\(%esp\) ++ 49: 89 75 f4 mov %esi,-0xc\(%ebp\) ++ 4c: 89 7d f8 mov %edi,-0x8\(%ebp\) ++ 4f: 89 75 f4 mov %esi,-0xc\(%ebp\) ++ 52: 89 75 f4 mov %esi,-0xc\(%ebp\) ++ 55: 89 75 f4 mov %esi,-0xc\(%ebp\) ++ 58: 89 75 f4 mov %esi,-0xc\(%ebp\) ++ 5b: 89 75 f4 mov %esi,-0xc\(%ebp\) ++ 5e: 5d pop %ebp ++ 5f: eb 24 jmp 85 ++ 61: eb 22 jmp 85 ++ 63: eb 20 jmp 85 ++ 65: 89 45 fc mov %eax,-0x4\(%ebp\) ++ 68: 89 75 f4 mov %esi,-0xc\(%ebp\) ++ 6b: 89 7d f8 mov %edi,-0x8\(%ebp\) ++ 6e: 89 75 f4 mov %esi,-0xc\(%ebp\) ++ 71: 89 75 f4 mov %esi,-0xc\(%ebp\) ++ 74: 89 75 f4 mov %esi,-0xc\(%ebp\) ++ 77: 5d pop %ebp ++ 78: 5d pop %ebp ++ 79: 39 c5 cmp %eax,%ebp ++ 7b: 74 02 je 7f ++ 7d: eb 06 jmp 85 ++ 7f: 8b 45 f4 mov -0xc\(%ebp\),%eax ++ 82: 89 45 fc mov %eax,-0x4\(%ebp\) ++ 85: 89 b5 50 fb ff ff mov %esi,-0x4b0\(%ebp\) ++ 8b: 89 b5 50 fb ff ff mov %esi,-0x4b0\(%ebp\) ++ 91: 89 b5 50 fb ff ff mov %esi,-0x4b0\(%ebp\) ++ 97: 89 b5 50 fb ff ff mov %esi,-0x4b0\(%ebp\) ++ 9d: 89 75 0c mov %esi,0xc\(%ebp\) ++ a0: e9 [0-9a-f ]+ jmp .* ++ a5: 89 b5 50 fb ff ff mov %esi,-0x4b0\(%ebp\) ++ ab: 89 b5 50 fb ff ff mov %esi,-0x4b0\(%ebp\) ++ b1: 89 b5 50 fb ff ff mov %esi,-0x4b0\(%ebp\) ++ b7: 89 b5 50 fb ff ff mov %esi,-0x4b0\(%ebp\) ++ bd: 89 75 00 mov %esi,0x0\(%ebp\) ++ c0: 74 c3 je 85 ++ c2: 74 c1 je 85 ++#pass +diff -rupN binutils-2.32/gas/testsuite/gas/i386/align-branch-1e.d binutils.new/gas/testsuite/gas/i386/align-branch-1e.d +--- binutils-2.32/gas/testsuite/gas/i386/align-branch-1e.d 1970-01-01 01:00:00.000000000 +0100 ++++ binutils.new/gas/testsuite/gas/i386/align-branch-1e.d 2019-11-25 14:01:00.680325567 +0000 +@@ -0,0 +1,77 @@ ++#source: align-branch-1.s ++#as: -malign-branch-boundary=32 -malign-branch=jcc ++#objdump: -dw ++ ++.*: +file format .* ++ ++Disassembly of section .text: ++ ++0+ : ++ 0: 65 a3 01 00 00 00 mov %eax,%gs:0x1 ++ 6: 55 push %ebp ++ 7: 55 push %ebp ++ 8: 55 push %ebp ++ 9: 55 push %ebp ++ a: 89 e5 mov %esp,%ebp ++ c: 89 7d f8 mov %edi,-0x8\(%ebp\) ++ f: 89 75 f4 mov %esi,-0xc\(%ebp\) ++ 12: 89 75 f4 mov %esi,-0xc\(%ebp\) ++ 15: 89 75 f4 mov %esi,-0xc\(%ebp\) ++ 18: 89 75 f4 mov %esi,-0xc\(%ebp\) ++ 1b: 89 75 f4 mov %esi,-0xc\(%ebp\) ++ 1e: 39 c5 cmp %eax,%ebp ++ 20: 74 5a je 7c ++ 22: 89 73 f4 mov %esi,-0xc\(%ebx\) ++ 25: 89 75 f4 mov %esi,-0xc\(%ebp\) ++ 28: 89 7d f8 mov %edi,-0x8\(%ebp\) ++ 2b: 89 75 f4 mov %esi,-0xc\(%ebp\) ++ 2e: 89 75 f4 mov %esi,-0xc\(%ebp\) ++ 31: 89 75 f4 mov %esi,-0xc\(%ebp\) ++ 34: 89 75 f4 mov %esi,-0xc\(%ebp\) ++ 37: 89 75 f4 mov %esi,-0xc\(%ebp\) ++ 3a: 5d pop %ebp ++ 3b: 5d pop %ebp ++ 3c: 5d pop %ebp ++ 3d: 74 3d je 7c ++ 3f: 5d pop %ebp ++ 40: 74 3a je 7c ++ 42: 89 44 24 fc mov %eax,-0x4\(%esp\) ++ 46: 89 75 f4 mov %esi,-0xc\(%ebp\) ++ 49: 89 7d f8 mov %edi,-0x8\(%ebp\) ++ 4c: 89 75 f4 mov %esi,-0xc\(%ebp\) ++ 4f: 89 75 f4 mov %esi,-0xc\(%ebp\) ++ 52: 89 75 f4 mov %esi,-0xc\(%ebp\) ++ 55: 89 75 f4 mov %esi,-0xc\(%ebp\) ++ 58: 89 75 f4 mov %esi,-0xc\(%ebp\) ++ 5b: 5d pop %ebp ++ 5c: eb 24 jmp 82 ++ 5e: eb 22 jmp 82 ++ 60: eb 20 jmp 82 ++ 62: 89 45 fc mov %eax,-0x4\(%ebp\) ++ 65: 89 75 f4 mov %esi,-0xc\(%ebp\) ++ 68: 89 7d f8 mov %edi,-0x8\(%ebp\) ++ 6b: 89 75 f4 mov %esi,-0xc\(%ebp\) ++ 6e: 89 75 f4 mov %esi,-0xc\(%ebp\) ++ 71: 89 75 f4 mov %esi,-0xc\(%ebp\) ++ 74: 5d pop %ebp ++ 75: 5d pop %ebp ++ 76: 39 c5 cmp %eax,%ebp ++ 78: 74 02 je 7c ++ 7a: eb 06 jmp 82 ++ 7c: 8b 45 f4 mov -0xc\(%ebp\),%eax ++ 7f: 89 45 fc mov %eax,-0x4\(%ebp\) ++ 82: 89 b5 50 fb ff ff mov %esi,-0x4b0\(%ebp\) ++ 88: 89 b5 50 fb ff ff mov %esi,-0x4b0\(%ebp\) ++ 8e: 89 b5 50 fb ff ff mov %esi,-0x4b0\(%ebp\) ++ 94: 89 b5 50 fb ff ff mov %esi,-0x4b0\(%ebp\) ++ 9a: 89 75 0c mov %esi,0xc\(%ebp\) ++ 9d: e9 [0-9a-f ]+ jmp .* ++ a2: 89 b5 50 fb ff ff mov %esi,-0x4b0\(%ebp\) ++ a8: 89 b5 50 fb ff ff mov %esi,-0x4b0\(%ebp\) ++ ae: 89 b5 50 fb ff ff mov %esi,-0x4b0\(%ebp\) ++ b4: 89 b5 50 fb ff ff mov %esi,-0x4b0\(%ebp\) ++ ba: 89 75 00 mov %esi,0x0\(%ebp\) ++ bd: 74 c3 je 82 ++ bf: 90 nop ++ c0: 74 c0 je 82 ++#pass +diff -rupN binutils-2.32/gas/testsuite/gas/i386/align-branch-1f.d binutils.new/gas/testsuite/gas/i386/align-branch-1f.d +--- binutils-2.32/gas/testsuite/gas/i386/align-branch-1f.d 1970-01-01 01:00:00.000000000 +0100 ++++ binutils.new/gas/testsuite/gas/i386/align-branch-1f.d 2019-11-25 14:01:00.680325567 +0000 +@@ -0,0 +1,77 @@ ++#source: align-branch-1.s ++#as: -malign-branch-boundary=32 -malign-branch=jcc+jmp ++#objdump: -dw ++ ++.*: +file format .* ++ ++Disassembly of section .text: ++ ++0+ : ++ 0: 65 a3 01 00 00 00 mov %eax,%gs:0x1 ++ 6: 55 push %ebp ++ 7: 55 push %ebp ++ 8: 55 push %ebp ++ 9: 55 push %ebp ++ a: 89 e5 mov %esp,%ebp ++ c: 89 7d f8 mov %edi,-0x8\(%ebp\) ++ f: 89 75 f4 mov %esi,-0xc\(%ebp\) ++ 12: 89 75 f4 mov %esi,-0xc\(%ebp\) ++ 15: 89 75 f4 mov %esi,-0xc\(%ebp\) ++ 18: 89 75 f4 mov %esi,-0xc\(%ebp\) ++ 1b: 89 75 f4 mov %esi,-0xc\(%ebp\) ++ 1e: 39 c5 cmp %eax,%ebp ++ 20: 74 5c je 7e ++ 22: 89 73 f4 mov %esi,-0xc\(%ebx\) ++ 25: 89 75 f4 mov %esi,-0xc\(%ebp\) ++ 28: 89 7d f8 mov %edi,-0x8\(%ebp\) ++ 2b: 89 75 f4 mov %esi,-0xc\(%ebp\) ++ 2e: 89 75 f4 mov %esi,-0xc\(%ebp\) ++ 31: 89 75 f4 mov %esi,-0xc\(%ebp\) ++ 34: 89 75 f4 mov %esi,-0xc\(%ebp\) ++ 37: 89 75 f4 mov %esi,-0xc\(%ebp\) ++ 3a: 5d pop %ebp ++ 3b: 5d pop %ebp ++ 3c: 5d pop %ebp ++ 3d: 74 3f je 7e ++ 3f: 5d pop %ebp ++ 40: 74 3c je 7e ++ 42: 89 44 24 fc mov %eax,-0x4\(%esp\) ++ 46: 89 75 f4 mov %esi,-0xc\(%ebp\) ++ 49: 89 7d f8 mov %edi,-0x8\(%ebp\) ++ 4c: 89 75 f4 mov %esi,-0xc\(%ebp\) ++ 4f: 89 75 f4 mov %esi,-0xc\(%ebp\) ++ 52: 89 75 f4 mov %esi,-0xc\(%ebp\) ++ 55: 89 75 f4 mov %esi,-0xc\(%ebp\) ++ 58: 89 75 f4 mov %esi,-0xc\(%ebp\) ++ 5b: 5d pop %ebp ++ 5c: eb 27 jmp 85 ++ 5e: 66 90 xchg %ax,%ax ++ 60: eb 23 jmp 85 ++ 62: eb 21 jmp 85 ++ 64: 89 45 fc mov %eax,-0x4\(%ebp\) ++ 67: 89 75 f4 mov %esi,-0xc\(%ebp\) ++ 6a: 89 7d f8 mov %edi,-0x8\(%ebp\) ++ 6d: 89 75 f4 mov %esi,-0xc\(%ebp\) ++ 70: 89 75 f4 mov %esi,-0xc\(%ebp\) ++ 73: 89 75 f4 mov %esi,-0xc\(%ebp\) ++ 76: 5d pop %ebp ++ 77: 5d pop %ebp ++ 78: 39 c5 cmp %eax,%ebp ++ 7a: 74 02 je 7e ++ 7c: eb 07 jmp 85 ++ 7e: 36 8b 45 f4 mov %ss:-0xc\(%ebp\),%eax ++ 82: 89 45 fc mov %eax,-0x4\(%ebp\) ++ 85: 89 b5 50 fb ff ff mov %esi,-0x4b0\(%ebp\) ++ 8b: 89 b5 50 fb ff ff mov %esi,-0x4b0\(%ebp\) ++ 91: 89 b5 50 fb ff ff mov %esi,-0x4b0\(%ebp\) ++ 97: 89 b5 50 fb ff ff mov %esi,-0x4b0\(%ebp\) ++ 9d: 89 75 0c mov %esi,0xc\(%ebp\) ++ a0: e9 [0-9a-f ]+ jmp .* ++ a5: 89 b5 50 fb ff ff mov %esi,-0x4b0\(%ebp\) ++ ab: 89 b5 50 fb ff ff mov %esi,-0x4b0\(%ebp\) ++ b1: 89 b5 50 fb ff ff mov %esi,-0x4b0\(%ebp\) ++ b7: 89 b5 50 fb ff ff mov %esi,-0x4b0\(%ebp\) ++ bd: 89 75 00 mov %esi,0x0\(%ebp\) ++ c0: 74 c3 je 85 ++ c2: 74 c1 je 85 ++#pass +diff -rupN binutils-2.32/gas/testsuite/gas/i386/align-branch-1g.d binutils.new/gas/testsuite/gas/i386/align-branch-1g.d +--- binutils-2.32/gas/testsuite/gas/i386/align-branch-1g.d 1970-01-01 01:00:00.000000000 +0100 ++++ binutils.new/gas/testsuite/gas/i386/align-branch-1g.d 2019-11-25 14:01:00.680325567 +0000 +@@ -0,0 +1,77 @@ ++#source: align-branch-1.s ++#as: -mbranches-within-32B-boundaries ++#objdump: -dw ++ ++.*: +file format .* ++ ++Disassembly of section .text: ++ ++0+ : ++ 0: 65 65 65 a3 01 00 00 00 gs gs mov %eax,%gs:0x1 ++ 8: 55 push %ebp ++ 9: 55 push %ebp ++ a: 55 push %ebp ++ b: 55 push %ebp ++ c: 89 e5 mov %esp,%ebp ++ e: 89 7d f8 mov %edi,-0x8\(%ebp\) ++ 11: 89 75 f4 mov %esi,-0xc\(%ebp\) ++ 14: 89 75 f4 mov %esi,-0xc\(%ebp\) ++ 17: 89 75 f4 mov %esi,-0xc\(%ebp\) ++ 1a: 89 75 f4 mov %esi,-0xc\(%ebp\) ++ 1d: 89 75 f4 mov %esi,-0xc\(%ebp\) ++ 20: 39 c5 cmp %eax,%ebp ++ 22: 74 5e je 82 ++ 24: 3e 89 73 f4 mov %esi,%ds:-0xc\(%ebx\) ++ 28: 89 75 f4 mov %esi,-0xc\(%ebp\) ++ 2b: 89 7d f8 mov %edi,-0x8\(%ebp\) ++ 2e: 89 75 f4 mov %esi,-0xc\(%ebp\) ++ 31: 89 75 f4 mov %esi,-0xc\(%ebp\) ++ 34: 89 75 f4 mov %esi,-0xc\(%ebp\) ++ 37: 89 75 f4 mov %esi,-0xc\(%ebp\) ++ 3a: 89 75 f4 mov %esi,-0xc\(%ebp\) ++ 3d: 5d pop %ebp ++ 3e: 5d pop %ebp ++ 3f: 5d pop %ebp ++ 40: 74 40 je 82 ++ 42: 5d pop %ebp ++ 43: 74 3d je 82 ++ 45: 36 89 44 24 fc mov %eax,%ss:-0x4\(%esp\) ++ 4a: 89 75 f4 mov %esi,-0xc\(%ebp\) ++ 4d: 89 7d f8 mov %edi,-0x8\(%ebp\) ++ 50: 89 75 f4 mov %esi,-0xc\(%ebp\) ++ 53: 89 75 f4 mov %esi,-0xc\(%ebp\) ++ 56: 89 75 f4 mov %esi,-0xc\(%ebp\) ++ 59: 89 75 f4 mov %esi,-0xc\(%ebp\) ++ 5c: 89 75 f4 mov %esi,-0xc\(%ebp\) ++ 5f: 5d pop %ebp ++ 60: eb 26 jmp 88 ++ 62: eb 24 jmp 88 ++ 64: eb 22 jmp 88 ++ 66: 89 45 fc mov %eax,-0x4\(%ebp\) ++ 69: 89 75 f4 mov %esi,-0xc\(%ebp\) ++ 6c: 89 7d f8 mov %edi,-0x8\(%ebp\) ++ 6f: 89 75 f4 mov %esi,-0xc\(%ebp\) ++ 72: 89 75 f4 mov %esi,-0xc\(%ebp\) ++ 75: 89 75 f4 mov %esi,-0xc\(%ebp\) ++ 78: 5d pop %ebp ++ 79: 5d pop %ebp ++ 7a: 39 c5 cmp %eax,%ebp ++ 7c: 74 04 je 82 ++ 7e: 66 90 xchg %ax,%ax ++ 80: eb 06 jmp 88 ++ 82: 8b 45 f4 mov -0xc\(%ebp\),%eax ++ 85: 89 45 fc mov %eax,-0x4\(%ebp\) ++ 88: 89 b5 50 fb ff ff mov %esi,-0x4b0\(%ebp\) ++ 8e: 89 b5 50 fb ff ff mov %esi,-0x4b0\(%ebp\) ++ 94: 89 b5 50 fb ff ff mov %esi,-0x4b0\(%ebp\) ++ 9a: 89 b5 50 fb ff ff mov %esi,-0x4b0\(%ebp\) ++ a0: 89 75 0c mov %esi,0xc\(%ebp\) ++ a3: e9 [0-9a-f ]+ jmp .* ++ a8: 89 b5 50 fb ff ff mov %esi,-0x4b0\(%ebp\) ++ ae: 89 b5 50 fb ff ff mov %esi,-0x4b0\(%ebp\) ++ b4: 89 b5 50 fb ff ff mov %esi,-0x4b0\(%ebp\) ++ ba: 89 b5 50 fb ff ff mov %esi,-0x4b0\(%ebp\) ++ c0: 89 75 00 mov %esi,0x0\(%ebp\) ++ c3: 74 c3 je 88 ++ c5: 74 c1 je 88 ++#pass +diff -rupN binutils-2.32/gas/testsuite/gas/i386/align-branch-1h.d binutils.new/gas/testsuite/gas/i386/align-branch-1h.d +--- binutils-2.32/gas/testsuite/gas/i386/align-branch-1h.d 1970-01-01 01:00:00.000000000 +0100 ++++ binutils.new/gas/testsuite/gas/i386/align-branch-1h.d 2019-11-25 14:01:00.680325567 +0000 +@@ -0,0 +1,76 @@ ++#source: align-branch-1.s ++#as: -mbranches-within-32B-boundaries -malign-branch-boundary=0 ++#objdump: -dw ++ ++.*: +file format .* ++ ++Disassembly of section .text: ++ ++0+ : ++ 0: 65 a3 01 00 00 00 mov %eax,%gs:0x1 ++ 6: 55 push %ebp ++ 7: 55 push %ebp ++ 8: 55 push %ebp ++ 9: 55 push %ebp ++ a: 89 e5 mov %esp,%ebp ++ c: 89 7d f8 mov %edi,-0x8\(%ebp\) ++ f: 89 75 f4 mov %esi,-0xc\(%ebp\) ++ 12: 89 75 f4 mov %esi,-0xc\(%ebp\) ++ 15: 89 75 f4 mov %esi,-0xc\(%ebp\) ++ 18: 89 75 f4 mov %esi,-0xc\(%ebp\) ++ 1b: 89 75 f4 mov %esi,-0xc\(%ebp\) ++ 1e: 39 c5 cmp %eax,%ebp ++ 20: 74 5a je 7c ++ 22: 89 73 f4 mov %esi,-0xc\(%ebx\) ++ 25: 89 75 f4 mov %esi,-0xc\(%ebp\) ++ 28: 89 7d f8 mov %edi,-0x8\(%ebp\) ++ 2b: 89 75 f4 mov %esi,-0xc\(%ebp\) ++ 2e: 89 75 f4 mov %esi,-0xc\(%ebp\) ++ 31: 89 75 f4 mov %esi,-0xc\(%ebp\) ++ 34: 89 75 f4 mov %esi,-0xc\(%ebp\) ++ 37: 89 75 f4 mov %esi,-0xc\(%ebp\) ++ 3a: 5d pop %ebp ++ 3b: 5d pop %ebp ++ 3c: 5d pop %ebp ++ 3d: 74 3d je 7c ++ 3f: 5d pop %ebp ++ 40: 74 3a je 7c ++ 42: 89 44 24 fc mov %eax,-0x4\(%esp\) ++ 46: 89 75 f4 mov %esi,-0xc\(%ebp\) ++ 49: 89 7d f8 mov %edi,-0x8\(%ebp\) ++ 4c: 89 75 f4 mov %esi,-0xc\(%ebp\) ++ 4f: 89 75 f4 mov %esi,-0xc\(%ebp\) ++ 52: 89 75 f4 mov %esi,-0xc\(%ebp\) ++ 55: 89 75 f4 mov %esi,-0xc\(%ebp\) ++ 58: 89 75 f4 mov %esi,-0xc\(%ebp\) ++ 5b: 5d pop %ebp ++ 5c: eb 24 jmp 82 ++ 5e: eb 22 jmp 82 ++ 60: eb 20 jmp 82 ++ 62: 89 45 fc mov %eax,-0x4\(%ebp\) ++ 65: 89 75 f4 mov %esi,-0xc\(%ebp\) ++ 68: 89 7d f8 mov %edi,-0x8\(%ebp\) ++ 6b: 89 75 f4 mov %esi,-0xc\(%ebp\) ++ 6e: 89 75 f4 mov %esi,-0xc\(%ebp\) ++ 71: 89 75 f4 mov %esi,-0xc\(%ebp\) ++ 74: 5d pop %ebp ++ 75: 5d pop %ebp ++ 76: 39 c5 cmp %eax,%ebp ++ 78: 74 02 je 7c ++ 7a: eb 06 jmp 82 ++ 7c: 8b 45 f4 mov -0xc\(%ebp\),%eax ++ 7f: 89 45 fc mov %eax,-0x4\(%ebp\) ++ 82: 89 b5 50 fb ff ff mov %esi,-0x4b0\(%ebp\) ++ 88: 89 b5 50 fb ff ff mov %esi,-0x4b0\(%ebp\) ++ 8e: 89 b5 50 fb ff ff mov %esi,-0x4b0\(%ebp\) ++ 94: 89 b5 50 fb ff ff mov %esi,-0x4b0\(%ebp\) ++ 9a: 89 75 0c mov %esi,0xc\(%ebp\) ++ 9d: e9 [0-9a-f ]+ jmp .* ++ a2: 89 b5 50 fb ff ff mov %esi,-0x4b0\(%ebp\) ++ a8: 89 b5 50 fb ff ff mov %esi,-0x4b0\(%ebp\) ++ ae: 89 b5 50 fb ff ff mov %esi,-0x4b0\(%ebp\) ++ b4: 89 b5 50 fb ff ff mov %esi,-0x4b0\(%ebp\) ++ ba: 89 75 00 mov %esi,0x0\(%ebp\) ++ bd: 74 c3 je 82 ++ bf: 74 c1 je 82 ++#pass +diff -rupN binutils-2.32/gas/testsuite/gas/i386/align-branch-1.s binutils.new/gas/testsuite/gas/i386/align-branch-1.s +--- binutils-2.32/gas/testsuite/gas/i386/align-branch-1.s 1970-01-01 01:00:00.000000000 +0100 ++++ binutils.new/gas/testsuite/gas/i386/align-branch-1.s 2019-11-25 14:01:00.632325883 +0000 +@@ -0,0 +1,72 @@ ++ .text ++ .globl foo ++ .p2align 4 ++foo: ++ movl %eax, %gs:0x1 ++ pushl %ebp ++ pushl %ebp ++ pushl %ebp ++ pushl %ebp ++ movl %esp, %ebp ++ movl %edi, -8(%ebp) ++ movl %esi, -12(%ebp) ++ movl %esi, -12(%ebp) ++ movl %esi, -12(%ebp) ++ movl %esi, -12(%ebp) ++ movl %esi, -12(%ebp) ++ cmp %eax, %ebp ++ je .L_2 ++ movl %esi, -12(%ebx) ++ movl %esi, -12(%ebp) ++ movl %edi, -8(%ebp) ++ movl %esi, -12(%ebp) ++ movl %esi, -12(%ebp) ++ movl %esi, -12(%ebp) ++ movl %esi, -12(%ebp) ++ movl %esi, -12(%ebp) ++ popl %ebp ++ popl %ebp ++ popl %ebp ++ je .L_2 ++ popl %ebp ++ je .L_2 ++ movl %eax, -4(%esp) ++ movl %esi, -12(%ebp) ++ movl %edi, -8(%ebp) ++ movl %esi, -12(%ebp) ++ movl %esi, -12(%ebp) ++ movl %esi, -12(%ebp) ++ movl %esi, -12(%ebp) ++ movl %esi, -12(%ebp) ++ popl %ebp ++ jmp .L_3 ++ jmp .L_3 ++ jmp .L_3 ++ movl %eax, -4(%ebp) ++ movl %esi, -12(%ebp) ++ movl %edi, -8(%ebp) ++ movl %esi, -12(%ebp) ++ movl %esi, -12(%ebp) ++ movl %esi, -12(%ebp) ++ popl %ebp ++ popl %ebp ++ cmp %eax, %ebp ++ je .L_2 ++ jmp .L_3 ++.L_2: ++ movl -12(%ebp), %eax ++ movl %eax, -4(%ebp) ++.L_3: ++ movl %esi, -1200(%ebp) ++ movl %esi, -1200(%ebp) ++ movl %esi, -1200(%ebp) ++ movl %esi, -1200(%ebp) ++ movl %esi, 12(%ebp) ++ jmp bar ++ movl %esi, -1200(%ebp) ++ movl %esi, -1200(%ebp) ++ movl %esi, -1200(%ebp) ++ movl %esi, -1200(%ebp) ++ movl %esi, (%ebp) ++ je .L_3 ++ je .L_3 +diff -rupN binutils-2.32/gas/testsuite/gas/i386/align-branch-2a.d binutils.new/gas/testsuite/gas/i386/align-branch-2a.d +--- binutils-2.32/gas/testsuite/gas/i386/align-branch-2a.d 1970-01-01 01:00:00.000000000 +0100 ++++ binutils.new/gas/testsuite/gas/i386/align-branch-2a.d 2019-11-25 14:01:00.680325567 +0000 +@@ -0,0 +1,55 @@ ++#source: align-branch-2.s ++#as: -malign-branch-boundary=32 -malign-branch=fused+jcc+jmp ++#objdump: -dw ++ ++.*: +file format .* ++ ++Disassembly of section .text: ++ ++0+ : ++ 0: 64 a3 01 00 00 00 mov %eax,%fs:0x1 ++ 6: 55 push %ebp ++ 7: 55 push %ebp ++ 8: 55 push %ebp ++ 9: 55 push %ebp ++ a: 89 e5 mov %esp,%ebp ++ c: 89 75 f4 mov %esi,-0xc\(%ebp\) ++ f: 89 75 f4 mov %esi,-0xc\(%ebp\) ++ 12: 89 75 f4 mov %esi,-0xc\(%ebp\) ++ 15: 89 75 f4 mov %esi,-0xc\(%ebp\) ++ 18: 89 75 f4 mov %esi,-0xc\(%ebp\) ++ 1b: 89 75 f4 mov %esi,-0xc\(%ebp\) ++ 1e: ff e0 jmp \*%eax ++ 20: 55 push %ebp ++ 21: 55 push %ebp ++ 22: 64 a3 01 00 00 00 mov %eax,%fs:0x1 ++ 28: 89 e5 mov %esp,%ebp ++ 2a: 89 75 f4 mov %esi,-0xc\(%ebp\) ++ 2d: 89 75 f4 mov %esi,-0xc\(%ebp\) ++ 30: 89 75 f4 mov %esi,-0xc\(%ebp\) ++ 33: 89 75 f4 mov %esi,-0xc\(%ebp\) ++ 36: 89 75 f4 mov %esi,-0xc\(%ebp\) ++ 39: 89 75 f4 mov %esi,-0xc\(%ebp\) ++ 3c: ff d0 call \*%eax ++ 3e: 89 75 f4 mov %esi,-0xc\(%ebp\) ++ 41: 55 push %ebp ++ 42: 55 push %ebp ++ 43: 64 a3 01 00 00 00 mov %eax,%fs:0x1 ++ 49: 89 e5 mov %esp,%ebp ++ 4b: 89 75 f4 mov %esi,-0xc\(%ebp\) ++ 4e: 89 75 f4 mov %esi,-0xc\(%ebp\) ++ 51: 89 75 f4 mov %esi,-0xc\(%ebp\) ++ 54: 89 75 f4 mov %esi,-0xc\(%ebp\) ++ 57: e8 [0-9a-f ]+ call .* ++ 5c: 89 75 f4 mov %esi,-0xc\(%ebp\) ++ 5f: 55 push %ebp ++ 60: 55 push %ebp ++ 61: 55 push %ebp ++ 62: 55 push %ebp ++ 63: 64 a3 01 00 00 00 mov %eax,%fs:0x1 ++ 69: 89 e5 mov %esp,%ebp ++ 6b: 89 75 f4 mov %esi,-0xc\(%ebp\) ++ 6e: 89 75 f4 mov %esi,-0xc\(%ebp\) ++ 71: ff 15 00 00 00 00 call \*0x0 ++ 77: 55 push %ebp ++#pass +diff -rupN binutils-2.32/gas/testsuite/gas/i386/align-branch-2b.d binutils.new/gas/testsuite/gas/i386/align-branch-2b.d +--- binutils-2.32/gas/testsuite/gas/i386/align-branch-2b.d 1970-01-01 01:00:00.000000000 +0100 ++++ binutils.new/gas/testsuite/gas/i386/align-branch-2b.d 2019-11-25 14:01:00.680325567 +0000 +@@ -0,0 +1,55 @@ ++#source: align-branch-2.s ++#as: -malign-branch-boundary=32 -malign-branch=indirect ++#objdump: -dw ++ ++.*: +file format .* ++ ++Disassembly of section .text: ++ ++0+ : ++ 0: 64 64 64 a3 01 00 00 00 fs fs mov %eax,%fs:0x1 ++ 8: 55 push %ebp ++ 9: 55 push %ebp ++ a: 55 push %ebp ++ b: 55 push %ebp ++ c: 89 e5 mov %esp,%ebp ++ e: 89 75 f4 mov %esi,-0xc\(%ebp\) ++ 11: 89 75 f4 mov %esi,-0xc\(%ebp\) ++ 14: 89 75 f4 mov %esi,-0xc\(%ebp\) ++ 17: 89 75 f4 mov %esi,-0xc\(%ebp\) ++ 1a: 89 75 f4 mov %esi,-0xc\(%ebp\) ++ 1d: 89 75 f4 mov %esi,-0xc\(%ebp\) ++ 20: ff e0 jmp \*%eax ++ 22: 3e 3e 55 ds ds push %ebp ++ 25: 55 push %ebp ++ 26: 64 a3 01 00 00 00 mov %eax,%fs:0x1 ++ 2c: 89 e5 mov %esp,%ebp ++ 2e: 89 75 f4 mov %esi,-0xc\(%ebp\) ++ 31: 89 75 f4 mov %esi,-0xc\(%ebp\) ++ 34: 89 75 f4 mov %esi,-0xc\(%ebp\) ++ 37: 89 75 f4 mov %esi,-0xc\(%ebp\) ++ 3a: 89 75 f4 mov %esi,-0xc\(%ebp\) ++ 3d: 89 75 f4 mov %esi,-0xc\(%ebp\) ++ 40: ff d0 call \*%eax ++ 42: 89 75 f4 mov %esi,-0xc\(%ebp\) ++ 45: 55 push %ebp ++ 46: 55 push %ebp ++ 47: 64 a3 01 00 00 00 mov %eax,%fs:0x1 ++ 4d: 89 e5 mov %esp,%ebp ++ 4f: 89 75 f4 mov %esi,-0xc\(%ebp\) ++ 52: 89 75 f4 mov %esi,-0xc\(%ebp\) ++ 55: 89 75 f4 mov %esi,-0xc\(%ebp\) ++ 58: 89 75 f4 mov %esi,-0xc\(%ebp\) ++ 5b: e8 [0-9a-f ]+ call .* ++ 60: 89 75 f4 mov %esi,-0xc\(%ebp\) ++ 63: 55 push %ebp ++ 64: 55 push %ebp ++ 65: 55 push %ebp ++ 66: 55 push %ebp ++ 67: 64 a3 01 00 00 00 mov %eax,%fs:0x1 ++ 6d: 89 e5 mov %esp,%ebp ++ 6f: 89 75 f4 mov %esi,-0xc\(%ebp\) ++ 72: 89 75 f4 mov %esi,-0xc\(%ebp\) ++ 75: ff 15 00 00 00 00 call \*0x0 ++ 7b: 55 push %ebp ++#pass +diff -rupN binutils-2.32/gas/testsuite/gas/i386/align-branch-2c.d binutils.new/gas/testsuite/gas/i386/align-branch-2c.d +--- binutils-2.32/gas/testsuite/gas/i386/align-branch-2c.d 1970-01-01 01:00:00.000000000 +0100 ++++ binutils.new/gas/testsuite/gas/i386/align-branch-2c.d 2019-11-25 14:01:00.680325567 +0000 +@@ -0,0 +1,55 @@ ++#source: align-branch-2.s ++#as: -malign-branch-boundary=32 -malign-branch=indirect+call ++#objdump: -dw ++ ++.*: +file format .* ++ ++Disassembly of section .text: ++ ++0+ : ++ 0: 64 64 64 a3 01 00 00 00 fs fs mov %eax,%fs:0x1 ++ 8: 55 push %ebp ++ 9: 55 push %ebp ++ a: 55 push %ebp ++ b: 55 push %ebp ++ c: 89 e5 mov %esp,%ebp ++ e: 89 75 f4 mov %esi,-0xc\(%ebp\) ++ 11: 89 75 f4 mov %esi,-0xc\(%ebp\) ++ 14: 89 75 f4 mov %esi,-0xc\(%ebp\) ++ 17: 89 75 f4 mov %esi,-0xc\(%ebp\) ++ 1a: 89 75 f4 mov %esi,-0xc\(%ebp\) ++ 1d: 89 75 f4 mov %esi,-0xc\(%ebp\) ++ 20: ff e0 jmp \*%eax ++ 22: 3e 3e 55 ds ds push %ebp ++ 25: 55 push %ebp ++ 26: 64 a3 01 00 00 00 mov %eax,%fs:0x1 ++ 2c: 89 e5 mov %esp,%ebp ++ 2e: 89 75 f4 mov %esi,-0xc\(%ebp\) ++ 31: 89 75 f4 mov %esi,-0xc\(%ebp\) ++ 34: 89 75 f4 mov %esi,-0xc\(%ebp\) ++ 37: 89 75 f4 mov %esi,-0xc\(%ebp\) ++ 3a: 89 75 f4 mov %esi,-0xc\(%ebp\) ++ 3d: 89 75 f4 mov %esi,-0xc\(%ebp\) ++ 40: ff d0 call \*%eax ++ 42: 36 36 36 36 36 89 75 f4 ss ss ss ss mov %esi,%ss:-0xc\(%ebp\) ++ 4a: 55 push %ebp ++ 4b: 55 push %ebp ++ 4c: 64 a3 01 00 00 00 mov %eax,%fs:0x1 ++ 52: 89 e5 mov %esp,%ebp ++ 54: 89 75 f4 mov %esi,-0xc\(%ebp\) ++ 57: 89 75 f4 mov %esi,-0xc\(%ebp\) ++ 5a: 89 75 f4 mov %esi,-0xc\(%ebp\) ++ 5d: 89 75 f4 mov %esi,-0xc\(%ebp\) ++ 60: e8 [0-9a-f ]+ call .* ++ 65: 36 36 36 36 36 89 75 f4 ss ss ss ss mov %esi,%ss:-0xc\(%ebp\) ++ 6d: 3e 55 ds push %ebp ++ 6f: 55 push %ebp ++ 70: 55 push %ebp ++ 71: 55 push %ebp ++ 72: 64 a3 01 00 00 00 mov %eax,%fs:0x1 ++ 78: 89 e5 mov %esp,%ebp ++ 7a: 89 75 f4 mov %esi,-0xc\(%ebp\) ++ 7d: 89 75 f4 mov %esi,-0xc\(%ebp\) ++ 80: ff 15 00 00 00 00 call \*0x0 ++ 86: 55 push %ebp ++#pass +diff -rupN binutils-2.32/gas/testsuite/gas/i386/align-branch-2.s binutils.new/gas/testsuite/gas/i386/align-branch-2.s +--- binutils-2.32/gas/testsuite/gas/i386/align-branch-2.s 1970-01-01 01:00:00.000000000 +0100 ++++ binutils.new/gas/testsuite/gas/i386/align-branch-2.s 2019-11-25 14:01:00.680325567 +0000 +@@ -0,0 +1,49 @@ ++ .text ++ .globl foo ++ .p2align 4 ++foo: ++ movl %eax, %fs:0x1 ++ pushl %ebp ++ pushl %ebp ++ pushl %ebp ++ pushl %ebp ++ movl %esp, %ebp ++ movl %esi, -12(%ebp) ++ movl %esi, -12(%ebp) ++ movl %esi, -12(%ebp) ++ movl %esi, -12(%ebp) ++ movl %esi, -12(%ebp) ++ movl %esi, -12(%ebp) ++ jmp *%eax ++ pushl %ebp ++ pushl %ebp ++ movl %eax, %fs:0x1 ++ movl %esp, %ebp ++ movl %esi, -12(%ebp) ++ movl %esi, -12(%ebp) ++ movl %esi, -12(%ebp) ++ movl %esi, -12(%ebp) ++ movl %esi, -12(%ebp) ++ movl %esi, -12(%ebp) ++ call *%eax ++ movl %esi, -12(%ebp) ++ pushl %ebp ++ pushl %ebp ++ movl %eax, %fs:0x1 ++ movl %esp, %ebp ++ movl %esi, -12(%ebp) ++ movl %esi, -12(%ebp) ++ movl %esi, -12(%ebp) ++ movl %esi, -12(%ebp) ++ call foo ++ movl %esi, -12(%ebp) ++ pushl %ebp ++ pushl %ebp ++ pushl %ebp ++ pushl %ebp ++ movl %eax, %fs:0x1 ++ movl %esp, %ebp ++ movl %esi, -12(%ebp) ++ movl %esi, -12(%ebp) ++ call *foo ++ pushl %ebp +diff -rupN binutils-2.32/gas/testsuite/gas/i386/align-branch-3.d binutils.new/gas/testsuite/gas/i386/align-branch-3.d +--- binutils-2.32/gas/testsuite/gas/i386/align-branch-3.d 1970-01-01 01:00:00.000000000 +0100 ++++ binutils.new/gas/testsuite/gas/i386/align-branch-3.d 2019-11-25 14:01:00.680325567 +0000 +@@ -0,0 +1,33 @@ ++#as: -malign-branch-boundary=32 -malign-branch=indirect+call ++#objdump: -dw ++ ++.*: +file format .* ++ ++Disassembly of section .text: ++ ++0+ : ++ 0: 64 a3 01 00 00 00 mov %eax,%fs:0x1 ++ 6: 55 push %ebp ++ 7: 55 push %ebp ++ 8: 55 push %ebp ++ 9: 55 push %ebp ++ a: 89 e5 mov %esp,%ebp ++ c: 89 75 f4 mov %esi,-0xc\(%ebp\) ++ f: 89 75 f4 mov %esi,-0xc\(%ebp\) ++ 12: 89 75 f4 mov %esi,-0xc\(%ebp\) ++ 15: 89 75 f4 mov %esi,-0xc\(%ebp\) ++ 18: 89 75 f4 mov %esi,-0xc\(%ebp\) ++ 1b: 89 75 f4 mov %esi,-0xc\(%ebp\) ++ 1e: e8 fc ff ff ff call 1f ++ 23: 55 push %ebp ++ 24: 55 push %ebp ++ 25: 64 a3 01 00 00 00 mov %eax,%fs:0x1 ++ 2b: 89 e5 mov %esp,%ebp ++ 2d: 89 75 f4 mov %esi,-0xc\(%ebp\) ++ 30: 89 75 f4 mov %esi,-0xc\(%ebp\) ++ 33: 89 75 f4 mov %esi,-0xc\(%ebp\) ++ 36: 89 75 f4 mov %esi,-0xc\(%ebp\) ++ 39: 89 75 f4 mov %esi,-0xc\(%ebp\) ++ 3c: ff 91 00 00 00 00 call \*0x0\(%ecx\) ++ 42: 89 75 f4 mov %esi,-0xc\(%ebp\) ++#pass +diff -rupN binutils-2.32/gas/testsuite/gas/i386/align-branch-3.s binutils.new/gas/testsuite/gas/i386/align-branch-3.s +--- binutils-2.32/gas/testsuite/gas/i386/align-branch-3.s 1970-01-01 01:00:00.000000000 +0100 ++++ binutils.new/gas/testsuite/gas/i386/align-branch-3.s 2019-11-25 14:01:00.680325567 +0000 +@@ -0,0 +1,28 @@ ++ .text ++ .globl foo ++ .p2align 4 ++foo: ++ movl %eax, %fs:0x1 ++ pushl %ebp ++ pushl %ebp ++ pushl %ebp ++ pushl %ebp ++ movl %esp, %ebp ++ movl %esi, -12(%ebp) ++ movl %esi, -12(%ebp) ++ movl %esi, -12(%ebp) ++ movl %esi, -12(%ebp) ++ movl %esi, -12(%ebp) ++ movl %esi, -12(%ebp) ++ call ___tls_get_addr ++ pushl %ebp ++ pushl %ebp ++ movl %eax, %fs:0x1 ++ movl %esp, %ebp ++ movl %esi, -12(%ebp) ++ movl %esi, -12(%ebp) ++ movl %esi, -12(%ebp) ++ movl %esi, -12(%ebp) ++ movl %esi, -12(%ebp) ++ call *___tls_get_addr@GOT(%ecx) ++ movl %esi, -12(%ebp) +diff -rupN binutils-2.32/gas/testsuite/gas/i386/align-branch-4a.d binutils.new/gas/testsuite/gas/i386/align-branch-4a.d +--- binutils-2.32/gas/testsuite/gas/i386/align-branch-4a.d 1970-01-01 01:00:00.000000000 +0100 ++++ binutils.new/gas/testsuite/gas/i386/align-branch-4a.d 2019-11-25 14:01:00.680325567 +0000 +@@ -0,0 +1,36 @@ ++#source: align-branch-4.s ++#as: -malign-branch-boundary=32 -malign-branch=fused+jcc+jmp ++#objdump: -dw ++ ++.*: +file format .* ++ ++Disassembly of section .text: ++ ++0+ : ++ 0: 64 a3 01 00 00 00 mov %eax,%fs:0x1 ++ 6: 55 push %ebp ++ 7: 55 push %ebp ++ 8: 55 push %ebp ++ 9: 55 push %ebp ++ a: 55 push %ebp ++ b: 89 e5 mov %esp,%ebp ++ d: 89 75 f4 mov %esi,-0xc\(%ebp\) ++ 10: 89 75 f4 mov %esi,-0xc\(%ebp\) ++ 13: 89 75 f4 mov %esi,-0xc\(%ebp\) ++ 16: 89 75 f4 mov %esi,-0xc\(%ebp\) ++ 19: 89 75 f4 mov %esi,-0xc\(%ebp\) ++ 1c: 89 75 f4 mov %esi,-0xc\(%ebp\) ++ 1f: c3 ret ++ 20: 55 push %ebp ++ 21: 55 push %ebp ++ 22: 64 a3 01 00 00 00 mov %eax,%fs:0x1 ++ 28: 89 e5 mov %esp,%ebp ++ 2a: 89 75 f4 mov %esi,-0xc\(%ebp\) ++ 2d: 89 75 f4 mov %esi,-0xc\(%ebp\) ++ 30: 89 75 f4 mov %esi,-0xc\(%ebp\) ++ 33: 89 75 f4 mov %esi,-0xc\(%ebp\) ++ 36: 89 75 f4 mov %esi,-0xc\(%ebp\) ++ 39: 89 75 f4 mov %esi,-0xc\(%ebp\) ++ 3c: c2 1e 00 ret \$0x1e ++ 3f: 89 75 f4 mov %esi,-0xc\(%ebp\) ++#pass +diff -rupN binutils-2.32/gas/testsuite/gas/i386/align-branch-4b.d binutils.new/gas/testsuite/gas/i386/align-branch-4b.d +--- binutils-2.32/gas/testsuite/gas/i386/align-branch-4b.d 1970-01-01 01:00:00.000000000 +0100 ++++ binutils.new/gas/testsuite/gas/i386/align-branch-4b.d 2019-11-25 14:01:00.680325567 +0000 +@@ -0,0 +1,36 @@ ++#source: align-branch-4.s ++#as: -malign-branch-boundary=32 -malign-branch=ret ++#objdump: -dw ++ ++.*: +file format .* ++ ++Disassembly of section .text: ++ ++0+ : ++ 0: 64 64 a3 01 00 00 00 fs mov %eax,%fs:0x1 ++ 7: 55 push %ebp ++ 8: 55 push %ebp ++ 9: 55 push %ebp ++ a: 55 push %ebp ++ b: 55 push %ebp ++ c: 89 e5 mov %esp,%ebp ++ e: 89 75 f4 mov %esi,-0xc\(%ebp\) ++ 11: 89 75 f4 mov %esi,-0xc\(%ebp\) ++ 14: 89 75 f4 mov %esi,-0xc\(%ebp\) ++ 17: 89 75 f4 mov %esi,-0xc\(%ebp\) ++ 1a: 89 75 f4 mov %esi,-0xc\(%ebp\) ++ 1d: 89 75 f4 mov %esi,-0xc\(%ebp\) ++ 20: c3 ret ++ 21: 3e 3e 3e 55 ds ds ds push %ebp ++ 25: 55 push %ebp ++ 26: 64 a3 01 00 00 00 mov %eax,%fs:0x1 ++ 2c: 89 e5 mov %esp,%ebp ++ 2e: 89 75 f4 mov %esi,-0xc\(%ebp\) ++ 31: 89 75 f4 mov %esi,-0xc\(%ebp\) ++ 34: 89 75 f4 mov %esi,-0xc\(%ebp\) ++ 37: 89 75 f4 mov %esi,-0xc\(%ebp\) ++ 3a: 89 75 f4 mov %esi,-0xc\(%ebp\) ++ 3d: 89 75 f4 mov %esi,-0xc\(%ebp\) ++ 40: c2 1e 00 ret \$0x1e ++ 43: 89 75 f4 mov %esi,-0xc\(%ebp\) ++#pass +diff -rupN binutils-2.32/gas/testsuite/gas/i386/align-branch-4.s binutils.new/gas/testsuite/gas/i386/align-branch-4.s +--- binutils-2.32/gas/testsuite/gas/i386/align-branch-4.s 1970-01-01 01:00:00.000000000 +0100 ++++ binutils.new/gas/testsuite/gas/i386/align-branch-4.s 2019-11-25 14:01:00.680325567 +0000 +@@ -0,0 +1,30 @@ ++ .text ++ .globl foo ++ .p2align 4 ++foo: ++ movl %eax, %fs:0x1 ++ pushl %ebp ++ pushl %ebp ++ pushl %ebp ++ pushl %ebp ++ pushl %ebp ++ movl %esp, %ebp ++ movl %esi, -12(%ebp) ++ movl %esi, -12(%ebp) ++ movl %esi, -12(%ebp) ++ movl %esi, -12(%ebp) ++ movl %esi, -12(%ebp) ++ movl %esi, -12(%ebp) ++ ret ++ pushl %ebp ++ pushl %ebp ++ movl %eax, %fs:0x1 ++ movl %esp, %ebp ++ movl %esi, -12(%ebp) ++ movl %esi, -12(%ebp) ++ movl %esi, -12(%ebp) ++ movl %esi, -12(%ebp) ++ movl %esi, -12(%ebp) ++ movl %esi, -12(%ebp) ++ ret $30 ++ movl %esi, -12(%ebp) +diff -rupN binutils-2.32/gas/testsuite/gas/i386/align-branch-5.d binutils.new/gas/testsuite/gas/i386/align-branch-5.d +--- binutils-2.32/gas/testsuite/gas/i386/align-branch-5.d 1970-01-01 01:00:00.000000000 +0100 ++++ binutils.new/gas/testsuite/gas/i386/align-branch-5.d 2019-11-25 14:01:00.680325567 +0000 +@@ -0,0 +1,36 @@ ++#as: -malign-branch-boundary=32 -malign-branch=jcc+fused+jmp ++#objdump: -dw ++ ++.*: +file format .* ++ ++Disassembly of section .text: ++ ++0+ : ++ 0: c1 e9 02 shr \$0x2,%ecx ++ 3: c1 e9 02 shr \$0x2,%ecx ++ 6: c1 e9 02 shr \$0x2,%ecx ++ 9: 89 d1 mov %edx,%ecx ++ b: 31 c0 xor %eax,%eax ++ d: c1 e9 02 shr \$0x2,%ecx ++ 10: c1 e9 02 shr \$0x2,%ecx ++ 13: c1 e9 02 shr \$0x2,%ecx ++ 16: c1 e9 02 shr \$0x2,%ecx ++ 19: c1 e9 02 shr \$0x2,%ecx ++ 1c: c1 e9 02 shr \$0x2,%ecx ++ 1f: f6 c2 02 test \$0x2,%dl ++ 22: f3 ab rep stos %eax,%es:\(%edi\) ++ 24: 75 dd jne 3 ++ 26: 31 c0 xor %eax,%eax ++ 28: c1 e9 02 shr \$0x2,%ecx ++ 2b: c1 e9 02 shr \$0x2,%ecx ++ 2e: c1 e9 02 shr \$0x2,%ecx ++ 31: 89 d1 mov %edx,%ecx ++ 33: 31 c0 xor %eax,%eax ++ 35: c1 e9 02 shr \$0x2,%ecx ++ 38: c1 e9 02 shr \$0x2,%ecx ++ 3b: c1 e9 02 shr \$0x2,%ecx ++ 3e: f6 c2 02 test \$0x2,%dl ++ 41: e8 [0-9a-f ]+ call .* ++ 46: 75 e3 jne 2b ++ 48: 31 c0 xor %eax,%eax ++#pass +diff -rupN binutils-2.32/gas/testsuite/gas/i386/align-branch-5.s binutils.new/gas/testsuite/gas/i386/align-branch-5.s +--- binutils-2.32/gas/testsuite/gas/i386/align-branch-5.s 1970-01-01 01:00:00.000000000 +0100 ++++ binutils.new/gas/testsuite/gas/i386/align-branch-5.s 2019-11-25 14:01:00.680325567 +0000 +@@ -0,0 +1,32 @@ ++ .text ++ .p2align 4,,15 ++foo: ++ shrl $2, %ecx ++.L1: ++ shrl $2, %ecx ++ shrl $2, %ecx ++ movl %edx, %ecx ++ xorl %eax, %eax ++ shrl $2, %ecx ++ shrl $2, %ecx ++ shrl $2, %ecx ++ shrl $2, %ecx ++ shrl $2, %ecx ++ shrl $2, %ecx ++ testb $2, %dl ++ rep stosl ++ jne .L1 ++ xorl %eax, %eax ++ shrl $2, %ecx ++.L2: ++ shrl $2, %ecx ++ shrl $2, %ecx ++ movl %edx, %ecx ++ xorl %eax, %eax ++ shrl $2, %ecx ++ shrl $2, %ecx ++ shrl $2, %ecx ++ testb $2, %dl ++ call bar ++ jne .L2 ++ xorl %eax, %eax +diff -rupN binutils-2.32/gas/testsuite/gas/i386/i386.exp binutils.new/gas/testsuite/gas/i386/i386.exp +--- binutils-2.32/gas/testsuite/gas/i386/i386.exp 2019-01-19 16:01:33.000000000 +0000 ++++ binutils.new/gas/testsuite/gas/i386/i386.exp 2019-11-25 14:01:00.680325567 +0000 +@@ -472,6 +472,20 @@ if [expr ([istarget "i*86-*-*"] || [ist + run_dump_test "optimize-3" + run_dump_test "optimize-4" + run_dump_test "optimize-5" ++ run_dump_test "align-branch-1a" ++ run_dump_test "align-branch-1b" ++ run_dump_test "align-branch-1c" ++ run_dump_test "align-branch-1d" ++ run_dump_test "align-branch-1e" ++ run_dump_test "align-branch-1f" ++ run_dump_test "align-branch-1g" ++ run_dump_test "align-branch-1h" ++ run_dump_test "align-branch-2a" ++ run_dump_test "align-branch-2b" ++ run_dump_test "align-branch-2c" ++ run_dump_test "align-branch-4a" ++ run_dump_test "align-branch-4b" ++ run_dump_test "align-branch-5" + + # These tests require support for 8 and 16 bit relocs, + # so we only run them for ELF and COFF targets. +@@ -543,6 +557,10 @@ if [expr ([istarget "i*86-*-*"] || [ist + run_dump_test "evex-no-scale-32" + run_dump_test "property-1" + ++ if {[istarget "*-*-linux*"]} then { ++ run_dump_test "align-branch-3" ++ } ++ + if { [gas_64_check] } then { + run_dump_test "att-regs" + run_dump_test "intel-regs" +@@ -982,6 +1000,20 @@ if [expr ([istarget "i*86-*-*"] || [ista + run_dump_test "x86-64-optimize-4" + run_dump_test "x86-64-optimize-5" + run_dump_test "x86-64-optimize-6" ++ run_dump_test "x86-64-align-branch-1a" ++ run_dump_test "x86-64-align-branch-1b" ++ run_dump_test "x86-64-align-branch-1c" ++ run_dump_test "x86-64-align-branch-1d" ++ run_dump_test "x86-64-align-branch-1e" ++ run_dump_test "x86-64-align-branch-1f" ++ run_dump_test "x86-64-align-branch-1g" ++ run_dump_test "x86-64-align-branch-1h" ++ run_dump_test "x86-64-align-branch-2a" ++ run_dump_test "x86-64-align-branch-2b" ++ run_dump_test "x86-64-align-branch-2c" ++ run_dump_test "x86-64-align-branch-4a" ++ run_dump_test "x86-64-align-branch-4b" ++ run_dump_test "x86-64-align-branch-5" + + if { ![istarget "*-*-aix*"] + && ![istarget "*-*-beos*"] +@@ -1047,6 +1079,10 @@ if [expr ([istarget "i*86-*-*"] || [ista + + run_dump_test "evex-no-scale-64" + run_dump_test "x86-64-property-1" ++ ++ if {[istarget "*-*-linux*"]} then { ++ run_dump_test "x86-64-align-branch-3" ++ } + } + + set ASFLAGS "$old_ASFLAGS" +diff -rupN binutils-2.32/gas/testsuite/gas/i386/x86-64-align-branch-1a.d binutils.new/gas/testsuite/gas/i386/x86-64-align-branch-1a.d +--- binutils-2.32/gas/testsuite/gas/i386/x86-64-align-branch-1a.d 1970-01-01 01:00:00.000000000 +0100 ++++ binutils.new/gas/testsuite/gas/i386/x86-64-align-branch-1a.d 2019-11-25 14:01:00.680325567 +0000 +@@ -0,0 +1,75 @@ ++#source: x86-64-align-branch-1.s ++#as: -malign-branch-boundary=32 ++#objdump: -dw ++ ++.*: +file format .* ++ ++Disassembly of section .text: ++ ++0+ : ++ 0: 64 64 64 64 89 04 25 01 00 00 00 fs fs fs mov %eax,%fs:0x1 ++ b: 55 push %rbp ++ c: 55 push %rbp ++ d: 55 push %rbp ++ e: 48 89 e5 mov %rsp,%rbp ++ 11: 89 75 f4 mov %esi,-0xc\(%rbp\) ++ 14: 89 75 f4 mov %esi,-0xc\(%rbp\) ++ 17: 89 75 f4 mov %esi,-0xc\(%rbp\) ++ 1a: 89 75 f4 mov %esi,-0xc\(%rbp\) ++ 1d: 89 75 f4 mov %esi,-0xc\(%rbp\) ++ 20: 48 39 c5 cmp %rax,%rbp ++ 23: 74 5d je 82 ++ 25: 2e 89 75 f4 mov %esi,%cs:-0xc\(%rbp\) ++ 29: 89 75 f4 mov %esi,-0xc\(%rbp\) ++ 2c: 89 7d f8 mov %edi,-0x8\(%rbp\) ++ 2f: 89 75 f4 mov %esi,-0xc\(%rbp\) ++ 32: 89 75 f4 mov %esi,-0xc\(%rbp\) ++ 35: 89 75 f4 mov %esi,-0xc\(%rbp\) ++ 38: 89 75 f4 mov %esi,-0xc\(%rbp\) ++ 3b: 89 75 f4 mov %esi,-0xc\(%rbp\) ++ 3e: 5d pop %rbp ++ 3f: 5d pop %rbp ++ 40: 74 40 je 82 ++ 42: 5d pop %rbp ++ 43: 74 3d je 82 ++ 45: 2e 89 45 fc mov %eax,%cs:-0x4\(%rbp\) ++ 49: 89 75 f4 mov %esi,-0xc\(%rbp\) ++ 4c: 89 7d f8 mov %edi,-0x8\(%rbp\) ++ 4f: 89 75 f4 mov %esi,-0xc\(%rbp\) ++ 52: 89 75 f4 mov %esi,-0xc\(%rbp\) ++ 55: 89 75 f4 mov %esi,-0xc\(%rbp\) ++ 58: 89 75 f4 mov %esi,-0xc\(%rbp\) ++ 5b: 89 75 f4 mov %esi,-0xc\(%rbp\) ++ 5e: 5d pop %rbp ++ 5f: 5d pop %rbp ++ 60: eb 26 jmp 88 ++ 62: eb 24 jmp 88 ++ 64: eb 22 jmp 88 ++ 66: 89 45 fc mov %eax,-0x4\(%rbp\) ++ 69: 89 75 f4 mov %esi,-0xc\(%rbp\) ++ 6c: 89 7d f8 mov %edi,-0x8\(%rbp\) ++ 6f: 89 75 f4 mov %esi,-0xc\(%rbp\) ++ 72: 89 75 f4 mov %esi,-0xc\(%rbp\) ++ 75: 89 75 f4 mov %esi,-0xc\(%rbp\) ++ 78: 5d pop %rbp ++ 79: 5d pop %rbp ++ 7a: 48 39 c5 cmp %rax,%rbp ++ 7d: 74 03 je 82 ++ 7f: 90 nop ++ 80: eb 06 jmp 88 ++ 82: 8b 45 f4 mov -0xc\(%rbp\),%eax ++ 85: 89 45 fc mov %eax,-0x4\(%rbp\) ++ 88: 89 b5 50 fb ff ff mov %esi,-0x4b0\(%rbp\) ++ 8e: 89 b5 50 fb ff ff mov %esi,-0x4b0\(%rbp\) ++ 94: 89 b5 50 fb ff ff mov %esi,-0x4b0\(%rbp\) ++ 9a: 89 b5 50 fb ff ff mov %esi,-0x4b0\(%rbp\) ++ a0: 89 b5 50 fb ff ff mov %esi,-0x4b0\(%rbp\) ++ a6: 89 b5 50 fb ff ff mov %esi,-0x4b0\(%rbp\) ++ ac: 89 b5 50 fb ff ff mov %esi,-0x4b0\(%rbp\) ++ b2: 89 b5 50 fb ff ff mov %esi,-0x4b0\(%rbp\) ++ b8: 89 b5 50 fb ff ff mov %esi,-0x4b0\(%rbp\) ++ be: 89 b5 50 fb ff ff mov %esi,-0x4b0\(%rbp\) ++ c4: eb c2 jmp 88 ++ c6: 5d pop %rbp ++ c7: c3 retq ++#pass +diff -rupN binutils-2.32/gas/testsuite/gas/i386/x86-64-align-branch-1b.d binutils.new/gas/testsuite/gas/i386/x86-64-align-branch-1b.d +--- binutils-2.32/gas/testsuite/gas/i386/x86-64-align-branch-1b.d 1970-01-01 01:00:00.000000000 +0100 ++++ binutils.new/gas/testsuite/gas/i386/x86-64-align-branch-1b.d 2019-11-25 14:01:00.680325567 +0000 +@@ -0,0 +1,75 @@ ++#source: x86-64-align-branch-1.s ++#as: -malign-branch-boundary=32 -malign-branch=fused+jcc+jmp ++#objdump: -dw ++ ++.*: +file format .* ++ ++Disassembly of section .text: ++ ++0+ : ++ 0: 64 64 64 64 89 04 25 01 00 00 00 fs fs fs mov %eax,%fs:0x1 ++ b: 55 push %rbp ++ c: 55 push %rbp ++ d: 55 push %rbp ++ e: 48 89 e5 mov %rsp,%rbp ++ 11: 89 75 f4 mov %esi,-0xc\(%rbp\) ++ 14: 89 75 f4 mov %esi,-0xc\(%rbp\) ++ 17: 89 75 f4 mov %esi,-0xc\(%rbp\) ++ 1a: 89 75 f4 mov %esi,-0xc\(%rbp\) ++ 1d: 89 75 f4 mov %esi,-0xc\(%rbp\) ++ 20: 48 39 c5 cmp %rax,%rbp ++ 23: 74 5d je 82 ++ 25: 2e 89 75 f4 mov %esi,%cs:-0xc\(%rbp\) ++ 29: 89 75 f4 mov %esi,-0xc\(%rbp\) ++ 2c: 89 7d f8 mov %edi,-0x8\(%rbp\) ++ 2f: 89 75 f4 mov %esi,-0xc\(%rbp\) ++ 32: 89 75 f4 mov %esi,-0xc\(%rbp\) ++ 35: 89 75 f4 mov %esi,-0xc\(%rbp\) ++ 38: 89 75 f4 mov %esi,-0xc\(%rbp\) ++ 3b: 89 75 f4 mov %esi,-0xc\(%rbp\) ++ 3e: 5d pop %rbp ++ 3f: 5d pop %rbp ++ 40: 74 40 je 82 ++ 42: 5d pop %rbp ++ 43: 74 3d je 82 ++ 45: 2e 89 45 fc mov %eax,%cs:-0x4\(%rbp\) ++ 49: 89 75 f4 mov %esi,-0xc\(%rbp\) ++ 4c: 89 7d f8 mov %edi,-0x8\(%rbp\) ++ 4f: 89 75 f4 mov %esi,-0xc\(%rbp\) ++ 52: 89 75 f4 mov %esi,-0xc\(%rbp\) ++ 55: 89 75 f4 mov %esi,-0xc\(%rbp\) ++ 58: 89 75 f4 mov %esi,-0xc\(%rbp\) ++ 5b: 89 75 f4 mov %esi,-0xc\(%rbp\) ++ 5e: 5d pop %rbp ++ 5f: 5d pop %rbp ++ 60: eb 26 jmp 88 ++ 62: eb 24 jmp 88 ++ 64: eb 22 jmp 88 ++ 66: 89 45 fc mov %eax,-0x4\(%rbp\) ++ 69: 89 75 f4 mov %esi,-0xc\(%rbp\) ++ 6c: 89 7d f8 mov %edi,-0x8\(%rbp\) ++ 6f: 89 75 f4 mov %esi,-0xc\(%rbp\) ++ 72: 89 75 f4 mov %esi,-0xc\(%rbp\) ++ 75: 89 75 f4 mov %esi,-0xc\(%rbp\) ++ 78: 5d pop %rbp ++ 79: 5d pop %rbp ++ 7a: 48 39 c5 cmp %rax,%rbp ++ 7d: 74 03 je 82 ++ 7f: 90 nop ++ 80: eb 06 jmp 88 ++ 82: 8b 45 f4 mov -0xc\(%rbp\),%eax ++ 85: 89 45 fc mov %eax,-0x4\(%rbp\) ++ 88: 89 b5 50 fb ff ff mov %esi,-0x4b0\(%rbp\) ++ 8e: 89 b5 50 fb ff ff mov %esi,-0x4b0\(%rbp\) ++ 94: 89 b5 50 fb ff ff mov %esi,-0x4b0\(%rbp\) ++ 9a: 89 b5 50 fb ff ff mov %esi,-0x4b0\(%rbp\) ++ a0: 89 b5 50 fb ff ff mov %esi,-0x4b0\(%rbp\) ++ a6: 89 b5 50 fb ff ff mov %esi,-0x4b0\(%rbp\) ++ ac: 89 b5 50 fb ff ff mov %esi,-0x4b0\(%rbp\) ++ b2: 89 b5 50 fb ff ff mov %esi,-0x4b0\(%rbp\) ++ b8: 89 b5 50 fb ff ff mov %esi,-0x4b0\(%rbp\) ++ be: 89 b5 50 fb ff ff mov %esi,-0x4b0\(%rbp\) ++ c4: eb c2 jmp 88 ++ c6: 5d pop %rbp ++ c7: c3 retq ++#pass +diff -rupN binutils-2.32/gas/testsuite/gas/i386/x86-64-align-branch-1c.d binutils.new/gas/testsuite/gas/i386/x86-64-align-branch-1c.d +--- binutils-2.32/gas/testsuite/gas/i386/x86-64-align-branch-1c.d 1970-01-01 01:00:00.000000000 +0100 ++++ binutils.new/gas/testsuite/gas/i386/x86-64-align-branch-1c.d 2019-11-25 14:01:00.680325567 +0000 +@@ -0,0 +1,75 @@ ++#source: x86-64-align-branch-1.s ++#as: -malign-branch-boundary=32 -malign-branch-prefix-size=1 ++#objdump: -dw ++ ++.*: +file format .* ++ ++Disassembly of section .text: ++ ++0+ : ++ 0: 64 89 04 25 01 00 00 00 mov %eax,%fs:0x1 ++ 8: 2e 55 cs push %rbp ++ a: 2e 55 cs push %rbp ++ c: 2e 55 cs push %rbp ++ e: 48 89 e5 mov %rsp,%rbp ++ 11: 89 75 f4 mov %esi,-0xc\(%rbp\) ++ 14: 89 75 f4 mov %esi,-0xc\(%rbp\) ++ 17: 89 75 f4 mov %esi,-0xc\(%rbp\) ++ 1a: 89 75 f4 mov %esi,-0xc\(%rbp\) ++ 1d: 89 75 f4 mov %esi,-0xc\(%rbp\) ++ 20: 48 39 c5 cmp %rax,%rbp ++ 23: 74 5d je 82 ++ 25: 2e 89 75 f4 mov %esi,%cs:-0xc\(%rbp\) ++ 29: 89 75 f4 mov %esi,-0xc\(%rbp\) ++ 2c: 89 7d f8 mov %edi,-0x8\(%rbp\) ++ 2f: 89 75 f4 mov %esi,-0xc\(%rbp\) ++ 32: 89 75 f4 mov %esi,-0xc\(%rbp\) ++ 35: 89 75 f4 mov %esi,-0xc\(%rbp\) ++ 38: 89 75 f4 mov %esi,-0xc\(%rbp\) ++ 3b: 89 75 f4 mov %esi,-0xc\(%rbp\) ++ 3e: 5d pop %rbp ++ 3f: 5d pop %rbp ++ 40: 74 40 je 82 ++ 42: 5d pop %rbp ++ 43: 74 3d je 82 ++ 45: 2e 89 45 fc mov %eax,%cs:-0x4\(%rbp\) ++ 49: 89 75 f4 mov %esi,-0xc\(%rbp\) ++ 4c: 89 7d f8 mov %edi,-0x8\(%rbp\) ++ 4f: 89 75 f4 mov %esi,-0xc\(%rbp\) ++ 52: 89 75 f4 mov %esi,-0xc\(%rbp\) ++ 55: 89 75 f4 mov %esi,-0xc\(%rbp\) ++ 58: 89 75 f4 mov %esi,-0xc\(%rbp\) ++ 5b: 89 75 f4 mov %esi,-0xc\(%rbp\) ++ 5e: 5d pop %rbp ++ 5f: 5d pop %rbp ++ 60: eb 26 jmp 88 ++ 62: eb 24 jmp 88 ++ 64: eb 22 jmp 88 ++ 66: 89 45 fc mov %eax,-0x4\(%rbp\) ++ 69: 89 75 f4 mov %esi,-0xc\(%rbp\) ++ 6c: 89 7d f8 mov %edi,-0x8\(%rbp\) ++ 6f: 89 75 f4 mov %esi,-0xc\(%rbp\) ++ 72: 89 75 f4 mov %esi,-0xc\(%rbp\) ++ 75: 89 75 f4 mov %esi,-0xc\(%rbp\) ++ 78: 5d pop %rbp ++ 79: 5d pop %rbp ++ 7a: 48 39 c5 cmp %rax,%rbp ++ 7d: 74 03 je 82 ++ 7f: 90 nop ++ 80: eb 06 jmp 88 ++ 82: 8b 45 f4 mov -0xc\(%rbp\),%eax ++ 85: 89 45 fc mov %eax,-0x4\(%rbp\) ++ 88: 89 b5 50 fb ff ff mov %esi,-0x4b0\(%rbp\) ++ 8e: 89 b5 50 fb ff ff mov %esi,-0x4b0\(%rbp\) ++ 94: 89 b5 50 fb ff ff mov %esi,-0x4b0\(%rbp\) ++ 9a: 89 b5 50 fb ff ff mov %esi,-0x4b0\(%rbp\) ++ a0: 89 b5 50 fb ff ff mov %esi,-0x4b0\(%rbp\) ++ a6: 89 b5 50 fb ff ff mov %esi,-0x4b0\(%rbp\) ++ ac: 89 b5 50 fb ff ff mov %esi,-0x4b0\(%rbp\) ++ b2: 89 b5 50 fb ff ff mov %esi,-0x4b0\(%rbp\) ++ b8: 89 b5 50 fb ff ff mov %esi,-0x4b0\(%rbp\) ++ be: 89 b5 50 fb ff ff mov %esi,-0x4b0\(%rbp\) ++ c4: eb c2 jmp 88 ++ c6: 5d pop %rbp ++ c7: c3 retq ++#pass +diff -rupN binutils-2.32/gas/testsuite/gas/i386/x86-64-align-branch-1d.d binutils.new/gas/testsuite/gas/i386/x86-64-align-branch-1d.d +--- binutils-2.32/gas/testsuite/gas/i386/x86-64-align-branch-1d.d 1970-01-01 01:00:00.000000000 +0100 ++++ binutils.new/gas/testsuite/gas/i386/x86-64-align-branch-1d.d 2019-11-25 14:01:00.680325567 +0000 +@@ -0,0 +1,74 @@ ++#source: x86-64-align-branch-1.s ++#as: -malign-branch-boundary=32 -malign-branch=fused+jcc ++#objdump: -dw ++ ++.*: +file format .* ++ ++Disassembly of section .text: ++ ++0+ : ++ 0: 64 64 64 64 89 04 25 01 00 00 00 fs fs fs mov %eax,%fs:0x1 ++ b: 55 push %rbp ++ c: 55 push %rbp ++ d: 55 push %rbp ++ e: 48 89 e5 mov %rsp,%rbp ++ 11: 89 75 f4 mov %esi,-0xc\(%rbp\) ++ 14: 89 75 f4 mov %esi,-0xc\(%rbp\) ++ 17: 89 75 f4 mov %esi,-0xc\(%rbp\) ++ 1a: 89 75 f4 mov %esi,-0xc\(%rbp\) ++ 1d: 89 75 f4 mov %esi,-0xc\(%rbp\) ++ 20: 48 39 c5 cmp %rax,%rbp ++ 23: 74 5b je 80 ++ 25: 2e 89 75 f4 mov %esi,%cs:-0xc\(%rbp\) ++ 29: 89 75 f4 mov %esi,-0xc\(%rbp\) ++ 2c: 89 7d f8 mov %edi,-0x8\(%rbp\) ++ 2f: 89 75 f4 mov %esi,-0xc\(%rbp\) ++ 32: 89 75 f4 mov %esi,-0xc\(%rbp\) ++ 35: 89 75 f4 mov %esi,-0xc\(%rbp\) ++ 38: 89 75 f4 mov %esi,-0xc\(%rbp\) ++ 3b: 89 75 f4 mov %esi,-0xc\(%rbp\) ++ 3e: 5d pop %rbp ++ 3f: 5d pop %rbp ++ 40: 74 3e je 80 ++ 42: 5d pop %rbp ++ 43: 74 3b je 80 ++ 45: 89 45 fc mov %eax,-0x4\(%rbp\) ++ 48: 89 75 f4 mov %esi,-0xc\(%rbp\) ++ 4b: 89 7d f8 mov %edi,-0x8\(%rbp\) ++ 4e: 89 75 f4 mov %esi,-0xc\(%rbp\) ++ 51: 89 75 f4 mov %esi,-0xc\(%rbp\) ++ 54: 89 75 f4 mov %esi,-0xc\(%rbp\) ++ 57: 89 75 f4 mov %esi,-0xc\(%rbp\) ++ 5a: 89 75 f4 mov %esi,-0xc\(%rbp\) ++ 5d: 5d pop %rbp ++ 5e: 5d pop %rbp ++ 5f: eb 25 jmp 86 ++ 61: eb 23 jmp 86 ++ 63: eb 21 jmp 86 ++ 65: 89 45 fc mov %eax,-0x4\(%rbp\) ++ 68: 89 75 f4 mov %esi,-0xc\(%rbp\) ++ 6b: 89 7d f8 mov %edi,-0x8\(%rbp\) ++ 6e: 89 75 f4 mov %esi,-0xc\(%rbp\) ++ 71: 89 75 f4 mov %esi,-0xc\(%rbp\) ++ 74: 89 75 f4 mov %esi,-0xc\(%rbp\) ++ 77: 5d pop %rbp ++ 78: 5d pop %rbp ++ 79: 48 39 c5 cmp %rax,%rbp ++ 7c: 74 02 je 80 ++ 7e: eb 06 jmp 86 ++ 80: 8b 45 f4 mov -0xc\(%rbp\),%eax ++ 83: 89 45 fc mov %eax,-0x4\(%rbp\) ++ 86: 89 b5 50 fb ff ff mov %esi,-0x4b0\(%rbp\) ++ 8c: 89 b5 50 fb ff ff mov %esi,-0x4b0\(%rbp\) ++ 92: 89 b5 50 fb ff ff mov %esi,-0x4b0\(%rbp\) ++ 98: 89 b5 50 fb ff ff mov %esi,-0x4b0\(%rbp\) ++ 9e: 89 b5 50 fb ff ff mov %esi,-0x4b0\(%rbp\) ++ a4: 89 b5 50 fb ff ff mov %esi,-0x4b0\(%rbp\) ++ aa: 89 b5 50 fb ff ff mov %esi,-0x4b0\(%rbp\) ++ b0: 89 b5 50 fb ff ff mov %esi,-0x4b0\(%rbp\) ++ b6: 89 b5 50 fb ff ff mov %esi,-0x4b0\(%rbp\) ++ bc: 89 b5 50 fb ff ff mov %esi,-0x4b0\(%rbp\) ++ c2: eb c2 jmp 86 ++ c4: 5d pop %rbp ++ c5: c3 retq ++#pass +diff -rupN binutils-2.32/gas/testsuite/gas/i386/x86-64-align-branch-1e.d binutils.new/gas/testsuite/gas/i386/x86-64-align-branch-1e.d +--- binutils-2.32/gas/testsuite/gas/i386/x86-64-align-branch-1e.d 1970-01-01 01:00:00.000000000 +0100 ++++ binutils.new/gas/testsuite/gas/i386/x86-64-align-branch-1e.d 2019-11-25 14:01:00.680325567 +0000 +@@ -0,0 +1,74 @@ ++#source: x86-64-align-branch-1.s ++#as: -malign-branch-boundary=32 -malign-branch=jcc ++#objdump: -dw ++ ++.*: +file format .* ++ ++Disassembly of section .text: ++ ++0+ : ++ 0: 64 89 04 25 01 00 00 00 mov %eax,%fs:0x1 ++ 8: 55 push %rbp ++ 9: 55 push %rbp ++ a: 55 push %rbp ++ b: 48 89 e5 mov %rsp,%rbp ++ e: 89 75 f4 mov %esi,-0xc\(%rbp\) ++ 11: 89 75 f4 mov %esi,-0xc\(%rbp\) ++ 14: 89 75 f4 mov %esi,-0xc\(%rbp\) ++ 17: 89 75 f4 mov %esi,-0xc\(%rbp\) ++ 1a: 89 75 f4 mov %esi,-0xc\(%rbp\) ++ 1d: 48 39 c5 cmp %rax,%rbp ++ 20: 74 5b je 7d ++ 22: 89 75 f4 mov %esi,-0xc\(%rbp\) ++ 25: 89 75 f4 mov %esi,-0xc\(%rbp\) ++ 28: 89 7d f8 mov %edi,-0x8\(%rbp\) ++ 2b: 89 75 f4 mov %esi,-0xc\(%rbp\) ++ 2e: 89 75 f4 mov %esi,-0xc\(%rbp\) ++ 31: 89 75 f4 mov %esi,-0xc\(%rbp\) ++ 34: 89 75 f4 mov %esi,-0xc\(%rbp\) ++ 37: 89 75 f4 mov %esi,-0xc\(%rbp\) ++ 3a: 5d pop %rbp ++ 3b: 5d pop %rbp ++ 3c: 74 3f je 7d ++ 3e: 2e 5d cs pop %rbp ++ 40: 74 3b je 7d ++ 42: 89 45 fc mov %eax,-0x4\(%rbp\) ++ 45: 89 75 f4 mov %esi,-0xc\(%rbp\) ++ 48: 89 7d f8 mov %edi,-0x8\(%rbp\) ++ 4b: 89 75 f4 mov %esi,-0xc\(%rbp\) ++ 4e: 89 75 f4 mov %esi,-0xc\(%rbp\) ++ 51: 89 75 f4 mov %esi,-0xc\(%rbp\) ++ 54: 89 75 f4 mov %esi,-0xc\(%rbp\) ++ 57: 89 75 f4 mov %esi,-0xc\(%rbp\) ++ 5a: 5d pop %rbp ++ 5b: 5d pop %rbp ++ 5c: eb 25 jmp 83 ++ 5e: eb 23 jmp 83 ++ 60: eb 21 jmp 83 ++ 62: 89 45 fc mov %eax,-0x4\(%rbp\) ++ 65: 89 75 f4 mov %esi,-0xc\(%rbp\) ++ 68: 89 7d f8 mov %edi,-0x8\(%rbp\) ++ 6b: 89 75 f4 mov %esi,-0xc\(%rbp\) ++ 6e: 89 75 f4 mov %esi,-0xc\(%rbp\) ++ 71: 89 75 f4 mov %esi,-0xc\(%rbp\) ++ 74: 5d pop %rbp ++ 75: 5d pop %rbp ++ 76: 48 39 c5 cmp %rax,%rbp ++ 79: 74 02 je 7d ++ 7b: eb 06 jmp 83 ++ 7d: 8b 45 f4 mov -0xc\(%rbp\),%eax ++ 80: 89 45 fc mov %eax,-0x4\(%rbp\) ++ 83: 89 b5 50 fb ff ff mov %esi,-0x4b0\(%rbp\) ++ 89: 89 b5 50 fb ff ff mov %esi,-0x4b0\(%rbp\) ++ 8f: 89 b5 50 fb ff ff mov %esi,-0x4b0\(%rbp\) ++ 95: 89 b5 50 fb ff ff mov %esi,-0x4b0\(%rbp\) ++ 9b: 89 b5 50 fb ff ff mov %esi,-0x4b0\(%rbp\) ++ a1: 89 b5 50 fb ff ff mov %esi,-0x4b0\(%rbp\) ++ a7: 89 b5 50 fb ff ff mov %esi,-0x4b0\(%rbp\) ++ ad: 89 b5 50 fb ff ff mov %esi,-0x4b0\(%rbp\) ++ b3: 89 b5 50 fb ff ff mov %esi,-0x4b0\(%rbp\) ++ b9: 89 b5 50 fb ff ff mov %esi,-0x4b0\(%rbp\) ++ bf: eb c2 jmp 83 ++ c1: 5d pop %rbp ++ c2: c3 retq ++#pass +diff -rupN binutils-2.32/gas/testsuite/gas/i386/x86-64-align-branch-1f.d binutils.new/gas/testsuite/gas/i386/x86-64-align-branch-1f.d +--- binutils-2.32/gas/testsuite/gas/i386/x86-64-align-branch-1f.d 1970-01-01 01:00:00.000000000 +0100 ++++ binutils.new/gas/testsuite/gas/i386/x86-64-align-branch-1f.d 2019-11-25 14:01:00.680325567 +0000 +@@ -0,0 +1,75 @@ ++#source: x86-64-align-branch-1.s ++#as: -malign-branch-boundary=32 -malign-branch=jcc+jmp ++#objdump: -dw ++ ++.*: +file format .* ++ ++Disassembly of section .text: ++ ++0+ : ++ 0: 64 89 04 25 01 00 00 00 mov %eax,%fs:0x1 ++ 8: 55 push %rbp ++ 9: 55 push %rbp ++ a: 55 push %rbp ++ b: 48 89 e5 mov %rsp,%rbp ++ e: 89 75 f4 mov %esi,-0xc\(%rbp\) ++ 11: 89 75 f4 mov %esi,-0xc\(%rbp\) ++ 14: 89 75 f4 mov %esi,-0xc\(%rbp\) ++ 17: 89 75 f4 mov %esi,-0xc\(%rbp\) ++ 1a: 89 75 f4 mov %esi,-0xc\(%rbp\) ++ 1d: 48 39 c5 cmp %rax,%rbp ++ 20: 74 5d je 7f ++ 22: 89 75 f4 mov %esi,-0xc\(%rbp\) ++ 25: 89 75 f4 mov %esi,-0xc\(%rbp\) ++ 28: 89 7d f8 mov %edi,-0x8\(%rbp\) ++ 2b: 89 75 f4 mov %esi,-0xc\(%rbp\) ++ 2e: 89 75 f4 mov %esi,-0xc\(%rbp\) ++ 31: 89 75 f4 mov %esi,-0xc\(%rbp\) ++ 34: 89 75 f4 mov %esi,-0xc\(%rbp\) ++ 37: 89 75 f4 mov %esi,-0xc\(%rbp\) ++ 3a: 5d pop %rbp ++ 3b: 5d pop %rbp ++ 3c: 74 41 je 7f ++ 3e: 2e 5d cs pop %rbp ++ 40: 74 3d je 7f ++ 42: 89 45 fc mov %eax,-0x4\(%rbp\) ++ 45: 89 75 f4 mov %esi,-0xc\(%rbp\) ++ 48: 89 7d f8 mov %edi,-0x8\(%rbp\) ++ 4b: 89 75 f4 mov %esi,-0xc\(%rbp\) ++ 4e: 89 75 f4 mov %esi,-0xc\(%rbp\) ++ 51: 89 75 f4 mov %esi,-0xc\(%rbp\) ++ 54: 89 75 f4 mov %esi,-0xc\(%rbp\) ++ 57: 89 75 f4 mov %esi,-0xc\(%rbp\) ++ 5a: 5d pop %rbp ++ 5b: 5d pop %rbp ++ 5c: eb 27 jmp 85 ++ 5e: 66 90 xchg %ax,%ax ++ 60: eb 23 jmp 85 ++ 62: eb 21 jmp 85 ++ 64: 89 45 fc mov %eax,-0x4\(%rbp\) ++ 67: 89 75 f4 mov %esi,-0xc\(%rbp\) ++ 6a: 89 7d f8 mov %edi,-0x8\(%rbp\) ++ 6d: 89 75 f4 mov %esi,-0xc\(%rbp\) ++ 70: 89 75 f4 mov %esi,-0xc\(%rbp\) ++ 73: 89 75 f4 mov %esi,-0xc\(%rbp\) ++ 76: 5d pop %rbp ++ 77: 5d pop %rbp ++ 78: 48 39 c5 cmp %rax,%rbp ++ 7b: 74 02 je 7f ++ 7d: eb 06 jmp 85 ++ 7f: 8b 45 f4 mov -0xc\(%rbp\),%eax ++ 82: 89 45 fc mov %eax,-0x4\(%rbp\) ++ 85: 89 b5 50 fb ff ff mov %esi,-0x4b0\(%rbp\) ++ 8b: 89 b5 50 fb ff ff mov %esi,-0x4b0\(%rbp\) ++ 91: 89 b5 50 fb ff ff mov %esi,-0x4b0\(%rbp\) ++ 97: 89 b5 50 fb ff ff mov %esi,-0x4b0\(%rbp\) ++ 9d: 89 b5 50 fb ff ff mov %esi,-0x4b0\(%rbp\) ++ a3: 89 b5 50 fb ff ff mov %esi,-0x4b0\(%rbp\) ++ a9: 89 b5 50 fb ff ff mov %esi,-0x4b0\(%rbp\) ++ af: 89 b5 50 fb ff ff mov %esi,-0x4b0\(%rbp\) ++ b5: 89 b5 50 fb ff ff mov %esi,-0x4b0\(%rbp\) ++ bb: 89 b5 50 fb ff ff mov %esi,-0x4b0\(%rbp\) ++ c1: eb c2 jmp 85 ++ c3: 5d pop %rbp ++ c4: c3 retq ++#pass +diff -rupN binutils-2.32/gas/testsuite/gas/i386/x86-64-align-branch-1g.d binutils.new/gas/testsuite/gas/i386/x86-64-align-branch-1g.d +--- binutils-2.32/gas/testsuite/gas/i386/x86-64-align-branch-1g.d 1970-01-01 01:00:00.000000000 +0100 ++++ binutils.new/gas/testsuite/gas/i386/x86-64-align-branch-1g.d 2019-11-25 14:01:00.680325567 +0000 +@@ -0,0 +1,75 @@ ++#source: x86-64-align-branch-1.s ++#as: -mbranches-within-32B-boundaries ++#objdump: -dw ++ ++.*: +file format .* ++ ++Disassembly of section .text: ++ ++0+ : ++ 0: 64 64 64 64 89 04 25 01 00 00 00 fs fs fs mov %eax,%fs:0x1 ++ b: 55 push %rbp ++ c: 55 push %rbp ++ d: 55 push %rbp ++ e: 48 89 e5 mov %rsp,%rbp ++ 11: 89 75 f4 mov %esi,-0xc\(%rbp\) ++ 14: 89 75 f4 mov %esi,-0xc\(%rbp\) ++ 17: 89 75 f4 mov %esi,-0xc\(%rbp\) ++ 1a: 89 75 f4 mov %esi,-0xc\(%rbp\) ++ 1d: 89 75 f4 mov %esi,-0xc\(%rbp\) ++ 20: 48 39 c5 cmp %rax,%rbp ++ 23: 74 5d je 82 ++ 25: 2e 89 75 f4 mov %esi,%cs:-0xc\(%rbp\) ++ 29: 89 75 f4 mov %esi,-0xc\(%rbp\) ++ 2c: 89 7d f8 mov %edi,-0x8\(%rbp\) ++ 2f: 89 75 f4 mov %esi,-0xc\(%rbp\) ++ 32: 89 75 f4 mov %esi,-0xc\(%rbp\) ++ 35: 89 75 f4 mov %esi,-0xc\(%rbp\) ++ 38: 89 75 f4 mov %esi,-0xc\(%rbp\) ++ 3b: 89 75 f4 mov %esi,-0xc\(%rbp\) ++ 3e: 5d pop %rbp ++ 3f: 5d pop %rbp ++ 40: 74 40 je 82 ++ 42: 5d pop %rbp ++ 43: 74 3d je 82 ++ 45: 2e 89 45 fc mov %eax,%cs:-0x4\(%rbp\) ++ 49: 89 75 f4 mov %esi,-0xc\(%rbp\) ++ 4c: 89 7d f8 mov %edi,-0x8\(%rbp\) ++ 4f: 89 75 f4 mov %esi,-0xc\(%rbp\) ++ 52: 89 75 f4 mov %esi,-0xc\(%rbp\) ++ 55: 89 75 f4 mov %esi,-0xc\(%rbp\) ++ 58: 89 75 f4 mov %esi,-0xc\(%rbp\) ++ 5b: 89 75 f4 mov %esi,-0xc\(%rbp\) ++ 5e: 5d pop %rbp ++ 5f: 5d pop %rbp ++ 60: eb 26 jmp 88 ++ 62: eb 24 jmp 88 ++ 64: eb 22 jmp 88 ++ 66: 89 45 fc mov %eax,-0x4\(%rbp\) ++ 69: 89 75 f4 mov %esi,-0xc\(%rbp\) ++ 6c: 89 7d f8 mov %edi,-0x8\(%rbp\) ++ 6f: 89 75 f4 mov %esi,-0xc\(%rbp\) ++ 72: 89 75 f4 mov %esi,-0xc\(%rbp\) ++ 75: 89 75 f4 mov %esi,-0xc\(%rbp\) ++ 78: 5d pop %rbp ++ 79: 5d pop %rbp ++ 7a: 48 39 c5 cmp %rax,%rbp ++ 7d: 74 03 je 82 ++ 7f: 90 nop ++ 80: eb 06 jmp 88 ++ 82: 8b 45 f4 mov -0xc\(%rbp\),%eax ++ 85: 89 45 fc mov %eax,-0x4\(%rbp\) ++ 88: 89 b5 50 fb ff ff mov %esi,-0x4b0\(%rbp\) ++ 8e: 89 b5 50 fb ff ff mov %esi,-0x4b0\(%rbp\) ++ 94: 89 b5 50 fb ff ff mov %esi,-0x4b0\(%rbp\) ++ 9a: 89 b5 50 fb ff ff mov %esi,-0x4b0\(%rbp\) ++ a0: 89 b5 50 fb ff ff mov %esi,-0x4b0\(%rbp\) ++ a6: 89 b5 50 fb ff ff mov %esi,-0x4b0\(%rbp\) ++ ac: 89 b5 50 fb ff ff mov %esi,-0x4b0\(%rbp\) ++ b2: 89 b5 50 fb ff ff mov %esi,-0x4b0\(%rbp\) ++ b8: 89 b5 50 fb ff ff mov %esi,-0x4b0\(%rbp\) ++ be: 89 b5 50 fb ff ff mov %esi,-0x4b0\(%rbp\) ++ c4: eb c2 jmp 88 ++ c6: 5d pop %rbp ++ c7: c3 retq ++#pass +diff -rupN binutils-2.32/gas/testsuite/gas/i386/x86-64-align-branch-1h.d binutils.new/gas/testsuite/gas/i386/x86-64-align-branch-1h.d +--- binutils-2.32/gas/testsuite/gas/i386/x86-64-align-branch-1h.d 1970-01-01 01:00:00.000000000 +0100 ++++ binutils.new/gas/testsuite/gas/i386/x86-64-align-branch-1h.d 2019-11-25 14:01:00.680325567 +0000 +@@ -0,0 +1,74 @@ ++#source: x86-64-align-branch-1.s ++#as: -mbranches-within-32B-boundaries -malign-branch-boundary=0 ++#objdump: -dw ++ ++.*: +file format .* ++ ++Disassembly of section .text: ++ ++0+ : ++ 0: 64 89 04 25 01 00 00 00 mov %eax,%fs:0x1 ++ 8: 55 push %rbp ++ 9: 55 push %rbp ++ a: 55 push %rbp ++ b: 48 89 e5 mov %rsp,%rbp ++ e: 89 75 f4 mov %esi,-0xc\(%rbp\) ++ 11: 89 75 f4 mov %esi,-0xc\(%rbp\) ++ 14: 89 75 f4 mov %esi,-0xc\(%rbp\) ++ 17: 89 75 f4 mov %esi,-0xc\(%rbp\) ++ 1a: 89 75 f4 mov %esi,-0xc\(%rbp\) ++ 1d: 48 39 c5 cmp %rax,%rbp ++ 20: 74 5a je 7c ++ 22: 89 75 f4 mov %esi,-0xc\(%rbp\) ++ 25: 89 75 f4 mov %esi,-0xc\(%rbp\) ++ 28: 89 7d f8 mov %edi,-0x8\(%rbp\) ++ 2b: 89 75 f4 mov %esi,-0xc\(%rbp\) ++ 2e: 89 75 f4 mov %esi,-0xc\(%rbp\) ++ 31: 89 75 f4 mov %esi,-0xc\(%rbp\) ++ 34: 89 75 f4 mov %esi,-0xc\(%rbp\) ++ 37: 89 75 f4 mov %esi,-0xc\(%rbp\) ++ 3a: 5d pop %rbp ++ 3b: 5d pop %rbp ++ 3c: 74 3e je 7c ++ 3e: 5d pop %rbp ++ 3f: 74 3b je 7c ++ 41: 89 45 fc mov %eax,-0x4\(%rbp\) ++ 44: 89 75 f4 mov %esi,-0xc\(%rbp\) ++ 47: 89 7d f8 mov %edi,-0x8\(%rbp\) ++ 4a: 89 75 f4 mov %esi,-0xc\(%rbp\) ++ 4d: 89 75 f4 mov %esi,-0xc\(%rbp\) ++ 50: 89 75 f4 mov %esi,-0xc\(%rbp\) ++ 53: 89 75 f4 mov %esi,-0xc\(%rbp\) ++ 56: 89 75 f4 mov %esi,-0xc\(%rbp\) ++ 59: 5d pop %rbp ++ 5a: 5d pop %rbp ++ 5b: eb 25 jmp 82 ++ 5d: eb 23 jmp 82 ++ 5f: eb 21 jmp 82 ++ 61: 89 45 fc mov %eax,-0x4\(%rbp\) ++ 64: 89 75 f4 mov %esi,-0xc\(%rbp\) ++ 67: 89 7d f8 mov %edi,-0x8\(%rbp\) ++ 6a: 89 75 f4 mov %esi,-0xc\(%rbp\) ++ 6d: 89 75 f4 mov %esi,-0xc\(%rbp\) ++ 70: 89 75 f4 mov %esi,-0xc\(%rbp\) ++ 73: 5d pop %rbp ++ 74: 5d pop %rbp ++ 75: 48 39 c5 cmp %rax,%rbp ++ 78: 74 02 je 7c ++ 7a: eb 06 jmp 82 ++ 7c: 8b 45 f4 mov -0xc\(%rbp\),%eax ++ 7f: 89 45 fc mov %eax,-0x4\(%rbp\) ++ 82: 89 b5 50 fb ff ff mov %esi,-0x4b0\(%rbp\) ++ 88: 89 b5 50 fb ff ff mov %esi,-0x4b0\(%rbp\) ++ 8e: 89 b5 50 fb ff ff mov %esi,-0x4b0\(%rbp\) ++ 94: 89 b5 50 fb ff ff mov %esi,-0x4b0\(%rbp\) ++ 9a: 89 b5 50 fb ff ff mov %esi,-0x4b0\(%rbp\) ++ a0: 89 b5 50 fb ff ff mov %esi,-0x4b0\(%rbp\) ++ a6: 89 b5 50 fb ff ff mov %esi,-0x4b0\(%rbp\) ++ ac: 89 b5 50 fb ff ff mov %esi,-0x4b0\(%rbp\) ++ b2: 89 b5 50 fb ff ff mov %esi,-0x4b0\(%rbp\) ++ b8: 89 b5 50 fb ff ff mov %esi,-0x4b0\(%rbp\) ++ be: eb c2 jmp 82 ++ c0: 5d pop %rbp ++ c1: c3 retq ++#pass +diff -rupN binutils-2.32/gas/testsuite/gas/i386/x86-64-align-branch-1.s binutils.new/gas/testsuite/gas/i386/x86-64-align-branch-1.s +--- binutils-2.32/gas/testsuite/gas/i386/x86-64-align-branch-1.s 1970-01-01 01:00:00.000000000 +0100 ++++ binutils.new/gas/testsuite/gas/i386/x86-64-align-branch-1.s 2019-11-25 14:01:00.680325567 +0000 +@@ -0,0 +1,70 @@ ++ .text ++ .globl foo ++ .p2align 4 ++foo: ++ movl %eax, %fs:0x1 ++ pushq %rbp ++ pushq %rbp ++ pushq %rbp ++ movq %rsp, %rbp ++ movl %esi, -12(%rbp) ++ movl %esi, -12(%rbp) ++ movl %esi, -12(%rbp) ++ movl %esi, -12(%rbp) ++ movl %esi, -12(%rbp) ++ cmp %rax, %rbp ++ je .L_2 ++ movl %esi, -12(%rbp) ++ movl %esi, -12(%rbp) ++ movl %edi, -8(%rbp) ++ movl %esi, -12(%rbp) ++ movl %esi, -12(%rbp) ++ movl %esi, -12(%rbp) ++ movl %esi, -12(%rbp) ++ movl %esi, -12(%rbp) ++ popq %rbp ++ popq %rbp ++ je .L_2 ++ popq %rbp ++ je .L_2 ++ movl %eax, -4(%rbp) ++ movl %esi, -12(%rbp) ++ movl %edi, -8(%rbp) ++ movl %esi, -12(%rbp) ++ movl %esi, -12(%rbp) ++ movl %esi, -12(%rbp) ++ movl %esi, -12(%rbp) ++ movl %esi, -12(%rbp) ++ popq %rbp ++ popq %rbp ++ jmp .L_3 ++ jmp .L_3 ++ jmp .L_3 ++ movl %eax, -4(%rbp) ++ movl %esi, -12(%rbp) ++ movl %edi, -8(%rbp) ++ movl %esi, -12(%rbp) ++ movl %esi, -12(%rbp) ++ movl %esi, -12(%rbp) ++ popq %rbp ++ popq %rbp ++ cmp %rax, %rbp ++ je .L_2 ++ jmp .L_3 ++.L_2: ++ movl -12(%rbp), %eax ++ movl %eax, -4(%rbp) ++.L_3: ++ movl %esi, -1200(%rbp) ++ movl %esi, -1200(%rbp) ++ movl %esi, -1200(%rbp) ++ movl %esi, -1200(%rbp) ++ movl %esi, -1200(%rbp) ++ movl %esi, -1200(%rbp) ++ movl %esi, -1200(%rbp) ++ movl %esi, -1200(%rbp) ++ movl %esi, -1200(%rbp) ++ movl %esi, -1200(%rbp) ++ jmp .L_3 ++ popq %rbp ++ retq +diff -rupN binutils-2.32/gas/testsuite/gas/i386/x86-64-align-branch-2a.d binutils.new/gas/testsuite/gas/i386/x86-64-align-branch-2a.d +--- binutils-2.32/gas/testsuite/gas/i386/x86-64-align-branch-2a.d 1970-01-01 01:00:00.000000000 +0100 ++++ binutils.new/gas/testsuite/gas/i386/x86-64-align-branch-2a.d 2019-11-25 14:01:00.680325567 +0000 +@@ -0,0 +1,50 @@ ++#source: x86-64-align-branch-2.s ++#as: -malign-branch-boundary=32 -malign-branch=fused+jcc+jmp ++#objdump: -dw ++ ++.*: +file format .* ++ ++Disassembly of section .text: ++ ++0+ : ++ 0: 64 89 04 25 01 00 00 00 mov %eax,%fs:0x1 ++ 8: 55 push %rbp ++ 9: 55 push %rbp ++ a: 55 push %rbp ++ b: 55 push %rbp ++ c: 48 89 e5 mov %rsp,%rbp ++ f: 89 75 f4 mov %esi,-0xc\(%rbp\) ++ 12: 89 75 f4 mov %esi,-0xc\(%rbp\) ++ 15: 89 75 f4 mov %esi,-0xc\(%rbp\) ++ 18: 89 75 f4 mov %esi,-0xc\(%rbp\) ++ 1b: 89 75 f4 mov %esi,-0xc\(%rbp\) ++ 1e: ff e0 jmpq \*%rax ++ 20: 55 push %rbp ++ 21: 55 push %rbp ++ 22: 64 89 04 25 01 00 00 00 mov %eax,%fs:0x1 ++ 2a: 48 89 e5 mov %rsp,%rbp ++ 2d: 89 75 f4 mov %esi,-0xc\(%rbp\) ++ 30: 89 75 f4 mov %esi,-0xc\(%rbp\) ++ 33: 89 75 f4 mov %esi,-0xc\(%rbp\) ++ 36: 89 75 f4 mov %esi,-0xc\(%rbp\) ++ 39: 89 75 f4 mov %esi,-0xc\(%rbp\) ++ 3c: ff d0 callq \*%rax ++ 3e: 89 75 f4 mov %esi,-0xc\(%rbp\) ++ 41: 55 push %rbp ++ 42: 55 push %rbp ++ 43: 64 89 04 25 01 00 00 00 mov %eax,%fs:0x1 ++ 4b: 48 89 e5 mov %rsp,%rbp ++ 4e: 89 75 f4 mov %esi,-0xc\(%rbp\) ++ 51: 89 75 f4 mov %esi,-0xc\(%rbp\) ++ 54: 89 75 f4 mov %esi,-0xc\(%rbp\) ++ 57: e8 [0-9a-f ]+ callq .* ++ 5c: 89 75 f4 mov %esi,-0xc\(%rbp\) ++ 5f: 55 push %rbp ++ 60: 55 push %rbp ++ 61: 55 push %rbp ++ 62: 64 89 04 25 01 00 00 00 mov %eax,%fs:0x1 ++ 6a: 48 89 e5 mov %rsp,%rbp ++ 6d: 89 75 f4 mov %esi,-0xc\(%rbp\) ++ 70: ff 14 25 00 00 00 00 callq \*0x0 ++ 77: 55 push %rbp ++#pass +diff -rupN binutils-2.32/gas/testsuite/gas/i386/x86-64-align-branch-2b.d binutils.new/gas/testsuite/gas/i386/x86-64-align-branch-2b.d +--- binutils-2.32/gas/testsuite/gas/i386/x86-64-align-branch-2b.d 1970-01-01 01:00:00.000000000 +0100 ++++ binutils.new/gas/testsuite/gas/i386/x86-64-align-branch-2b.d 2019-11-25 14:01:00.680325567 +0000 +@@ -0,0 +1,50 @@ ++#source: x86-64-align-branch-2.s ++#as: -malign-branch-boundary=32 -malign-branch=indirect ++#objdump: -dw ++ ++.*: +file format .* ++ ++Disassembly of section .text: ++ ++0+ : ++ 0: 64 64 64 89 04 25 01 00 00 00 fs fs mov %eax,%fs:0x1 ++ a: 55 push %rbp ++ b: 55 push %rbp ++ c: 55 push %rbp ++ d: 55 push %rbp ++ e: 48 89 e5 mov %rsp,%rbp ++ 11: 89 75 f4 mov %esi,-0xc\(%rbp\) ++ 14: 89 75 f4 mov %esi,-0xc\(%rbp\) ++ 17: 89 75 f4 mov %esi,-0xc\(%rbp\) ++ 1a: 89 75 f4 mov %esi,-0xc\(%rbp\) ++ 1d: 89 75 f4 mov %esi,-0xc\(%rbp\) ++ 20: ff e0 jmpq \*%rax ++ 22: 2e 2e 55 cs cs push %rbp ++ 25: 55 push %rbp ++ 26: 64 89 04 25 01 00 00 00 mov %eax,%fs:0x1 ++ 2e: 48 89 e5 mov %rsp,%rbp ++ 31: 89 75 f4 mov %esi,-0xc\(%rbp\) ++ 34: 89 75 f4 mov %esi,-0xc\(%rbp\) ++ 37: 89 75 f4 mov %esi,-0xc\(%rbp\) ++ 3a: 89 75 f4 mov %esi,-0xc\(%rbp\) ++ 3d: 89 75 f4 mov %esi,-0xc\(%rbp\) ++ 40: ff d0 callq \*%rax ++ 42: 89 75 f4 mov %esi,-0xc\(%rbp\) ++ 45: 55 push %rbp ++ 46: 55 push %rbp ++ 47: 64 89 04 25 01 00 00 00 mov %eax,%fs:0x1 ++ 4f: 48 89 e5 mov %rsp,%rbp ++ 52: 89 75 f4 mov %esi,-0xc\(%rbp\) ++ 55: 89 75 f4 mov %esi,-0xc\(%rbp\) ++ 58: 89 75 f4 mov %esi,-0xc\(%rbp\) ++ 5b: e8 [0-9a-f ]+ callq .* ++ 60: 89 75 f4 mov %esi,-0xc\(%rbp\) ++ 63: 55 push %rbp ++ 64: 55 push %rbp ++ 65: 55 push %rbp ++ 66: 64 89 04 25 01 00 00 00 mov %eax,%fs:0x1 ++ 6e: 48 89 e5 mov %rsp,%rbp ++ 71: 89 75 f4 mov %esi,-0xc\(%rbp\) ++ 74: ff 14 25 00 00 00 00 callq \*0x0 ++ 7b: 55 push %rbp ++#pass +diff -rupN binutils-2.32/gas/testsuite/gas/i386/x86-64-align-branch-2c.d binutils.new/gas/testsuite/gas/i386/x86-64-align-branch-2c.d +--- binutils-2.32/gas/testsuite/gas/i386/x86-64-align-branch-2c.d 1970-01-01 01:00:00.000000000 +0100 ++++ binutils.new/gas/testsuite/gas/i386/x86-64-align-branch-2c.d 2019-11-25 14:01:00.680325567 +0000 +@@ -0,0 +1,50 @@ ++#source: x86-64-align-branch-2.s ++#as: -malign-branch-boundary=32 -malign-branch=indirect+call ++#objdump: -dw ++ ++.*: +file format .* ++ ++Disassembly of section .text: ++ ++0+ : ++ 0: 64 64 64 89 04 25 01 00 00 00 fs fs mov %eax,%fs:0x1 ++ a: 55 push %rbp ++ b: 55 push %rbp ++ c: 55 push %rbp ++ d: 55 push %rbp ++ e: 48 89 e5 mov %rsp,%rbp ++ 11: 89 75 f4 mov %esi,-0xc\(%rbp\) ++ 14: 89 75 f4 mov %esi,-0xc\(%rbp\) ++ 17: 89 75 f4 mov %esi,-0xc\(%rbp\) ++ 1a: 89 75 f4 mov %esi,-0xc\(%rbp\) ++ 1d: 89 75 f4 mov %esi,-0xc\(%rbp\) ++ 20: ff e0 jmpq \*%rax ++ 22: 2e 2e 55 cs cs push %rbp ++ 25: 55 push %rbp ++ 26: 64 89 04 25 01 00 00 00 mov %eax,%fs:0x1 ++ 2e: 48 89 e5 mov %rsp,%rbp ++ 31: 89 75 f4 mov %esi,-0xc\(%rbp\) ++ 34: 89 75 f4 mov %esi,-0xc\(%rbp\) ++ 37: 89 75 f4 mov %esi,-0xc\(%rbp\) ++ 3a: 89 75 f4 mov %esi,-0xc\(%rbp\) ++ 3d: 89 75 f4 mov %esi,-0xc\(%rbp\) ++ 40: ff d0 callq \*%rax ++ 42: 2e 2e 2e 2e 2e 89 75 f4 cs cs cs cs mov %esi,%cs:-0xc\(%rbp\) ++ 4a: 55 push %rbp ++ 4b: 55 push %rbp ++ 4c: 64 89 04 25 01 00 00 00 mov %eax,%fs:0x1 ++ 54: 48 89 e5 mov %rsp,%rbp ++ 57: 89 75 f4 mov %esi,-0xc\(%rbp\) ++ 5a: 89 75 f4 mov %esi,-0xc\(%rbp\) ++ 5d: 89 75 f4 mov %esi,-0xc\(%rbp\) ++ 60: e8 [0-9a-f ]+ callq .* ++ 65: 2e 2e 2e 2e 2e 89 75 f4 cs cs cs cs mov %esi,%cs:-0xc\(%rbp\) ++ 6d: 2e 2e 55 cs cs push %rbp ++ 70: 55 push %rbp ++ 71: 55 push %rbp ++ 72: 64 89 04 25 01 00 00 00 mov %eax,%fs:0x1 ++ 7a: 48 89 e5 mov %rsp,%rbp ++ 7d: 89 75 f4 mov %esi,-0xc\(%rbp\) ++ 80: ff 14 25 00 00 00 00 callq \*0x0 ++ 87: 55 push %rbp ++#pass +diff -rupN binutils-2.32/gas/testsuite/gas/i386/x86-64-align-branch-2.s binutils.new/gas/testsuite/gas/i386/x86-64-align-branch-2.s +--- binutils-2.32/gas/testsuite/gas/i386/x86-64-align-branch-2.s 1970-01-01 01:00:00.000000000 +0100 ++++ binutils.new/gas/testsuite/gas/i386/x86-64-align-branch-2.s 2019-11-25 14:01:00.680325567 +0000 +@@ -0,0 +1,44 @@ ++ .text ++ .globl foo ++ .p2align 4 ++foo: ++ movl %eax, %fs:0x1 ++ pushq %rbp ++ pushq %rbp ++ pushq %rbp ++ pushq %rbp ++ movq %rsp, %rbp ++ movl %esi, -12(%rbp) ++ movl %esi, -12(%rbp) ++ movl %esi, -12(%rbp) ++ movl %esi, -12(%rbp) ++ movl %esi, -12(%rbp) ++ jmp *%rax ++ pushq %rbp ++ pushq %rbp ++ movl %eax, %fs:0x1 ++ movq %rsp, %rbp ++ movl %esi, -12(%rbp) ++ movl %esi, -12(%rbp) ++ movl %esi, -12(%rbp) ++ movl %esi, -12(%rbp) ++ movl %esi, -12(%rbp) ++ call *%rax ++ movl %esi, -12(%rbp) ++ pushq %rbp ++ pushq %rbp ++ movl %eax, %fs:0x1 ++ movq %rsp, %rbp ++ movl %esi, -12(%rbp) ++ movl %esi, -12(%rbp) ++ movl %esi, -12(%rbp) ++ call foo ++ movl %esi, -12(%rbp) ++ pushq %rbp ++ pushq %rbp ++ pushq %rbp ++ movl %eax, %fs:0x1 ++ movq %rsp, %rbp ++ movl %esi, -12(%rbp) ++ call *foo ++ pushq %rbp +diff -rupN binutils-2.32/gas/testsuite/gas/i386/x86-64-align-branch-3.d binutils.new/gas/testsuite/gas/i386/x86-64-align-branch-3.d +--- binutils-2.32/gas/testsuite/gas/i386/x86-64-align-branch-3.d 1970-01-01 01:00:00.000000000 +0100 ++++ binutils.new/gas/testsuite/gas/i386/x86-64-align-branch-3.d 2019-11-25 14:01:00.680325567 +0000 +@@ -0,0 +1,32 @@ ++#as: -malign-branch-boundary=32 -malign-branch=indirect+call ++#objdump: -dw ++ ++.*: +file format .* ++ ++Disassembly of section .text: ++ ++0+ : ++ 0: 64 89 04 25 01 00 00 00 mov %eax,%fs:0x1 ++ 8: 55 push %rbp ++ 9: 55 push %rbp ++ a: 55 push %rbp ++ b: 55 push %rbp ++ c: 48 89 e5 mov %rsp,%rbp ++ f: 89 75 f4 mov %esi,-0xc\(%rbp\) ++ 12: 89 75 f4 mov %esi,-0xc\(%rbp\) ++ 15: 89 75 f4 mov %esi,-0xc\(%rbp\) ++ 18: 89 75 f4 mov %esi,-0xc\(%rbp\) ++ 1b: 89 75 f4 mov %esi,-0xc\(%rbp\) ++ 1e: e8 00 00 00 00 callq 23 ++ 23: 55 push %rbp ++ 24: 55 push %rbp ++ 25: 64 89 04 25 01 00 00 00 mov %eax,%fs:0x1 ++ 2d: 48 89 e5 mov %rsp,%rbp ++ 30: 89 75 f4 mov %esi,-0xc\(%rbp\) ++ 33: 89 75 f4 mov %esi,-0xc\(%rbp\) ++ 36: 89 75 f4 mov %esi,-0xc\(%rbp\) ++ 39: 89 75 f4 mov %esi,-0xc\(%rbp\) ++ 3c: 89 75 f4 mov %esi,-0xc\(%rbp\) ++ 3f: ff 15 00 00 00 00 callq \*0x0\(%rip\) # 45 ++ 45: 89 75 f4 mov %esi,-0xc\(%rbp\) ++#pass +diff -rupN binutils-2.32/gas/testsuite/gas/i386/x86-64-align-branch-3.s binutils.new/gas/testsuite/gas/i386/x86-64-align-branch-3.s +--- binutils-2.32/gas/testsuite/gas/i386/x86-64-align-branch-3.s 1970-01-01 01:00:00.000000000 +0100 ++++ binutils.new/gas/testsuite/gas/i386/x86-64-align-branch-3.s 2019-11-25 14:01:00.680325567 +0000 +@@ -0,0 +1,27 @@ ++ .text ++ .globl foo ++ .p2align 4 ++foo: ++ movl %eax, %fs:0x1 ++ pushq %rbp ++ pushq %rbp ++ pushq %rbp ++ pushq %rbp ++ movq %rsp, %rbp ++ movl %esi, -12(%rbp) ++ movl %esi, -12(%rbp) ++ movl %esi, -12(%rbp) ++ movl %esi, -12(%rbp) ++ movl %esi, -12(%rbp) ++ call __tls_get_addr ++ pushq %rbp ++ pushq %rbp ++ movl %eax, %fs:0x1 ++ movq %rsp, %rbp ++ movl %esi, -12(%rbp) ++ movl %esi, -12(%rbp) ++ movl %esi, -12(%rbp) ++ movl %esi, -12(%rbp) ++ movl %esi, -12(%rbp) ++ call *__tls_get_addr@GOTPCREL(%rip) ++ movl %esi, -12(%rbp) +diff -rupN binutils-2.32/gas/testsuite/gas/i386/x86-64-align-branch-4a.d binutils.new/gas/testsuite/gas/i386/x86-64-align-branch-4a.d +--- binutils-2.32/gas/testsuite/gas/i386/x86-64-align-branch-4a.d 1970-01-01 01:00:00.000000000 +0100 ++++ binutils.new/gas/testsuite/gas/i386/x86-64-align-branch-4a.d 2019-11-25 14:01:00.680325567 +0000 +@@ -0,0 +1,33 @@ ++#source: x86-64-align-branch-4.s ++#as: -malign-branch-boundary=32 -malign-branch=fused+jcc+jmp ++#objdump: -dw ++ ++.*: +file format .* ++ ++Disassembly of section .text: ++ ++0+ : ++ 0: 64 89 04 25 01 00 00 00 mov %eax,%fs:0x1 ++ 8: 55 push %rbp ++ 9: 55 push %rbp ++ a: 48 89 e5 mov %rsp,%rbp ++ d: 89 75 f4 mov %esi,-0xc\(%rbp\) ++ 10: 89 75 f4 mov %esi,-0xc\(%rbp\) ++ 13: 89 75 f4 mov %esi,-0xc\(%rbp\) ++ 16: 89 75 f4 mov %esi,-0xc\(%rbp\) ++ 19: 89 75 f4 mov %esi,-0xc\(%rbp\) ++ 1c: 89 75 f4 mov %esi,-0xc\(%rbp\) ++ 1f: c3 retq ++ 20: 55 push %rbp ++ 21: 64 89 04 25 01 00 00 00 mov %eax,%fs:0x1 ++ 29: 55 push %rbp ++ 2a: 55 push %rbp ++ 2b: 89 75 f4 mov %esi,-0xc\(%rbp\) ++ 2e: 89 75 f4 mov %esi,-0xc\(%rbp\) ++ 31: 89 75 f4 mov %esi,-0xc\(%rbp\) ++ 34: 89 75 f4 mov %esi,-0xc\(%rbp\) ++ 37: 89 75 f4 mov %esi,-0xc\(%rbp\) ++ 3a: 89 75 f4 mov %esi,-0xc\(%rbp\) ++ 3d: c2 1e 00 retq \$0x1e ++ 40: 55 push %rbp ++#pass +diff -rupN binutils-2.32/gas/testsuite/gas/i386/x86-64-align-branch-4b.d binutils.new/gas/testsuite/gas/i386/x86-64-align-branch-4b.d +--- binutils-2.32/gas/testsuite/gas/i386/x86-64-align-branch-4b.d 1970-01-01 01:00:00.000000000 +0100 ++++ binutils.new/gas/testsuite/gas/i386/x86-64-align-branch-4b.d 2019-11-25 14:01:00.680325567 +0000 +@@ -0,0 +1,33 @@ ++#source: x86-64-align-branch-4.s ++#as: -malign-branch-boundary=32 -malign-branch=ret ++#objdump: -dw ++ ++.*: +file format .* ++ ++Disassembly of section .text: ++ ++0+ : ++ 0: 64 64 89 04 25 01 00 00 00 fs mov %eax,%fs:0x1 ++ 9: 55 push %rbp ++ a: 55 push %rbp ++ b: 48 89 e5 mov %rsp,%rbp ++ e: 89 75 f4 mov %esi,-0xc\(%rbp\) ++ 11: 89 75 f4 mov %esi,-0xc\(%rbp\) ++ 14: 89 75 f4 mov %esi,-0xc\(%rbp\) ++ 17: 89 75 f4 mov %esi,-0xc\(%rbp\) ++ 1a: 89 75 f4 mov %esi,-0xc\(%rbp\) ++ 1d: 89 75 f4 mov %esi,-0xc\(%rbp\) ++ 20: c3 retq ++ 21: 2e 2e 55 cs cs push %rbp ++ 24: 64 89 04 25 01 00 00 00 mov %eax,%fs:0x1 ++ 2c: 55 push %rbp ++ 2d: 55 push %rbp ++ 2e: 89 75 f4 mov %esi,-0xc\(%rbp\) ++ 31: 89 75 f4 mov %esi,-0xc\(%rbp\) ++ 34: 89 75 f4 mov %esi,-0xc\(%rbp\) ++ 37: 89 75 f4 mov %esi,-0xc\(%rbp\) ++ 3a: 89 75 f4 mov %esi,-0xc\(%rbp\) ++ 3d: 89 75 f4 mov %esi,-0xc\(%rbp\) ++ 40: c2 1e 00 retq \$0x1e ++ 43: 55 push %rbp ++#pass +diff -rupN binutils-2.32/gas/testsuite/gas/i386/x86-64-align-branch-4.s binutils.new/gas/testsuite/gas/i386/x86-64-align-branch-4.s +--- binutils-2.32/gas/testsuite/gas/i386/x86-64-align-branch-4.s 1970-01-01 01:00:00.000000000 +0100 ++++ binutils.new/gas/testsuite/gas/i386/x86-64-align-branch-4.s 2019-11-25 14:01:00.680325567 +0000 +@@ -0,0 +1,27 @@ ++ .text ++ .globl foo ++ .p2align 4 ++foo: ++ movl %eax, %fs:0x1 ++ pushq %rbp ++ pushq %rbp ++ movq %rsp, %rbp ++ movl %esi, -12(%rbp) ++ movl %esi, -12(%rbp) ++ movl %esi, -12(%rbp) ++ movl %esi, -12(%rbp) ++ movl %esi, -12(%rbp) ++ movl %esi, -12(%rbp) ++ ret ++ pushq %rbp ++ movl %eax, %fs:0x1 ++ pushq %rbp ++ pushq %rbp ++ movl %esi, -12(%rbp) ++ movl %esi, -12(%rbp) ++ movl %esi, -12(%rbp) ++ movl %esi, -12(%rbp) ++ movl %esi, -12(%rbp) ++ movl %esi, -12(%rbp) ++ ret $30 ++ pushq %rbp +diff -rupN binutils-2.32/gas/testsuite/gas/i386/x86-64-align-branch-5.d binutils.new/gas/testsuite/gas/i386/x86-64-align-branch-5.d +--- binutils-2.32/gas/testsuite/gas/i386/x86-64-align-branch-5.d 1970-01-01 01:00:00.000000000 +0100 ++++ binutils.new/gas/testsuite/gas/i386/x86-64-align-branch-5.d 2019-11-25 14:01:00.680325567 +0000 +@@ -0,0 +1,37 @@ ++#source: align-branch-5.s ++#as: -malign-branch-boundary=32 -malign-branch=jcc+fused+jmp ++#objdump: -dw ++ ++.*: +file format .* ++ ++Disassembly of section .text: ++ ++0+ : ++ 0: c1 e9 02 shr \$0x2,%ecx ++ 3: c1 e9 02 shr \$0x2,%ecx ++ 6: c1 e9 02 shr \$0x2,%ecx ++ 9: 89 d1 mov %edx,%ecx ++ b: 31 c0 xor %eax,%eax ++ d: c1 e9 02 shr \$0x2,%ecx ++ 10: c1 e9 02 shr \$0x2,%ecx ++ 13: c1 e9 02 shr \$0x2,%ecx ++ 16: c1 e9 02 shr \$0x2,%ecx ++ 19: c1 e9 02 shr \$0x2,%ecx ++ 1c: c1 e9 02 shr \$0x2,%ecx ++ 1f: f6 c2 02 test \$0x2,%dl ++ 22: f3 ab rep stos %eax,%es:\(%rdi\) ++ 24: 75 dd jne 3 ++ 26: 31 c0 xor %eax,%eax ++ 28: c1 e9 02 shr \$0x2,%ecx ++ 2b: c1 e9 02 shr \$0x2,%ecx ++ 2e: c1 e9 02 shr \$0x2,%ecx ++ 31: 89 d1 mov %edx,%ecx ++ 33: 31 c0 xor %eax,%eax ++ 35: c1 e9 02 shr \$0x2,%ecx ++ 38: c1 e9 02 shr \$0x2,%ecx ++ 3b: c1 e9 02 shr \$0x2,%ecx ++ 3e: f6 c2 02 test \$0x2,%dl ++ 41: e8 00 00 00 00 callq 46 ++ 46: 75 e3 jne 2b ++ 48: 31 c0 xor %eax,%eax ++#pass +diff -rupN binutils-2.32/gas/write.c binutils.new/gas/write.c +--- binutils-2.32/gas/write.c 2019-11-25 14:01:09.888265017 +0000 ++++ binutils.new/gas/write.c 2019-11-25 14:01:00.901324114 +0000 +@@ -3031,7 +3031,12 @@ relax_segment (struct frag *segment_frag + #ifdef TC_GENERIC_RELAX_TABLE + /* The default way to relax a frag is to look through + TC_GENERIC_RELAX_TABLE. */ ++#ifdef md_generic_table_relax_frag ++ growth = md_generic_table_relax_frag (segment, fragP, ++ stretch); ++#else + growth = relax_frag (segment, fragP, stretch); ++#endif /* md_generic_table_relax_frag */ + #endif /* TC_GENERIC_RELAX_TABLE */ + #endif + break; diff --git a/SPECS/binutils.spec b/SPECS/binutils.spec new file mode 100644 index 0000000..c7e49c6 --- /dev/null +++ b/SPECS/binutils.spec @@ -0,0 +1,3331 @@ + +%define __python /opt/rh/gcc-toolset-9/root/usr/bin/python3 +%{?scl:%{?scl_package:%scl_package binutils}} + +Summary: A GNU collection of binary utilities +Name: %{?scl_prefix}%{?cross}binutils%{?_with_debug:-debug} +Version: 2.32 +Release: 19%{?dist} +License: GPLv3+ +URL: https://sourceware.org/binutils + +# Binutils SPEC file. Can be invoked with the following parameters: + +# --define "binutils_target arm-linux-gnu" to create arm-linux-gnu-binutils. +# --with=bootstrap: Build with minimal dependencies. +# --with=debug: Build without optimizations and without splitting the debuginfo. +# --without=docs: Skip building documentation. +# --without=testsuite: Do not run the testsuite. Default is to run it. +# --with=testsuite: Run the testsuite. Default when --with=debug is not to run it. + +#---Start of Configure Options----------------------------------------------- + +# Do not create deterministic archives by default (cf: BZ 1195883) +%define enable_deterministic_archives 0 + +# Enable support for GCC LTO compilation. +%define enable_lto 1 + +# Disable the default generation of compressed debug sections. +%define default_compress_debug 0 + +# Default to read-only-relocations (relro) in shared binaries. +%define default_relro 1 + +# Disable the default generation of GNU Build notes by the assembler. +# This has turned out to be problematic for the i686 architecture. +# although the exact reason has not been determined. (See BZ 1572485) +# It also breaks building EFI binaries on AArch64, as these cannot have +# relocations against absolute symbols. +%define default_generate_notes 0 + +# Enable thread support in the GOLD linker. This is particularly +# important if plugins to the linker intend to use threads themselves. +# See BZ 1636479 for more details. This option is made configurable +# in case there is ever a need to disable thread support. +%define enable_threading 1 + +#----End of Configure Options------------------------------------------------ + +# Default: Not bootstrapping. +%bcond_with bootstrap +# Default: Not debug +%bcond_with debug +# Default: Always build documentation. +%bcond_without docs +# Default: Always run the testsuite. +%bcond_without testsuite + +%if %{with bootstrap} +%undefine with_docs +%undefine with_testsuite +%endif + +%if %{with debug} +%undefine with_testsuite +%endif + +%if 0%{!?binutils_target:1} +%define binutils_target %{_target_platform} +%define isnative 1 +%define enable_shared 1 +%else +%define cross %{binutils_target}- +%define isnative 0 +%define enable_shared 0 +%endif + +#---------------------------------------------------------------------------- + +# Note - the Linux Kernel binutils releases are too unstable and contain +# too many controversial patches so we stick with the official FSF version +# instead. + +Source: https://ftp.gnu.org/gnu/binutils/binutils-%{version}.tar.xz + +Source2: binutils-2.19.50.0.1-output-format.sed + +%if %{with docs} +# Strictly speaking this next file is not part of the binutils distribution. +# But the emacs info system expects it to be present on any system where +# emacs is installed, and old binutils distributions used to include it by +# mistake. Since there is no suitable documentation files component to +# current RHEL releases, it is included here instead. In order to save time +# and complexity it is stored as a pre-built, compressed, info file. +# The upstream version of the original source file can be found here: +# http://git.savannah.gnu.org/gitweb/?p=gnulib.git;a=blob_plain;f=doc/standards.texi;hb=HEAD +# For more information see: https://bugzilla.redhat.com/show_bug.cgi?id=1467390 +Source3: standards.info.gz +%endif + +#---------------------------------------------------------------------------- + +# Purpose: Use /lib64 and /usr/lib64 instead of /lib and /usr/lib in the +# default library search path of 64-bit targets. +# Lifetime: Permanent, but it should not be. This is a bug in the libtool +# sources used in both binutils and gcc, (specifically the +# libtool.m4 file). These are based on a version released in 2009 +# (2.2.6?) rather than the latest version. (Definitely fixed in +# libtool version 2.4.6). +Patch01: binutils-2.20.51.0.2-libtool-lib64.patch + +# Purpose: Appends a RHEL or Fedora release string to the generic binutils +# version string. +# Lifetime: Permanent. This is a RHEL/Fedora specific patch. +Patch02: binutils-2.25-version.patch + +# Purpose: Exports the demangle.h header file (associated with the libiberty +# sources) with the binutils-devel rpm. +# Lifetime: Permanent. This is a RHEL/Fedora specific patch. +Patch03: binutils-export-demangle.h.patch + +# Purpose: Disables the check in the BFD library's bfd.h header file that +# config.h has been included before the bfd.h header. See BZ +# #845084 for more details. +# Lifetime: Permanent - but it should not be. The bfd.h header defines +# various types that are dependent upon configuration options, so +# the order of inclusion is important. +# FIXME: It would be better if the packages using the bfd.h header were +# fixed so that they do include the header files in the correct +# order. +Patch04: binutils-2.22.52.0.4-no-config-h-check.patch + +# Purpose: Include the filename concerned in readelf error messages. This +# makes readelf's output more helpful when it is run on multiple +# input files. +# Lifetime: Permanent. This patch changes the format of readelf's output, +# making it better (IMHO) but also potentially breaking tools that +# depend upon readelf's current format. Hence it remains a local +# patch. +Patch05: binutils-2.29-filename-in-error-messages.patch + +# Purpose: Disable an x86/x86_64 optimization that moves functions from the +# PLT into the GOTPLT for faster access. This optimization is +# problematic for tools that want to intercept PLT entries, such +# as ltrace and LD_AUDIT. See BZs 1452111 and 1333481. +# Lifetime: Permanent. But it should not be. +# FIXME: Replace with a configure time option. +Patch06: binutils-2.29-revert-PLT-elision.patch + +# Purpose: Use the "unsigned long long" type for pointers on hosts where +# long is a 32-bit type but pointers are a 64-bit type. Necessary +# because the rpmdiff tester insists that if both the i686 and +# x86_64 versions of binutils-devel are installed on the same +# machine, then they will have identical versions of the bfd.h +# header file. +# Lifetime: Permanent. +Patch07: binutils-2.25-set-long-long.patch + +# Purpose: Changes readelf so that when it displays extra information about +# a symbol, this information is placed at the end of the line. +# Lifetime: Permanent. +# FIXME: The proper fix would be to update the scripts that are expecting +# a fixed output from readelf. But it seems that some of them are +# no longer being maintained. +Patch08: binutils-readelf-other-sym-info.patch + +# Purpose: Do not create PLT entries for AARCH64 IFUNC symbols referenced in +# debug sections. +# Lifetime: Permanent. +# FIXME: Find related bug. Decide on permanency. +Patch09: binutils-2.27-aarch64-ifunc.patch + +# Purpose: Ignore duplicate indirect symbols generated by GOLD. +# Lifetime: Permanent. +# FIXME: This problem needs to be resolved in the FSF sources, but the +# GOLD maintainers seem to be reluctant to address the issue. +Patch10: binutils-2.28-ignore-gold-duplicates.patch + +# Purpose: Stop the binutils from statically linking with libstdc++. +# Lifetime: Permanent. +Patch11: binutils-do-not-link-with-static-libstdc++.patch + +# Purpose: Add a .attach_to_group pseudo-op to the assembler for +# use by the annobin gcc plugin. +# Lifetime: Permanent. +Patch12: binutils-attach-to-group.patch + +# Purpose: Stop gold from complaining about relocs in the .gnu.build.attribute +# section that reference symbols in discarded sections. +# Lifetime: Fixed in 2.33 (maybe) +Patch13: binutils-gold-ignore-discarded-note-relocs.patch + +# Purpose: Allow OS specific sections in section groups. +# Lifetime: Might be fixed in 2.33 +Patch14: binutils-special-sections-in-groups.patch + +# Purpose: Fix linker testsuite failures. +# Lifetime: Fixed in 2.33 (possibly) +Patch15: binutils-fix-testsuite-failures.patch + +# Purpose: Improve objdump's handling of corrupt input files. +# Lifetime: Fixed in 2.33 +Patch16: binutils-CVE-2019-9073.patch + +# Purpose: Stop illegal memory access parsing corrupt PE files. +# Lifetime: Fixed in 2.33 +Patch17: binutils-CVE-2019-9074.patch + +# Purpose: Stop illegal memory access parsing corrupt archives. +# Lifetime: Fixed in 2.33 +Patch18: binutils-CVE-2019-9075.patch + +# Purpose: Stop illegal memory access parsing a corrupt MIPS binary. +# Lifetime: Fixed in 2.33 +Patch19: binutils-CVE-2019-9077.patch + +# Purpose: Stop a seg-fault when disassembling an EFI binary. +# Lifetime: Fixed in 2.33 +Patch20: binutils-disassembling-efi-files.patch + +# Purpose: Fix a stack exhaustion problem in libiberty's name demangling code. +# Lifetime: Fixed in 2.33 +Patch21: binutils-CVE-2019-9071.patch + +# Purpose: Have the GOLD linker for AArch64 generate PLT entries for MOVW_ABS +# relocations if necessary. +# Lifetime: Fixed in 2.33 +Patch22: binutils-aarch64-gold-PLT-for-MOVW_ABS.patch + +# Purpose: Fix unexpected failures in the linker testsuite +# Lifetime: Temporary +Patch23: binutils-ld-testsuite-fixes.patch + +# Purpose: Have the GOLD linker generate PT_NOTE segments with 8-byte alignment. +# Lifetime: Maybe fixed in 2.33. +Patch24: binutils-gold-8-byte-note-segments.patch + +# Purpose: Add descriptions to the new s390x arch13 instructions +# Lifetime: 2.33 +Patch25: binutils-s390x-arch13-descriptions.patch + +# Purpose: Stop gold from aborting when input sections with the same name +# have different flags. +# Lifetime: 2.33 (probably) +Patch26: binutils-gold-mismatched-section-flags.patch + +# Purpose: Remove the builder id comment from bfd-stdint.h. It causes +# conflicts when both the i686 and x86_64 binutils devel rpms +# are installed, as the comments makes the file compare as +# being different. +# Lifetime: Permanent. +Patch27: binutils-no-builder-comment-in-bfd-stdint.patch + +# Purpose: Correct licence strings rejected by PELC review. +# Lifetime: Permanent. +Patch28: binutils-PELC-licence-corrections.patch + +# Purpose: Ignore duplicate FDE entries found in some AArch64 libraries. +# Lifetime: Permanent. +Patch29: binutils-ignore-duplicate-FDE-entries.patch + +# Purpose: Corrcect a memory corruption when generating relocs for build +# notes in the assembler. +# Lifetime: Fixed in 2.33 +Patch30: binutils-gas-build-note-relocs.patch + +# Purpose: Support the generation of variant ABI functions in AArch64 binaries. +# Lifetime: Fixed in 2.33 +Patch31: binutils-aarch64-STO_AARCH64_VARIANT_PCS.patch + +# Purpose: Remove a debugging print statement left in the objcopy code. +# Lifetime: Fixed in 2.33 +Patch32: binutils-remove-DUP-FUNXC-debug-fprintf.patch + +# Purpose: Stop strip from complaining about build notes that do not start +# with a version note. +# Lifetime: Fixed in 2.33 +Patch33: binutils-objcopy-version-note.patch + +# Purpose: Add check to libiberty library in order to prevent an integer overflow in the gold linker. +# Lifetime: Fixed in 2.33 +Patch34: binutils-CVE-2019-14250.patch + +# Purpose: Add check to readelf in order to prevent an integer overflow. +# Lifetime: Fixed in 2.33 +Patch35: binutils-CVE-2019-14444.patch + +# Purpose: Fix a potential seg-fault in the BFD library when parsing +# pathalogical debug_info sections. +# Lifetime: Fixed in 2.34 +Patch36: binutils-CVE-2019-17451.patch + +# Purpose: Fix a memory exhaustion bug in the BFD library when parsing +# corrupt DWARF debug information. +# Lifetime: Fixed in 2.34 +Patch37: binutils-CVE-2019-17450.patch + +# Purpose: Add a feature to the x86/64 assembler to create +# workarounds for the Intel Jcc Erratum. +# Lifetime: Fixed in 2.34 +Patch38: binutils-x86-JCC-Errata.patch + +# Purpose: Fix a potential illegal memory access parsing corrupt ELF files. +# Lifetime: Fixed in 2.34 +Patch39: binutils-CVE-2019-12972.patch + +#---------------------------------------------------------------------------- + +Provides: bundled(libiberty) + +%define gold_arches %{ix86} x86_64 %{arm} aarch64 %{power64} s390x + +%if %{with bootstrap} +%define build_gold no +%else +%ifarch %gold_arches +%define build_gold both +%else +%define build_gold no +%endif +%endif + +%define alternatives_cmd %{!?scl:%{_sbindir}}%{?scl:%{_root_sbindir}}/alternatives +%define alternatives_cmdline %{alternatives_cmd}%{?scl: --altdir %{_sysconfdir}/alternatives --admindir %{_scl_root}/var/lib/alternatives} + +%if %{with debug} +# Define this if you want to skip the strip step and preserve debug info. +# Useful for testing. +%define __debug_install_post : > %{_builddir}/%{?buildsubdir}/debugfiles.list +%define debug_package %{nil} +%endif + +Buildroot: %(mktemp -ud %{_tmppath}/%{name}-%{version}-%{release}-XXXXXX) + +# Perl, sed and touch are all used in the %%prep section of this spec file. +BuildRequires: gcc, perl, sed, coreutils + +# Gold needs bison in order to build gold/yyscript.c. +# Bison needs m4. +%if "%{build_gold}" == "both" +BuildRequires: bison, m4, gcc-c++ +%endif + +%if %{without bootstrap} +BuildRequires: gettext, flex, zlib-devel +%endif + +%if %{with docs} +BuildRequires: texinfo >= 4.0 +# BZ 920545: We need pod2man in order to build the manual pages. +BuildRequires: /usr/bin/pod2man +Requires(post): /sbin/install-info +Requires(preun): /sbin/install-info +%else +BuildRequires: findutils +%endif + +# Required for: ld-bootstrap/bootstrap.exp bootstrap with --static +# It should not be required for: ld-elf/elf.exp static {preinit,init,fini} array +%if %{with testsuite} +# relro_test.sh uses dc which is part of the bc rpm, hence its inclusion here. +BuildRequires: dejagnu, zlib-static, glibc-static, sharutils, bc +%if "%{build_gold}" == "both" +# The GOLD testsuite needs a static libc++ +BuildRequires: libstdc++-static +%endif +%endif + +Conflicts: gcc-c++ < 4.0.0 + +%{?scl:Requires:%scl_runtime} + +# The higher of these two numbers determines the default ld. +%{!?ld_bfd_priority: %global ld_bfd_priority 50} +%{!?ld_gold_priority:%global ld_gold_priority 30} + +%if "%{build_gold}" == "both" +Requires(post): coreutils +Requires(post): %{alternatives_cmd} +Requires(preun): %{alternatives_cmd} +%endif + +# On ARM EABI systems, we do want -gnueabi to be part of the +# target triple. +%ifnarch %{arm} +%define _gnu %{nil} +%endif + +#---------------------------------------------------------------------------- + +%description +Binutils is a collection of binary utilities, including ar (for +creating, modifying and extracting from archives), as (a family of GNU +assemblers), gprof (for displaying call graph profile data), ld (the +GNU linker), nm (for listing symbols from object files), objcopy (for +copying and translating object files), objdump (for displaying +information from object files), ranlib (for generating an index for +the contents of an archive), readelf (for displaying detailed +information about binary files), size (for listing the section sizes +of an object or archive file), strings (for listing printable strings +from files), strip (for discarding symbols), and addr2line (for +converting addresses to file and line). + +#---------------------------------------------------------------------------- + +%package devel +Summary: BFD and opcodes static and dynamic libraries and header files +Provides: binutils-static = %{version}-%{release} +Requires: zlib-devel +Requires: %{?scl_prefix}binutils = %{version}-%{release} +# BZ 1215242: We need touch... +Requires: coreutils + +%description devel +This package contains BFD and opcodes static and dynamic libraries. + +The dynamic libraries are in this package, rather than a separate +base package because they are actually linker scripts that force +the use of the static libraries. This is because the API of the +BFD library is too unstable to be used dynamically. + +The static libraries are here because they are now needed by the +dynamic libraries. + +Developers starting new projects are strongly encouraged to consider +using libelf instead of BFD. + +#---------------------------------------------------------------------------- + +%prep +%setup -q -n binutils-%{version} +%patch01 -p1 +%patch02 -p1 +%patch03 -p1 +%patch04 -p1 +%patch05 -p1 +%patch06 -p1 +%patch07 -p1 +%patch08 -p1 +%patch09 -p1 +%patch10 -p1 +%patch11 -p1 +%patch12 -p1 +%patch13 -p1 +%patch14 -p1 +%patch15 -p1 +%patch16 -p1 +%patch17 -p1 +%patch18 -p1 +%patch19 -p1 +%patch20 -p1 +%patch21 -p1 +%patch22 -p1 +%patch23 -p1 +%patch24 -p1 +%patch25 -p1 +%patch26 -p1 +%patch27 -p1 +%patch28 -p1 +%patch29 -p1 +%patch30 -p1 +%patch31 -p1 +%patch32 -p1 +%patch33 -p1 +%patch34 -p1 +%patch35 -p1 +%patch36 -p1 +%patch37 -p1 +%patch38 -p1 +%patch39 -p1 + +# We cannot run autotools as there is an exact requirement of autoconf-2.59. +# FIXME - this is no longer true. Maybe try reinstating autotool use ? + +# On ppc64 and aarch64, we might use 64KiB pages +sed -i -e '/#define.*ELF_COMMONPAGESIZE/s/0x1000$/0x10000/' bfd/elf*ppc.c +sed -i -e '/#define.*ELF_COMMONPAGESIZE/s/0x1000$/0x10000/' bfd/elf*aarch64.c +sed -i -e '/common_pagesize/s/4 /64 /' gold/powerpc.cc +sed -i -e '/pagesize/s/0x1000,/0x10000,/' gold/aarch64.cc +# LTP sucks +perl -pi -e 's/i\[3-7\]86/i[34567]86/g' */conf* +sed -i -e 's/%''{release}/%{release}/g' bfd/Makefile{.am,.in} +sed -i -e '/^libopcodes_la_\(DEPENDENCIES\|LIBADD\)/s,$, ../bfd/libbfd.la,' opcodes/Makefile.{am,in} +# Build libbfd.so and libopcodes.so with -Bsymbolic-functions if possible. +if gcc %{optflags} -v --help 2>&1 | grep -q -- -Bsymbolic-functions; then +sed -i -e 's/^libbfd_la_LDFLAGS = /&-Wl,-Bsymbolic-functions /' bfd/Makefile.{am,in} +sed -i -e 's/^libopcodes_la_LDFLAGS = /&-Wl,-Bsymbolic-functions /' opcodes/Makefile.{am,in} +fi +# $PACKAGE is used for the gettext catalog name. +sed -i -e 's/^ PACKAGE=/ PACKAGE=%{?cross}/' */configure +# Undo the name change to run the testsuite. +for tool in binutils gas ld +do + sed -i -e "2aDEJATOOL = $tool" $tool/Makefile.am + sed -i -e "s/^DEJATOOL = .*/DEJATOOL = $tool/" $tool/Makefile.in +done +touch */configure +# Touch the .info files so that they are newer then the .texi files and +# hence do not need to be rebuilt. This eliminates the need for makeinfo. +# The -print is there just to confirm that the command is working. +%if %{without docs} + find . -name *.info -print -exec touch {} \; +%endif + +# Not sure how this should be done. The file is created by +# patch44. +chmod +x gold/testsuite/gnu_property_test.sh + +%ifarch %{power64} +%define _target_platform %{_arch}-%{_vendor}-%{_host_os} +%endif + +#---------------------------------------------------------------------------- + +%build +echo target is %{binutils_target} + +%ifarch %{power64} +export CFLAGS="$RPM_OPT_FLAGS -Wno-error" +%else +export CFLAGS="$RPM_OPT_FLAGS" +%endif + +CARGS= + +case %{binutils_target} in i?86*|sparc*|ppc*|s390*|sh*|arm*|aarch64*) + CARGS="$CARGS --enable-64-bit-bfd" + ;; +esac + +case %{binutils_target} in ia64*) + CARGS="$CARGS --enable-targets=i386-linux" + ;; +esac + +case %{binutils_target} in ppc*|ppc64*) + CARGS="$CARGS --enable-targets=spu" + ;; +esac + +case %{binutils_target} in ppc64-*) + CARGS="$CARGS --enable-targets=powerpc64le-linux" + ;; +esac + +case %{binutils_target} in ppc64le*) + CARGS="$CARGS --enable-targets=powerpc-linux" + ;; +esac + +case %{binutils_target} in x86_64*|i?86*|arm*|aarch64*) + CARGS="$CARGS --enable-targets=x86_64-pep" + ;; +esac + +%if %{default_relro} + CARGS="$CARGS --enable-relro=yes" +%else + CARGS="$CARGS --enable-relro=no" +%endif + +%if 0%{?_with_debug:1} +export CFLAGS="$CFLAGS -O0 -ggdb2 -Wno-error -D_FORTIFY_SOURCE=0" +%define enable_shared 0 +%endif + +# BZ 1541027 - include the linker flags from redhat-rpm-config as well. +export LDFLAGS=$RPM_LD_FLAGS + +# We could optimize the cross builds size by --enable-shared but the produced +# binaries may be less convenient in the embedded environment. +%configure \ + --quiet \ + --build=%{_target_platform} --host=%{_target_platform} \ + --target=%{binutils_target} \ +%ifarch %gold_arches +%if "%{build_gold}" == "both" + --enable-gold=default \ +%else + --enable-gold \ +%endif +%endif + --enable-ld \ +%if %{isnative} + --with-sysroot=/ \ +%else + --enable-targets=%{_host} \ + --with-sysroot=%{_prefix}/%{binutils_target}/sys-root \ + --program-prefix=%{cross} \ +%endif +%if %{enable_shared} + --enable-shared \ +%else + --disable-shared \ +%endif +%if %{enable_deterministic_archives} + --enable-deterministic-archives \ +%else + --enable-deterministic-archives=no \ +%endif +%if %{enable_lto} + --enable-lto \ +%endif +%if %{default_compress_debug} + --enable-compressed-debug-sections=all \ +%else + --enable-compressed-debug-sections=none \ +%endif +%if %{default_generate_notes} + --enable-generate-build-notes=yes \ +%else + --enable-generate-build-notes=no \ +%endif +%if %{enable_threading} + --enable-threads=yes \ +%else + --enable-threads=no \ +%endif + $CARGS \ + --enable-plugins \ + --with-bugurl=http://bugzilla.redhat.com/bugzilla/ + +%if %{with docs} +%make_build %{_smp_mflags} tooldir=%{_prefix} all +%make_build %{_smp_mflags} tooldir=%{_prefix} info +%else +%make_build %{_smp_mflags} tooldir=%{_prefix} MAKEINFO=true all +%endif + +# Do not use %%check as it is run after %%install where libbfd.so is rebuilt +# with -fvisibility=hidden no longer being usable in its shared form. +%if %{without testsuite} +echo ====================TESTSUITE DISABLED========================= +%else +make -k check < /dev/null || : +echo ====================TESTING========================= +cat {gas/testsuite/gas,ld/ld,binutils/binutils}.sum +%if "%{build_gold}" == "both" +if [ -f gold/test-suite.log ]; then + cat gold/test-suite.log +fi +if [ -f gold/testsuite/test-suite.log ]; then + cat gold/testsuite/*.log +fi +%endif +echo ====================TESTING END===================== +for file in {gas/testsuite/gas,ld/ld,binutils/binutils}.{sum,log} +do + ln $file binutils-%{_target_platform}-$(basename $file) || : +done +tar cjf binutils-%{_target_platform}.tar.xz binutils-%{_target_platform}-*.{sum,log} +uuencode binutils-%{_target_platform}.tar.xz binutils-%{_target_platform}.tar.xz +rm -f binutils-%{_target_platform}.tar.xz binutils-%{_target_platform}-*.{sum,log} +%if "%{build_gold}" == "both" +if [ -f gold/testsuite/test-suite.log ]; then + tar cjf binutils-%{_target_platform}-gold.log.tar.xz gold/testsuite/*.log + uuencode binutils-%{_target_platform}-gold.log.tar.xz binutils-%{_target_platform}-gold.log.tar.xz + rm -f binutils-%{_target_platform}-gold.log.tar.xz +fi +%endif +%endif # with testsuite + +#---------------------------------------------------------------------------- + +%install +%if %{with docs} +%make_install DESTDIR=%{buildroot} +%else +%make_install DESTDIR=%{buildroot} MAKEINFO=true +%endif + +%if %{isnative} +%if %{with docs} +make prefix=%{buildroot}%{_prefix} infodir=%{buildroot}%{_infodir} install-info +cp %{SOURCE3} %{buildroot}%{_infodir} +%endif + +# Rebuild libiberty.a with -fPIC. +# Future: Remove it together with its header file, projects should bundle it. +%make_build -C libiberty clean +%make_build CFLAGS="-g -fPIC $RPM_OPT_FLAGS" -C libiberty + +# Rebuild libbfd.a with -fPIC. +# Without the hidden visibility the 3rd party shared libraries would export +# the bfd non-stable ABI. +%make_build -C bfd clean +%make_build CFLAGS="-g -fPIC $RPM_OPT_FLAGS -fvisibility=hidden" -C bfd + +# Rebuild libopcodes.a with -fPIC. +%make_build -C opcodes clean +%make_build CFLAGS="-g -fPIC $RPM_OPT_FLAGS" -C opcodes + +install -m 644 bfd/libbfd.a %{buildroot}%{_libdir} +install -m 644 libiberty/libiberty.a %{buildroot}%{_libdir} +install -m 644 include/libiberty.h %{buildroot}%{_prefix}/include +install -m 644 opcodes/libopcodes.a %{buildroot}%{_libdir} +# Remove Windows/Novell only man pages +rm -f %{buildroot}%{_mandir}/man1/{dlltool,nlmconv,windres,windmc}* +%if %{without docs} +rm -f %{buildroot}%{_mandir}/man1/{addr2line,ar,as,c++filt,elfedit,gprof,ld,nm,objcopy,objdump,ranlib,readelf,size,strings,strip}* +rm -f %{buildroot}%{_infodir}/{as,bfd,binutils,gprof,ld}* +%endif + +%if %{enable_shared} +chmod +x %{buildroot}%{_libdir}/lib*.so* +%endif + +# Prevent programs from linking against libbfd and libopcodes +# dynamically, as they are changed far too often. +rm -f %{buildroot}%{_libdir}/lib{bfd,opcodes}.so + +# Remove libtool files, which reference the .so libs +rm -f %{buildroot}%{_libdir}/lib{bfd,opcodes}.la + +# Sanity check --enable-64-bit-bfd really works. +grep '^#define BFD_ARCH_SIZE 64$' %{buildroot}%{_prefix}/include/bfd.h +# Fix multilib conflicts of generated values by __WORDSIZE-based expressions. +%ifarch %{ix86} x86_64 ppc %{power64} s390 s390x sh3 sh4 sparc sparc64 arm +sed -i -e '/^#include "ansidecl.h"/{p;s~^.*$~#include ~;}' \ + -e 's/^#define BFD_DEFAULT_TARGET_SIZE \(32\|64\) *$/#define BFD_DEFAULT_TARGET_SIZE __WORDSIZE/' \ + -e 's/^#define BFD_HOST_64BIT_LONG [01] *$/#define BFD_HOST_64BIT_LONG (__WORDSIZE == 64)/' \ + -e 's/^#define BFD_HOST_64_BIT \(long \)\?long *$/#if __WORDSIZE == 32\ +#define BFD_HOST_64_BIT long long\ +#else\ +#define BFD_HOST_64_BIT long\ +#endif/' \ + -e 's/^#define BFD_HOST_U_64_BIT unsigned \(long \)\?long *$/#define BFD_HOST_U_64_BIT unsigned BFD_HOST_64_BIT/' \ + %{buildroot}%{_prefix}/include/bfd.h +%endif +touch -r bfd/bfd-in2.h %{buildroot}%{_prefix}/include/bfd.h + +# Generate .so linker scripts for dependencies; imported from glibc/Makerules: + +# This fragment of linker script gives the OUTPUT_FORMAT statement +# for the configuration we are building. +OUTPUT_FORMAT="\ +/* Ensure this .so library will not be used by a link for a different format + on a multi-architecture system. */ +$(gcc $CFLAGS $LDFLAGS -shared -x c /dev/null -o /dev/null -Wl,--verbose -v 2>&1 | sed -n -f "%{SOURCE2}")" + +tee %{buildroot}%{_libdir}/libbfd.so <> %{?cross}binutils.lang +cat %{?cross}bfd.lang >> %{?cross}binutils.lang +cat %{?cross}gas.lang >> %{?cross}binutils.lang +cat %{?cross}gprof.lang >> %{?cross}binutils.lang + +if [ -x ld/ld-new ]; then + %find_lang %{?cross}ld + cat %{?cross}ld.lang >> %{?cross}binutils.lang +fi +if [ -x gold/ld-new ]; then + %find_lang %{?cross}gold + cat %{?cross}gold.lang >> %{?cross}binutils.lang +fi + +#---------------------------------------------------------------------------- + +%post +%if "%{build_gold}" == "both" +%__rm -f %{_bindir}/%{?cross}ld +%{alternatives_cmdline} --install %{_bindir}/%{?cross}ld %{?cross}ld \ + %{_bindir}/%{?cross}ld.bfd %{ld_bfd_priority} +%{alternatives_cmdline} --install %{_bindir}/%{?cross}ld %{?cross}ld \ + %{_bindir}/%{?cross}ld.gold %{ld_gold_priority} +%endif # both ld.gold and ld.bfd + +%if %{isnative} +%ldconfig_post +%if %{with docs} + /sbin/install-info --info-dir=%{_infodir} %{_infodir}/as.info.gz + /sbin/install-info --info-dir=%{_infodir} %{_infodir}/binutils.info.gz + /sbin/install-info --info-dir=%{_infodir} %{_infodir}/gprof.info.gz + /sbin/install-info --info-dir=%{_infodir} %{_infodir}/ld.info.gz + /sbin/install-info --info-dir=%{_infodir} %{_infodir}/standards.info.gz +%endif # with docs +%endif # isnative + +exit 0 + +#---------------------------------------------------------------------------- + +%preun +%if "%{build_gold}" == "both" +if [ $1 = 0 ]; then + %{alternatives_cmdline} --remove %{?cross}ld %{_bindir}/%{?cross}ld.bfd + %{alternatives_cmdline} --remove %{?cross}ld %{_bindir}/%{?cross}ld.gold +fi +%endif # both ld.gold and ld.bfd + +%if %{isnative} +if [ $1 = 0 ]; then + if [ -e %{_infodir}/binutils.info.gz ] + then + /sbin/install-info --delete --info-dir=%{_infodir} %{_infodir}/as.info.gz + /sbin/install-info --delete --info-dir=%{_infodir} %{_infodir}/binutils.info.gz + /sbin/install-info --delete --info-dir=%{_infodir} %{_infodir}/gprof.info.gz + /sbin/install-info --delete --info-dir=%{_infodir} %{_infodir}/ld.info.gz + /sbin/install-info --quiet --delete --info-dir=%{_infodir} %{_infodir}/standards.info.gz + fi +fi +%endif # isnative + +exit 0 + +#---------------------------------------------------------------------------- + +%if %{isnative} +%postun +%ldconfig_postun + if [ -e %{_infodir}/binutils.info.gz ] + then + /sbin/install-info --delete --info-dir=%{_infodir} %{_infodir}/as.info.gz + /sbin/install-info --delete --info-dir=%{_infodir} %{_infodir}/binutils.info.gz + /sbin/install-info --delete --info-dir=%{_infodir} %{_infodir}/gprof.info.gz + /sbin/install-info --delete --info-dir=%{_infodir} %{_infodir}/ld.info.gz + /sbin/install-info --quiet --delete --info-dir=%{_infodir} %{_infodir}/standards.info.gz + fi +%endif # isnative + +#---------------------------------------------------------------------------- + +%files -f %{?cross}binutils.lang +%license COPYING COPYING3 COPYING3.LIB COPYING.LIB +%doc README +%{_bindir}/%{?cross}[!l]* + +%if "%{build_gold}" == "both" +%{_bindir}/%{?cross}ld.* +%ghost %{_bindir}/%{?cross}ld +%else +%{_bindir}/%{?cross}ld* +%endif # both ld.gold and ld.bfd + +%if %{with docs} +%{_mandir}/man1/* +%{_infodir}/as.info.* +%{_infodir}/binutils.info.* +%{_infodir}/gprof.info.* +%{_infodir}/ld.info.* +%{_infodir}/bfd.info.* +%{_infodir}/standards.info.* +%endif # with docs + +%if %{enable_shared} +%{_libdir}/lib*.so +%exclude %{_libdir}/libbfd.so +%exclude %{_libdir}/libopcodes.so +%endif # enable_shared + +%if %{isnative} + +%if %{with docs} +%{_infodir}/[^b]*info* +%{_infodir}/binutils*info* +%endif # with docs + +%files devel +%{_prefix}/include/* +%{_libdir}/lib*.a +%{_libdir}/libbfd.so +%{_libdir}/libopcodes.so + +%if %{with docs} +%{_infodir}/bfd*info* +%endif # with docs + +%endif # isnative + +#---------------------------------------------------------------------------- +%changelog +* Wed May 27 2020 Nick Clifton - 2.32-19 +- Initial import into GTS-10-RHEL-8.3 branch. (#1817170) + +* Wed May 13 2020 Nick Clifton - 2.32-18.1 +- Fix a potential illegal memory access parsing corrupt ELF files. (#1835184) + +* Mon Mar 02 2020 Nick Clifton - 2.32-18 +- Fix failures in linker testuite due to compiling test code without -D_FORTIFY_SOURCE specified. (#1809101) + +* Sun Dec 08 2019 Nick Clifton - 2.32-17 +- Fix a potential seg-fault in the BFD library when parsing pathalogical debug_info sections. (#1779255) +- Fix a potential memory exhaustion in the BFD library when parsing corrupt DWARF debug information. +- Backport H.J.Lu's patch to add a workaround for the JCC Errata to the assembler. (#1779417) +- Fix potential integer overflow in readelf. (#1740470) +- Fix potential integer overflow in GOLD. (#1739491) + +* Tue Aug 06 2019 Nick Clifton - 2.32-15 +- Stop strip from complaining if the first build note is not a version note. (#1736114) + +* Mon Aug 05 2019 Nick Clifton - 2.32-14 +- Remove debugging print statement in objcopy sources. (#1733868) + +* Fri Jul 05 2019 Nick Clifton - 2.32-13 +- Define scl before Name. + +* Tue Jul 02 2019 Nick Clifton - 2.32-12 +- Add support for AArch64 function calls that use a variant PCS. + +* Mon Jul 01 2019 Nick Clifton - 2.32-11 +- Stop gas from triggering a seg-fault when creating relocs for build notes. (PR 24748) + +* Tue Jun 25 2019 Nick Clifton - 2.32-10 +- Ignore duplicate FDE entries in AArch64 libraries. (#1709827) + +* Tue Jun 25 2019 Nick Clifton - 2.32-9 +- Correct licences rejected by PELC review. + +* Mon Jun 24 2019 Nick Clifton - 2.32-8 +- Remove the builder command from bfd-stdint.h. + +* Mon Jun 24 2019 Nick Clifton - 2.32-7 +- Stop gold from aborting when it encounters input sections with the same name and different flags. (#1722715) + +* Tue Jun 18 2019 Nick Clifton - 2.32-6 +- Add descriptions to the new s390x arch13 instructions. (#1690457) + +* Wed Jun 12 2019 Nick Clifton - 2.32-5 +- Import patch to fix alignment of note segments created by GOLD. (#1614908) + +* Tue Jun 11 2019 Nick Clifton - 2.32-4 +- Release bump to allow a rebuild. + +* Fri Jun 07 2019 Nick Clifton - 2.32-3 +- Add scl macros to spec file. +- Add gating.yaml file. + +* Wed Jun 05 2019 Nick Clifton - 2.32-2 +- Fix linker testsuite failures. + +* Wed Jun 05 2019 Nick Clifton - 2.32-1 +- IMPORT FROM FEDORA RAWHIDE. +- Improve s390x Hardware support in toolchain. (#1690983) + +* Tue May 21 2019 Nick Clifton - 2.32-14 +- Import fix for PR 23870 in order to help building Go binaries. + +* Mon Apr 29 2019 Nick Clifton - 2.32-13 +- Do not include ld.gold in the base binutils package. (#1703714) + +* Wed Apr 24 2019 Björn Esser - 2.32-12 +- Remove hardcoded gzip suffix from GNU info pages + +* Wed Apr 10 2019 Nick Clifton - 2.32-11 +- Fix a stack exhaustion problem in libiberty's name demangling code. (#1680658) + +* Mon Mar 18 2019 David Abdurachmanov - 2.32-10 +- Disable ld.gold on RISC-V and fix file installation issues. + +* Wed Mar 06 2019 Nick Clifton - 2.32-9 +- Stop potential illegal memory access when disassembling an EFI binary. (#1685727) + +* Wed Feb 27 2019 Nick Clifton - 2.32-8 +- Fix requirements and use of the alternatives mechanism. (#1683408, #1683466) + +* Tue Feb 26 2019 Nick Clifton - 2.32-7 +- Move GOLD into a sub-package of BINUTILS. + +* Tue Feb 26 2019 Nick Clifton - 2.32-6 +- Stop potential illegal memory access when parsing a corrupt MIPS binary. (#1680676) + +* Tue Feb 26 2019 Nick Clifton - 2.32-5 +- Stop potential illegal memory access when parsing corrupt archives. (#1680670) + +* Mon Feb 25 2019 Nick Clifton - 2.32-4 +- Stop potential illegal memory access when parsing corrupt PE files. (#1680682) + +* Mon Feb 25 2019 Nick Clifton - 2.32-3 +- Improve objdump's handling of corrupt input files. (#1680663) + +* Wed Feb 20 2019 Nick Clifton - 2.32-2 +- Fix some bfd linker testsuite failures. + +* Wed Feb 20 2019 Nick Clifton - 2.32-1 +- Rebase to GNU Binutils 2.32 +- Retire: binutils-s390-partial-relro.patch +- Retire: binutils-note-merge-improvements.patch +- Retire: Retire: binutils-merge-attribute-sections.patch +- Retire: binutils-gold-discard-version-info.patch +- Retire: binutils-gas-input-matches-output.patch +- Retire: binutils-fix-testsuite-failures.patch +- Retire: binutils-do-not-provide-shared-section-symbols.patch +- Retire: binutils-disable-readelf-gap-reports.patch +- Retire: binutils-detect-corrupt-sym-version-info.patch +- Retire: binutils-delay-ld-script-constant-eval.patch +- Retire: binutils-clear-version-info.patch +- Retire: binutils-CVE-2018-20002.patch +- Retire: binutils-CVE-2018-17358.patch +- Retire: binutils-2.31-export-demangle.h.patch +- Retire: binutils-2.28-ignore-gold-duplicates.patch +- Retire: binutils-2.26-lto.patch + +* Mon Feb 18 2019 Nick Clifton - 2.31.1-23 +- Ensure that decompressed sections have the correct alignment. (#1678204) + +* Thu Feb 14 2019 Nick Clifton - 2.31.1-22 +- Rework the post uninstall stage to avoid mysterious error from ldconfig. (#1673912) + +* Thu Jan 31 2019 Fedora Release Engineering - 2.31.1-21 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_30_Mass_Rebuild + +* Wed Jan 30 2019 Nick Clifton - 2.31.1-20 +- Fix the assembler's check that the output file is not also one of the input files. (#1660279) + +* Thu Jan 03 2019 Nick Clifton - 2.31.1-19 +- Fix a memory leak reading minisymbols. (#1661535) + +* Wed Jan 02 2019 Nick Clifton - 2.31.1-18 +- Ensure that GOLD is linked with pthread library. (#1636479) + +* Wed Nov 28 2018 Nick Clifton - 2.31.1-17 +- Stop gold from warning about discard version information unless explicitly requested. (#1654153) + +* Thu Nov 15 2018 Nick Clifton - 2.31.1-16 +- Remove debugging fprintf statement accidentally left in patch. (#1645828) + +* Fri Oct 12 2018 Nick Clifton - 2.31.1-15 +- Allow OS specific sections in section groups. (#1639485) + +* Fri Sep 28 2018 Nick Clifton - 2.31.1-14 +- Fix a potential buffer overrun when parsing a corrupt ELF file. (#1632912) +- Add a .attach_to_group pseuo-op to assembler (for use by annobin). (#1630574) +- Stop the binutils from statically linking with libstdc++. (#1630550) +- Include gold testsuite results in test logs. +- Disable readelf's reporting of gaps in build notes. (#1623556) + +* Tue Sep 04 2018 Nick Clifton - 2.31.1-13 +- Delay the evaluation of linker script constants until after the configuration options have been set. (#1624751) + +* Tue Aug 28 2018 Nick Clifton - 2.31.1-12 +- Detect and report corrupt symbol version information. (#1599521) + +* Tue Aug 14 2018 Nick Clifton - 2.31.1-11 +- Remove the version information from a dynamic symbol that is being overridden. (#1614920) + +* Mon Aug 06 2018 Nick Clifton - 2.31.1-10 +- Improve objcopy's --merge-notes option. (#1608390) + +* Tue Jul 31 2018 Florian Weimer - 2.31.1-9 +- Rebuild with fixed binutils + +* Mon Jul 30 2018 Nick Clifton - 2.31.1-8 +- Move the .gnu.build.attributes section to after the .comment section. + +* Fri Jul 27 2018 Nick Clifton - 2.31.1-7 +- Fix a thinko in the merge patch. + +* Fri Jul 27 2018 Nick Clifton - 2.31.1-6 +- Fix a typo in the merge patch. + +* Thu Jul 26 2018 Nick Clifton - 2.31.1-5 +- Merge .gnu.build.attribute sections together. (#1608390) + +* Tue Jul 24 2018 Nick Clifton - 2.31.1-3 +- Extend gold linker patch to cover subsections of .gnu.build.attributes. (#1607054) + +* Thu Jul 19 2018 Nick Clifton - 2.31.1-2 +- Improve partial relro support for the s/390. + +* Thu Jul 19 2018 Nick Clifton - 2.31.1-1 +- Rebase to official 2.31.1 GNU Binutils release. +- Retire: binutils-2.22.52.0.1-export-demangle.h.patch +- Retire: binutils-2.30-allow_R_AARCH64-symbols.patch +- Retire: binutils-CVE-2018-10372.patch +- Retire: binutils-CVE-2018-10373.patch +- Retire: binutils-CVE-2018-10534.patch +- Retire: binutils-CVE-2018-10535.patch +- Retire: binutils-CVE-2018-6323.patch +- Retire: binutils-CVE-2018-6759.patch +- Retire: binutils-CVE-2018-7208.patch +- Retire: binutils-CVE-2018-7568.patch +- Retire: binutils-CVE-2018-7569.patch +- Retire: binutils-CVE-2018-7570.patch +- Retire: binutils-CVE-2018-7642.patch +- Retire: binutils-CVE-2018-7643.patch +- Retire: binutils-CVE-2018-8945.patch +- Retire: binutils-PowerPC-IEEE-long-double-warnings.patch +- Retire: binutils-debug-section-marking.patch +- Retire: binutils-gas-build-notes.patch +- Retire: binutils-gold-llvm-plugin.patch +- Retire: binutils-ifunc-relocs-in-notes.patch +- Retire: binutils-linkonce-notes.patch +- Retire: binutils-missing-notes.patch +- Retire: binutils-page-to-segment-assignment.patch +- Retire: binutils-revert-PowerPC-speculation-barriers.patch +- Retire: binutils-skip-dwo-search-if-not-needed.patch +- Retire: binutils-speed-up-objdump.patch +- Retire: binutils-strip-unknown-relocs.patch +- Retire: binutils-x86-local-relocs.patch +- Retire: binutils-x86-local-version.patch + +* Thu Jul 12 2018 Fedora Release Engineering - 2.30.90-4 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_29_Mass_Rebuild + +* Thu Jul 12 2018 Nick Clifton 2.30.90-3 +- Stop gold from complaining about annobin note relocs against symbols in sections which have been discarded. (#1600431) + +* Tue Jul 10 2018 Nick Clifton 2.30.90-2 +- Revert fix for PR 23161 which was placing unversioned section symbols (_edata, _end, __bss_start) into shared libraries. (#1599521) + +* Mon Jul 9 2018 Nick Clifton 2.30.90-1 +- Rebase to a snapshot of the soon-to-be-created 2.31 FSF release. + +* Fri Jul 6 2018 Peter Robinson 2.30-26 +- Fix the generation of relocations for assembler created notes. (#1598551) + +* Wed Jul 4 2018 Peter Robinson 2.30-25 +- Minor spec cleanups and fixes. + +* Mon Jun 18 2018 Nick Clifton 2.30-24 +- When installing both ld.bfd and ld.gold, do not reset the current alternative if upgrading. (#1592069) + +* Tue Jun 12 2018 Nick Clifton 2.30-23 +- Correct warning messages about incompatible PowerPC IEEE long double settings. + +* Fri Jun 01 2018 Nick Clifton 2.30-22 +- Fix handling of local versioned symbols by the x86 linker. (PR 23194) +- Fix linker testsuite failures. + +* Thu May 17 2018 Nick Clifton 2.30-21 +- Fix a seg-fault parsing PE format binaries. (#1560829) + +* Mon May 14 2018 Nick Clifton 2.30-20 +- Have the x86 linker resolve relocations against the _end, _edata and __bss_start symbols locally. (#1576735) +- Do not generate GNU build notes for linkonce sections. (#1576362) + +* Thu May 10 2018 Nick Clifton 2.30-19 +- Fix a seg-fault running objcopy on a corrupt PE format file. (#1574702) +- Fix a seg-fault running objcopy on a corrupt ELF format file. (#1574705) + +* Tue May 01 2018 Nick Clifton 2.30-18 +- Fix a seg-fault parsing corrupt DWARF information. (#1573360) +- Fix another seg-fault parsing corrupt DWARF information. (#1573367) +- Fix a seg-fault copying a corrupt ELF file. (#1551788) +- Fix a seg-fault parsing a large ELF files on a 32-bit host. (#1539891) +- Fix a seg-fault running nm on a corrupt ELF file. (#15343247) +- Fix a seg-fault running nm on a file containing corrupt DWARF information. (#1551781) +- Fix another seg-fault running nm on a file containing corrupt DWARF information. (#1551763) + +* Fri Apr 27 2018 Nick Clifton 2.30-17 +- Disable the automatic generation of annobin notes. (#1572485) + +* Fri Apr 27 2018 Nick Clifton 2.30-16 +- Fix for PR 22887 - crashing objdump by passing it a corrupt AOUT binary. (#1553115) +- Fix for PR 22905 - crashing objdump by passing it a corrupt DWARF file. (#1553122) +- Fix for PR 22741 - crashing objdump by passing it a corrupt COFF file. (#1571918) + +* Thu Apr 26 2018 Nick Clifton 2.30-15 +- Enhance the assembler to automatically generate annobin notes if none are present in the input. + +* Thu Mar 22 2018 Nick Clifton 2.30-14 +- Fix the GOLD linker's processing of protected symbols created by the LLVM plugin. (#1559234 and PR 22868) + +* Wed Mar 14 2018 Nick Clifton 2.30-13 +- Do not discard debugobj files created by GCC v8 LTO wrapper. (#1543912 and RHBZ 84847 and PR 20882) + +* Fri Mar 09 2018 Nick Clifton 2.30-12 +- Treat relocs against s390x IFUNC symbols in note sections as relocs against the FUNC symbol instead. +- Combined previous patches into one which covers all ifunc supporting architectures. (#1553705) +- Retire binutils-s390-ifunc-relocs-in-notes.patch +- Retire binutils-x86_64-ifunc-relocs-in-notes.patch + +* Fri Mar 09 2018 Nick Clifton 2.30-11 +- Treat relocs against s390x IFUNC symbols in note sections as relocs against the FUNC symbol instead. (#1553705) + +* Wed Mar 07 2018 Nick Clifton 2.30-10 +- Ignore duplicate symbols generated by GOLD. (#1458003) + +* Wed Mar 07 2018 Nick Clifton 2.30-9 +- Stop strip from replacing unknown relocs with null relocs. (#1545386) + +* Wed Mar 07 2018 Nick Clifton 2.30-8 +- Ignore duplicate symbols generated by GOLD. (#1458003) + +* Mon Mar 05 2018 Nick Clifton 2.30-7 +- Speed up objdump. (#1551540) + +* Thu Feb 22 2018 Patrick Uiterwijk - 2.30-6 +- Fix R_AARCH64 symbols (PR 22764) (#1547781) + +* Wed Feb 21 2018 Nick Clifton 2.30-5 +- Fix assignment of pages to segments. (PR 22758) +- Inject RPM_LD_FLAGS into the build. (#1541027) +- Fix slowdown in readelf when examining files with lots of debug information. (PR 22802) +- Remove support for PowerPC speculation barrier insertion. +- Rebase on 2.30 +- Retire binutils-2.22.52.0.1-relro-on-by-default.patch +- Retire binutils-2.28-dynamic-section-warning.patch +- Retire binutils-2.29-skip-rp14918-test-for-arm.patch +- Retire binutils-2.29.1-gold-start-stop.patch +- Retire binutils-2.29.1-readelf-use-dynamic.patch +- Retire binutils-aarch64-pie.patch +- Retire binutils-coverity.patch +- Retire binutils-ppc64-stub-creation.patch +- Retire binutils-strip-delete-relocs.patch +- Retire binutils-support-v3-build-notes.patch +- Retire binutils-z-undefs.patch + +* Mon Feb 12 2018 Nick Clifton 2.29.1-19 +- Remove comment that explained how to disable annobin. (#1541027) + +* Thu Feb 08 2018 Nick Clifton 2.29.1-18 +- Inject RPM_LD_FLAGS into the build. (#1541027) + +* Wed Feb 07 2018 Fedora Release Engineering - 2.29.1-17 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_28_Mass_Rebuild + +* Thu Feb 01 2018 Nick Clifton 2.29.1-16 +- Use make_build and make_install macros. (#1541027) + +* Thu Jan 25 2018 Nick Clifton 2.29.1-15 +- Reenable binary annotations. + +* Thu Jan 25 2018 Nick Clifton 2.29.1-14 +- Fix creation of PowerPC64 function call stubs. (#1523457) +- Disable -z defs during build. +- Disable binary annotations. (temporary ?) + +* Mon Jan 22 2018 Nick Clifton 2.29.1-13 +- Fix bugs in AArch64 static PIE support. (#1536645) + +* Tue Jan 16 2018 Nick Clifton 2.29.1-12 +- Add "-z undefs" option to the linker. + +* Thu Jan 11 2018 Nick Clifton 2.29.1-11 +- *Do* enable relro by default for the PowerPC64 architecture. (#1523946) + +* Wed Jan 03 2018 Nick Clifton 2.29.1-10 +- Update readelf and objcopy to support v3 build notes. + +* Tue Dec 12 2017 Nick Clifton 2.29.1-9 +- Have readelf display extra symbol information at the end of the line. (#1479302) + +* Mon Dec 11 2017 Nick Clifton 2.29.1-8 +- Do not enable relro by default for the PowerPC64 architecture. (#1523946) + +* Thu Dec 07 2017 Nick Clifton 2.29.1-7 +- Stop strip from crashing when deleteing relocs in a file with annobin notes. (#1520805) + +* Wed Dec 06 2017 Nick Clifton 2.29.1-6 +- Have readelf return an exit failure status when attempting to process an empty file. (#1522732) + +* Tue Nov 28 2017 Nick Clifton 2.29.1-5 +- Disable PLT elision for x86/x86_64. (#1452111 and #1333481) + +* Wed Nov 01 2017 Nick Clifton 2.29.1-4 +- Have readelf suggest the use of --use-dynamic when there are dynamic relocs that could have been displayed. (#1507694) + +* Wed Oct 18 2017 Nick Clifton 2.29.1-3 +- Fix the GOLD linker's generation of relocations for start and stop symbols. (#1500898) + +* Thu Sep 28 2017 Nick Clifton 2.29.1-2 +- Enable GOLD for PPC64 and s390x. (#1173780) +- Retire: binutils-2.20.51.0.10-sec-merge-emit.patch. + (It has been redundant for a long time now...) + +* Tue Sep 26 2017 Nick Clifton 2.29.1-1 +- Rebase on FSF binutils 2.29.1 release. +- Retire: binutils-2.29-ppc64-plt-localentry0-disable.patch +- Retire: binutils-2.29-non-elf-orphan-skip.patch + +* Thu Sep 14 2017 Nick Clifton 2.29-10 +- Extend fix for PR 21884. + (#1491023) + +* Thu Sep 14 2017 Nick Clifton 2.29-8 +- Import fix for PR 21884 which stops a seg-fault in the linker when changing output format to binary during a final link. + (#1491023) + +* Sun Sep 10 2017 Nick Clifton - 2.29-7 +- Annotate patches with reason and lifetime expectances. +- Retire: binutils-2.24-ldforcele.patch +- Retire: binutils-2.25-set-long-long.patch +- Retire: binutils-2.25.1-cleansweep.patch +- Retire: binutils-2.26-fix-compile-warnings.patch +- Retire: binutils-2.28-ignore-gold-duplicates.patch + +* Wed Aug 02 2017 Fedora Release Engineering - 2.29-6 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_27_Binutils_Mass_Rebuild + +* Mon Jul 31 2017 Nick Clifton 2.29-5 +- Update ppc64 localentry0 patch with changes made by Alan Modra to the FSF binutils sources. + (#1475636) + +* Sun Jul 30 2017 Florian Weimer - 2.29-4 +- Rebuild with binutils fix for ppc64le, bootstrapping (#1475636) + +* Fri Jul 28 2017 Nick Clifton 2.29-3 +- Do not enable the PPC64 plt-localentry0 linker optimization by default. + (#1475636) + +* Wed Jul 26 2017 Fedora Release Engineering - 2.29-2 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_27_Mass_Rebuild + +* Mon Jul 24 2017 Nick Clifton 2.29-1 +- Rebase on FSF binutils 2.29. +- Retire: binutils-2.20.51.0.10-ppc64-pie.patch +- Retire: binutils-2.27-ld-buffer-overflow.patch +- Retire: binutils-2.28-libiberty-bugfixes.patch +- Retire: binutils-gnu-build-notes.patch +- Retire: binutils-2.28-gas-comp_dir.patch +- Retire: binutils-2.28-ppc-dynamic-relocs.patch +- Retire: binutils-2.28-dynamic-section-warning.patch +- Retire: binutils-2.28-aarch64-copy-relocs.patch +- Retire: binutils-2.28-DW_AT_export_symbols.patch + +* Thu Jul 20 2017 Nick Clifton 2.28-14 +- Remove -flto compile time option accidentally added to CFLAGS. + +* Thu Jul 20 2017 Nick Clifton 2.28-13 +- Add support for displaying new DWARF5 tags. + (#1472966) + +* Wed Jul 19 2017 Nick Clifton 2.28-12 +- Correct snafu in previous delta that broke building s390 binaries. + (#1472486) + +* Mon Jul 17 2017 Nick Clifton 2.28-11 +- Fix s390 assembler so that it remove fake local symbols from its output. + (#1460254) + +* Wed Jun 28 2017 Nick Clifton 2.28-10 +- Update support for GNU Build Attribute notes to include version 2 notes. + +* Thu Jun 15 2017 Nick Clifton 2.28-9 +- Update patch to fix AArch64 copy reloc generation. + (#1452170) + +* Fri Jun 09 2017 Nick Clifton 2.28-8 +- Ignore duplicate indirect symbols generated by the GOLD linker. + (#1458003) + +* Thu Jun 08 2017 Nick Clifton 2.28-7 +- Eliminate the generation of incorrect dynamic copy relocations on AArch64. + (#1452170) + +* Mon May 15 2017 Fedora Release Engineering - 2.28-6 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_26_27_Mass_Rebuild + +* Mon Mar 20 2017 Nick Clifton 2.28-5 +- Update GNU BUILD NOTES patch. +- Import FSF binutils patch to fix running readelf on debug info binaries. + (#1434050) + +* Wed Mar 08 2017 Nick Clifton 2.28-4 +- Update GNU BUILD NOTES patch. +- Import FSF binutils patch to fix an abort with PowerPC dynamic relocs. + +* Mon Mar 06 2017 Mark Wielaard 2.28-3 +- Backport patch to add support for putting name, comp_dir and + producer strings into the .debug_str section. + (#1429389) + +* Fri Mar 03 2017 Nick Clifton 2.28-2 +- Add support for GNU BUILD NOTEs. + +* Thu Mar 02 2017 Nick Clifton 2.28-1 +- Rebase on FSF binutils v2.28. +- Retire: binutils-2.23.52.0.1-addr2line-dynsymtab.patch +- Retire: binutils-2.27-local-dynsym-count.patch +- Retire: binutils-2.27-monotonic-section-offsets.patch +- Retire: binutils-2.27-arm-aarch64-default-relro.patch +- Retire: binutils-2.28-gold.patch +- Retire: binutils-2.27-objdump-improvements.patch +- Retire: binutils-2.27-dwarf-parse-speedup.patch +- Retire: binutils-2.27-objdump-improvements.2.patch +- Retire: binutils-2.27-arm-binary-objects.patch +- Retire: binutils-2.27-ppc-fp-attributes.patch +- Add patch to sync libiberty with FSF GCC mainline. + (#1428310) + +* Fri Feb 17 2017 Nick Clifton 2.27-19 +- Add support for PowerPC FP attributes. + (#1422461) + +* Wed Feb 15 2017 Nick Clifton 2.27-18 +- Fix running the ARM port of the linker on BINARY objects. + (#1422577) + +* Fri Feb 10 2017 Fedora Release Engineering - 2.27-17 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_26_Mass_Rebuild + +* Thu Feb 02 2017 Stephen Gallagher 2.27-16 +- Install COPYING[*] files using the % license macro. + (#1418430) + +* Tue Jan 31 2017 Nick Clifton 2.27-15 +- Fix buffer overflows when printing translated messages. + (#1417411) + +* Mon Jan 16 2017 Nick Clifton 2.27-14 +- Include the filename concerned in readelf error messages. + (#1412348) + +* Mon Jan 09 2017 Nick Clifton 2.27-13 +- Another speed up for objdump when displaying source code alognside disassembly. + (#1397113) + +* Tue Nov 22 2016 Nick Clifton 2.27-12 +- Speed up objdump when displaying source code alognside disassembly. + (#1397113) + +* Tue Nov 08 2016 Nick Clifton 2.27-11 +- Fix objdumps disassembly of dynamic executables. + (#1370275) + +* Fri Nov 04 2016 Nick Clifton 2.27-10 +- Fix GOLD for ARM and AARCH64 + (#1386126) + +* Mon Sep 26 2016 Mark Pryor 2.27-9 +- Fix invocation of /sbin/ldconfig when reinstalling binutils + in order to prevent warnings from rpm. + (#1379030) + (#1379117) + +* Thu Sep 22 2016 Mark Pryor 2.27-8 +- Add i386pep emulation for all EFI capable CPU types. + (#1376870) + +* Wed Sep 21 2016 Nick Clifton 2.27-7 +- Use --with-sysroot=/ for native targets. This prevents the default + sysroot of /usr/local//sys-root from being used, which breaks + locating needed shared libaries, but still allows the --sysroot + linker command line option to be effective. + (#1374889) + (#1377803) + (#1377949) + +* Tue Sep 20 2016 Nick Clifton 2.27-6 +- Omit building GOLD when bootstrapping. +- Add a generic build requirement on gcc. +- Move bison and m4 build requirements to be conditional upon building GOLD. +- Add --with-sysroot configure option when building native targets. +- Skip PR14918 linker test for ARM native targets. + (#1374889) + +* Fri Sep 16 2016 Nick Clifton 2.27-5 +- Add support for building the rpm with "--with bootstrap" enabled. +- Retire: binutils-2.20.51.0.2-ia64-lib64.patch + +* Thu Sep 01 2016 Nick Clifton 2.27-4 +- Properly disable the default generation of compressed debug sections. + (#1366182) + +* Fri Aug 19 2016 Nick Clifton 2.27-3 +- Put sections in a monotonically increasing order of file offset. +- Allow ARM and AArch64 targets to have relro on by default. + +* Mon Aug 15 2016 Nick Clifton 2.27-2 +- Fix computation of sh_info field in the header of .dynsym sections. + +* Wed Aug 03 2016 Nick Clifton 2.27-1 +- Rebase on FSF binutils 2.27 release. +- Retire: binutils-2.26-formatting.patch +- Retire: binutils-2.26-Bsymbolic_PIE.patch +- Retire: binutils-rh1312151.patch +- Retire: binutils-2.26-fix-GOT-offset-calculation.patch +- Retire: binutils-2.26-common-definitions.patch +- Retire: binutils-2.26-x86-PIE-relocations.patch + +* Mon Jun 13 2016 Nick Clifton 2.26-23 +- Enable support for GCC's LTO. + (#1342618) + +* Thu Jun 02 2016 Nick Clifton 2.26-22 +- Retire the copy-osabi patch. + (#1252066) + +* Mon May 09 2016 Nick Clifton 2.26-21 +- Fix another compile time warning, this time in tc-arm.c. + (#1333695) + +* Fri Apr 22 2016 Nick Clifton 2.26-20 +- Housekeeping: Delete retired patches. Renumber patches. +- Increase version number past F24 because F24 update is blocked by a version number comparison. + +* Fri Mar 18 2016 Nick Clifton 2.26-16 +- Import patch to fix generation of x86 relocs in PIE mode. (PR 19827) + +* Mon Mar 14 2016 Nick Clifton 2.26-15 +- Import patch to have common symbols in an executable override definitions in shared objects (PR 19579) + (#1312507) + +* Mon Feb 29 2016 Nick Clifton 2.26-14 +- Import patch to fix x86 GOT offset calculation in 2.26 sources (PR 19601) + (#1312489) + +* Fri Feb 26 2016 Nick Clifton 2.26-13 +- Import patch to fix symbol versioning bug in 2.26 sources (PR 19698) + (#1312151) + +* Fri Feb 19 2016 Nick Clifton 2.26-12 +- Import H.J.Lu's kernel LTO patch. + (#1302071) + +* Tue Feb 16 2016 poma 2.26-11 +- Enable -Bsymbolic and -Bsymbolic-functions to PIE. Needed by Syslinux + (#1308296) + +* Wed Feb 10 2016 Nick Clifton 2.26-10 +- Retire: binutils-2.23.2-aarch64-em.patch + (#1305179) + +* Tue Feb 09 2016 Nick Clifton 2.26-9 +- Fix indentation in bfd/elf64-s390.c, gas/config/tc-ia64.c + and bfd/pe-mips.c to avoid compile time warnings. + +* Thu Feb 04 2016 Nick Clifton 2.26-8 +- Fix indentation in bfd/coff-[i386|x86_64].c to avoid compile time warning. +- Suppress GOLD's dir_caches destructor. +- Suppress GOLD's Reloc_stub::Key::name function. +- Suppress unused ARM architecture variations in GAS. + +* Wed Feb 03 2016 Fedora Release Engineering - 2.26-5 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_24_Mass_Rebuild + +* Wed Jan 27 2016 Nick Clifton 2.26-4 +- Drop the kernel patch entirely... +- Retire: binutils-2.25-kernel-ld-r.patch +- Retire: binutils-2.25.1-plugin-format-checking.patch + +* Tue Jan 26 2016 Nick Clifton 2.26-3 +- Fix kernel patch for AVR targets. + +* Mon Jan 25 2016 Nick Clifton 2.26-2 +- Fix kernel patch for PPC32 targets. + +* Mon Jan 25 2016 Nick Clifton 2.26-1 +- Rebase on FSF binutils 2.26 release. +- Retire: binutils-2.25.1-ihex-parsing.patch +- Retire: binutils-2.25.1-dynamic_list.patch +- Retire: binutils-2.25.1-aarch64-pr18668.patch +- Retire: binutils-rh1247126.patch + (#1271387) + +* Thu Nov 05 2015 Nick Clifton 2.25.1-9 +- Prevent an infinite recursion when a plugin tries to claim a file in an unrecognised format. + (#1174065) + +* Wed Oct 28 2015 Nick Clifton 2.25.1-8 +- Enable little endian support when configuring for 64-bit PowerPC. + (#1275709) + +* Thu Sep 24 2015 Nick Clifton 2.25.1-7 +- Fix incorrectly generated binaries and DSOs on PPC platforms. + (#1247126) + +* Fri Sep 11 2015 Nick Clifton 2.25.1-6 +- Fix handling of AArch64 local GOT relocs. (#1262091) + +* Thu Sep 10 2015 Nick Clifton 2.25.1-5 +- Do not enable deterministic archives by default (#1195883) + +* Thu Aug 06 2015 Rex Dieter 2.25.1-4 +- Qt linked with gold crash on startup (#1193044) + +* Tue Aug 04 2015 Nick Clifton - 2.25.1-3 +- Fix the parsing of corrupt iHex files. +- Resovles: 1250141 + +* Tue Aug 04 2015 Nick Clifton - 2.25.1-2 +- Retire: binutils-2.25-aarch64-fPIC-error.patch +- Resovles: 1249969 + +* Thu Jul 23 2015 Nick Clifton - 2.25.1-1 +- Rebase on FSF binutils 2.25.1 release. +- Retire: binutils-2.25-x86_64-pie-relocs.patch + +* Thu Jul 02 2015 Nick Clifton - 2.25-12 +- For AArch64 issue an error message when attempting to resolve a + PC-relative dynamic reloc in a non-PIC object file. +- Related: 1232499 + +* Wed Jun 17 2015 Fedora Release Engineering - 2.25-11 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_23_Mass_Rebuild + +* Wed Jun 10 2015 Nick Clifton - 2.25-10 +- Make the AArch64 GOLD port use 64K pages. +- Resolves: BZ #1225156 and BZ #1215546 + +* Mon Apr 27 2015 Nick Clifton - 2.25-8 +- Require the coreutils so that touch is available. +- Resolves: BZ #1215242 + +* Tue Apr 21 2015 Nick Clifton - 2.25-7 +- Enable building GOLD for the AArch64. +- Resolves: BZ #1203057 + +* Thu Mar 19 2015 Nick Clifton - 2.25-6 +- Remove the windmc manual page, so that it is not installed. +- Resolves: BZ #1203606 + +* Sat Feb 21 2015 Till Maas - 2.25-6 +- Rebuilt for Fedora 23 Change + https://fedoraproject.org/wiki/Changes/Harden_all_packages_with_position-independent_code + +* Mon Feb 02 2015 Nick Clifton - 2.25-5 +- Fix scanning for object symbols in binutils-2.25-kernel-ld-r.patch +- Resolves: BZ #1149660 + +* Tue Jan 20 2015 Nick Clifton - 2.25-4 +- Import the fix for PR ld/17827 from FSF mainline. +- Resolves: BZ #1182511 + +* Mon Jan 12 2015 Nick Clifton - 2.25-3 +- Suppress building of GOLD for PPC, for now... +- Resolves: BZ #1173780 + +* Sat Dec 27 2014 Ralf Corsépius - 2.25-2 +- Reflect configure.info/standards.info having been dropped (RHBZ#1177359). + +* Wed Dec 24 2014 Nick Clifton - 2.25-1 +- Rebase on FSF binutils 2.25 release. +- Retire: binutils-2.24-s390-mkopc.patch +- Retire: binutils-2.24-elfnn-aarch64.patch +- Retire: binutils-2.24-DW_FORM_ref_addr.patch +- Retire: binutils-2.24-set-section-macros.patch +- Retire: binutils-2.24-fake-zlib-sections.patch +- Retire: binutils-2.24-arm-static-tls.patch +- Retire: binutils-2.24-fat-lto-objects.patch +- Retire: binutils-2.24-symbol-warning.patch +- Retire: binutils-2.24-aarch64-ld-shared-non-PIC-xfail.patch +- Retire: binutils-2.24-weak-sym-merge.patch +- Retire: binutils-2.24-indirect-chain.patch +- Retire: binutils-2.24-aarch64-fix-final_link_relocate.patch +- Retire: binutils-2.24-aarch64-fix-gotplt-offset-ifunc.patch +- Retire: binutils-2.24-aarch64-fix-static-ifunc.patch +- Retire: binutils-2.24-aarch64-fix-ie-relax.patch +- Retire: binutils-HEAD-change-ld-notice-interface.patch +- Retire: binutils-2.24-corrupt-binaries.patch +- Retire: binutils-2.24-strings-default-all.patch +- Retire: binutils-2.24-corrupt-ar.patch + +* Thu Nov 13 2014 Nick Clifton - 2.24-29 +- Fix problems with the ar program reported in FSF PR 17533. (1162666, 1162655) + +* Fri Oct 31 2014 Nick Clifton - 2.24-28 +- Fix buffer overrun in ihex parser. +- Fix memory corruption in previous patch. +- Consoldiate corrupt handling patches into just one patch. +- Default strings command to using -a. + +* Wed Oct 29 2014 Nick Clifton - 2.24-27 +- Fix memory corruption bug introduced by the previous patch. + +* Tue Oct 28 2014 Nick Clifton - 2.24-26 +- Import patches for PR/17510 and PR/17512 to fix reading corrupt ELF binaries. (1157276, 1157277) + +* Mon Oct 27 2014 Nick Clifton - 2.24-25 +- Import patch from mainline to fix seg-fault when reading corrupt group headers. (1157276) + +* Fri Oct 24 2014 Nick Clifton - 2.24-24 +- Import patch from mainline to fix seg-fault when reading corrupt srec fields. (1156272) + +* Mon Aug 25 2014 Kyle McMartin - 2.24-23 +- aarch64: increase common page size to 64KB +- binutils-HEAD-change-ld-notice-interface.patch: backport fix from HEAD + that fixes LTO + ifunc when using ld.bfd instead of gold. +- binutils-2.24-aarch64-fix-gotplt-offset-ifunc.patch + binutils-2.24-aarch64-fix-static-ifunc.patch, split elfnn-aarch64 patches + into upstream git commits, to make it easier to figure out what's + backported already +- binutils-2.24-aarch64-fix-ie-relax.patch: add fix for gd to ie relaxation + when target register is >16 (pretty unlikely, but...) + +* Thu Aug 21 2014 Kyle McMartin - 2.24-22 +- bfd/elfnn-aarch64.c: use correct offsets in final_link_relocate + Resolves: BZ #1126199 + +* Thu Aug 21 2014 Nick Clifton - 2.24-21 +- Import patch from mainline to fix indirect symbol resolution. + Resolves: BZ #1123714 + +* Tue Aug 19 2014 Nick Clifton - 2.24-20 +- Enable deterministic archives by default. + Resolves: BZ #1124342 + +* Fri Aug 15 2014 Fedora Release Engineering - 2.24-19 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_21_22_Mass_Rebuild + +* Fri Aug 15 2014 Nick Clifton - 2.24-18 +- Correct elf_merge_st_other arguments for weak symbols. + Resolves: #1126436 + +* Tue Aug 12 2014 Jeff Law - 2.24-17 +- Enable gold for PPC. + +* Tue Jun 24 2014 Kyle McMartin - 2.24-16 +- Backport a couple LTO testsuite fixes from HEAD. + Default to -ffat-lto-objects for some ld tests, which was the default in + gcc 4.8, but changed in 4.9, and resulted in some failures. +- Add STATIC_TLS flag on ARM when IE relocs are emitted in a shared + library. Also fix up offsets in the testsuite resulting from the + addition of the flags. +- XFail some ld tests on AArch64 to cut some of the spurious testsuite + failures down. + +* Sat Jun 07 2014 Fedora Release Engineering - 2.24-15 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_21_Mass_Rebuild + +* Fri May 09 2014 Nick Clifton - 2.24-14 +- Fix detection of little endian PPC64 binaries. (#1095885) + +* Mon Apr 28 2014 Nick Clifton - 2.24-13 +- Fix detection of uncompressed .debug_str sections. (#1082370) + +* Tue Apr 22 2014 Nick Clifton - 2.24-12 +- Fix compiling using gcc 4.9 (#1087374) + +* Thu Mar 27 2014 Nick Clifton - 2.24-11 +- Use {version} in Source string. Delete unused patches. + +* Tue Jan 28 2014 Nick Clifton - 2.24-10 +- Fix decoding of abbrevs using a DW_FORM_ref_addr attribute. (#1056797) + +* Tue Dec 17 2013 Nick Clifton - 2.24-9 +- Import fixes on 2.24 branch that affect AArch64 IFUNC and PLT handling. + +* Thu Dec 05 2013 Nick Clifton - 2.24-8 +- Fix building opcodes library with -Werror=format-security. (#1037026) + +* Wed Dec 04 2013 Jeff Law - 2.24-7 +- Update to official binutils 2.24 release. + +* Thu Nov 21 2013 Nick Clifton - 2.24-6 +- Update binutils 2.24 snapshot. + +* Mon Nov 11 2013 Nick Clifton - 2.24-5 +- Update binutils 2.24 snapshot. +- Switch to using GIT instead of CVS to access the FSF repository. +- Retire binutils-2.24-nm-dynsym.patch + +* Fri Oct 25 2013 Nick Clifton - 2.24-4 +- Update binutils 2.24 snapshot. +- Stop NM from halting if it encounters a file with no symbols when displaying dynamic symbols in multiple files. (#1022845) + +* Fri Oct 18 2013 Nick Clifton - 2.24-3 +- Update binutils 2.24 snapshot. + +* Fri Oct 11 2013 Nick Clifton - 2.24-2 +- Update binutils 2.24 snapshot. + +* Fri Oct 04 2013 Nick Clifton - 2.24-1 +- Rebase on binutils 2.24 snapshot. +- Retire: binutils-2.23.52.0.1-64-bit-thin-archives.patch, +- binutils-2.23.52.0.1-as-doc-texinfo-fixes.patch, +- binutils-2.23.52.0.1-check-regular-ifunc-refs.patch, +- binutils-2.23.2-ld-texinfo-fixes.patch, +- binutils-2.23.2-bfd-texinfo-fixes.patch, +- binutils-2.23.2-dwz-alt-debuginfo.patch +- binutils-2.23.2-s390-gas-machinemode.patch +- binutils-2.23.2-xtensa.memset.patch +- binutils-2.23.2-s390-zEC12.patch +- binutils-2.23.2-arm-add-float-abi-to-e_flags.patch +- binutils-2.23.51.0.1-readelf-flush-stdout.patch + +* Mon Sep 09 2013 Nick Clifton - 2.23.88.0.1-14 +- Make readelf flush stdout before emitting an error or warning message. (#1005182) + +* Fri Aug 30 2013 Kyle McMartin 2.23.88.0.1-13 +- Add the hard-float/soft-float ABI flag as appropriate for + ET_DYN/ET_EXEC in EABI_VER5. +- Fix last changelog entry, it was release 12, not 14. + +* Wed Aug 14 2013 Nick Clifton 2.23.88.0.1-12 +- Add support for the s/390 zEC12 architecture to gas. (#996395) + +* Mon Aug 12 2013 Nick Clifton 2.23.88.0.1-11 +- Fix typos in invocations of memset in elf32-xtensa.c + +* Wed Aug 07 2013 Karsten Hopp 2.23.88.0.1-10 +- disable -Werror on ppc64p7 for #918189 + +* Sat Aug 03 2013 Fedora Release Engineering - 2.23.88.0.1-9 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_20_Mass_Rebuild + +* Fri Jul 19 2013 Nick Clifton - 2.23.88.0.1-8 +- Add support for the S/390 .machinemode pseudo-op to GAS. (#986031) + +* Fri Jul 05 2013 Nick Clifton - 2.23.88.0.1-7 +- Add a requirement for libstdc++-static when running the GOLD testsuite. + +* Wed Jun 05 2013 Nick Clifton - 2.23.88.0.1-6 +- Fix building of aarch64 targets after applying the patch for kernel ld -r modules. +- Fix building when "--with debug" is specified. + +* Wed May 29 2013 Nick Clifton - 2.23.88.0.1-5 +- Add support for the alternative debuging files generated by the DWZ program. (#965255) + +* Fri May 17 2013 Nick Clifton - 2.23.88.0.1-4 +- Import H.J.'s patch to add support for kernel ld -r modules. +- Fix errors reported by version 5.0 of texinfo when parsing bfd documentation. + +* Fri Apr 26 2013 Nick Clifton - 2.23.88.0.1-3 +- Fix errors reported by version 5.0 of texinfo when parsing assembler documentation. + +* Thu Apr 25 2013 Nick Clifton - 2.23.88.0.1-2 +- Fix errors reported by version 5.0 of texinfo when parsing linker documentation. + +* Wed Apr 24 2013 Nick Clifton - 2.23.88.0.1-1 +- Switch over to basing sources on the official FSF binutils releases. +- Retire binutils-2.23.52.0.1-revert-pr15149.patch. +- Update binutils-2.22.52.0.1-relro-on-by-default.patch and binutils-2.23.52.0.1-as-doc-texinfo-fixes.patch. + +* Wed Apr 17 2013 Nick Clifton - 2.23.52.0.1-10 +- Import patch for FSF mainline PR 15371 to fix ifunc references in shared libraries. (#927818) + +* Thu Mar 14 2013 Nick Clifton - 2.23.52.0.1-9 +- Enhance opncls.c:find_separate_debug_file() to look in Fedora specific locations. +- Enhance dwarf2.c:find_line() to work with shared libraries. (#920542) + +* Wed Mar 13 2013 Nick Clifton - 2.23.52.0.1-8 +- Fix addr2line to use dynamic symbols if it failed to canonicalize ordinary symbols. (#920542) + +* Wed Mar 13 2013 Nick Clifton - 2.23.52.0.1-7 +- Change requirement to explicitly depend upon /usr/bin/pod2man. (#920545) + +* Wed Mar 13 2013 Nick Clifton - 2.23.52.0.1-6 +- Require perl for pod2man for building man pages. (#920545) + +* Fri Mar 08 2013 Nick Clifton - 2.23.52.0.1-5 +- Reverts patch for PR15149 - prevents report weak DT_NEEDED symbols. (#918003) + +* Wed Mar 06 2013 Nick Clifton - 2.23.52.0.1-4 +- Enable building of GOLD for the ARM. (#908966) + +* Mon Mar 04 2013 Nick Clifton - 2.23.52.0.1-3 +- Fix errors reported by version 5.0 of texinfo when parsing assembler documentaion. + +* Fri Mar 01 2013 Nick Clifton - 2.23.52.0.1-2 +- Fix the creation of index tables in 64-bit thin archives. (#915411) + +* Thu Feb 28 2013 Nick Clifton - 2.23.52.0.1-1 +- Rebase on 2.23.51.0.1 release. (#916516) + +* Fri Feb 08 2013 Nick Clifton - 2.23.51.0.9-2 +- Enable 64-bit BFD for aarch64. (#908904) + +* Mon Feb 04 2013 Nick Clifton - 2.23.51.0.9-1 +- Rebase on 2.23.51.0.9 release. (#907089) +- Retire binutils-2.23.51.0.8-arm-whitespace.patch. + +* Mon Jan 21 2013 Nick Clifton - 2.23.51.0.8-4 +- Allow more whitespace in ARM instructions. (#892261) + +* Tue Jan 15 2013 Patsy Franklin - 2.23.51.0.8-3 +- Add bc to BuildRequires when running the testsuite. (#895321) + +* Wed Jan 02 2013 Nick Clifton - 2.23.51.0.8-2 +- Add runtime link with libdl. (#889134) + +* Wed Jan 02 2013 Nick Clifton - 2.23.51.0.8-1 +- Rebase on 2.23.51.0.8 release. (#890382) + +* Fri Dec 21 2012 Nick Clifton - 2.23.51.0.7-1 +- Rebase on 2.23.51.0.7 release. (#889432) + +* Tue Nov 27 2012 Nick Clifton - 2.23.51.0.6-1 +- Rebase on 2.23.51.0.6 release. (#880508) + +* Tue Nov 13 2012 Nick Clifton - 2.23.51.0.5-1 +- Rebase on 2.23.51.0.5 release. (#876141) +- Retire binutils-2.23.51.0.3-arm-ldralt.patch + +* Tue Oct 23 2012 Nick Clifton - 2.23.51.0.3-3 +- Rename ARM LDRALT instruction to LDALT. (#869025) PR/14575 + +* Mon Oct 15 2012 Jon Ciesla - 2.23.51.0.3-2 +- Provides: bundled(libiberty) + +* Tue Oct 02 2012 Nick Clifton - 2.23.51.0.3-1 +- Rebase on 2.23.51.0.3 release. (#858560) + +* Tue Sep 11 2012 Nick Clifton - 2.23.51.0.2-1 +- Rebase on 2.23.51.0.2 release. (#856119) +- Retire binutils-2.23.51.0.1-gold-keep.patch and binutils-rh805974.patch. + +* Tue Sep 4 2012 Jeff Law 2.23.51.0.1-4 +- Correctly handle PLTOFF relocs for s390 IFUNCs. + +* Tue Aug 14 2012 Karsten Hopp 2.23.51.0.1-3 +- apply F17 commit cd2fda5 to honour {powerpc64} macro (#834651) + +* Tue Aug 14 2012 Nick Clifton - 2.23.51.0.1-2 +- Make GOLD honour KEEP directives in linker scripts (#8333355) + +* Wed Aug 08 2012 Nick Clifton - 2.23.51.0.1-1 +- Rebase on 2.23.51.0.1 release. (#846433) +- Retire binutils-2.22.52.0.4-dwz.patch, binutils-2.22.52.0.4-ar-4Gb.patch, binutils-2.22.52.0.4-arm-plt-refcount.patch, binutils-2.22.52.0.4-s390-64bit-archive.patch. + +* Thu Aug 02 2012 Nick Clifton - 2.22.52.0.4-8 +- Make the binutils-devel package depend upon the binutils package. (#845082) + +* Thu Aug 02 2012 Nick Clifton - 2.22.52.0.4-7 +- Disable checks that config.h is included before system headers. (#845084) + +* Tue Jul 17 2012 Nick Clifton - 2.22.52.0.4-6 +- Use 64bit indicies in archives for s390 binaries. (#835957) + +* Thu Jul 05 2012 Nick Clifton - 2.22.52.0.4-5 +- Catch attempts to create a broken symbol index with archives > 4Gb in size. (#835957) + +* Fri Jun 29 2012 Nick Clifton - 2.22.52.0.4-4 +- Import fix for ld/14189. (#829311) + +* Fri Jun 29 2012 Nick Clifton - 2.22.52.0.4-3 +- Fix handling of archives > 4Gb in size by importing patch for PR binutils/14302. (#835957) + +* Tue Jun 19 2012 Jakub Jelinek - 2.22.52.0.4-2 +- Add minimal dwz -m support. + +* Wed Jun 06 2012 Nick Clifton - 2.22.52.0.4-1 +- Rebase on 2.22.52.0.4 release. (#829027) + +* Tue May 08 2012 Nick Clifton - 2.22.52.0.3-1 +- Rebase on 2.22.52.0.3 release. (#819823) + +* Mon Apr 30 2012 Nick Clifton - 2.22.52.0.2-1 +- Rebase on 2.22.52.0.2 release. (#816514) +- Retire binutils-2.22.52.0.1-weakdef.patch, binutils-2.22.52.0.1-ld-13621.patch, binutils-rh797752.patch, binutils-2.22.52.0.1-x86_64-hidden-ifunc.patch, binutils-2.22.52.0.1-tsx.patch and binutils-2.22.52.0.1-hidden-ifunc.patch. +- Update binutils-2.22.52.0.1-reloc-on-by-default.patch. + +* Fri Apr 27 2012 Nick Clifton - 2.22.52.0.1-12 +- Include demangle.h in the devel rpm. + +* Tue Apr 03 2012 Nick Clifton - 2.22.52.0.1-11 +- Enable -zrelro by default for RHEL 7+. (#807831) + +* Fri Mar 16 2012 Jakub Jelinek - 2.22.52.0.1-10 +- Fix up handling of hidden ifunc relocs on i?86 + +* Wed Mar 14 2012 Jeff Law - 2.22.52.0.1-9 +- Fix c++filt docs (2nd instance) (#797752) + +* Wed Mar 07 2012 Jakub Jelinek - 2.22.52.0.1-8 +- Fix up handling of hidden ifunc relocs on x86_64 +- Add Intel TSX support + +* Tue Mar 06 2012 Nick Clifton - 2.22.52.0.1-7 +- Enable -zrelro by default. (#621983 #807831) + +* Mon Feb 27 2012 Jeff Law - 2.22.52.0.1-6 +- Fix c++filt docs (#797752) + +* Wed Feb 15 2012 Mark Wielaard - 2.22.52.0.1-5 +- Add upstream ld/13621 'dangling global hidden symbol in symtab' patch. + +* Wed Feb 08 2012 Adam Williamson - 2.22.52.0.1-4 +- Actually apply the patch + +* Wed Feb 08 2012 Adam Williamson - 2.22.52.0.1-3 +- Add upstream weakdef.patch to fix RH #788107 + +* Wed Feb 01 2012 Nick Clifton - 2.22.52.0.1-2 +- Drat - forgot to upload the new tarball. Now done. + +* Wed Feb 01 2012 Nick Clifton - 2.22.52.0.1-1 +- Rebase on 2.22.52 release. +- Remove build-id.patch and gold-casts.patch as they are included in the 2.22.52 sources. + +* Fri Jan 13 2012 Nick Clifton - 2.22-4 +- Fix bug in GOLD sources parsing signed integers in command line options. + +* Fri Jan 13 2012 Nick Clifton - 2.22-3 +- Add casts for building gold with 4.7 version of gcc. + +* Thu Jan 12 2012 Fedora Release Engineering - 2.22-2 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_17_Mass_Rebuild + +* Tue Nov 22 2011 Nick Clifton - 2.22-1 +- Rebase on 2.22 release. + +* Fri Sep 30 2011 Ricky Zhou - 2.21.53.0.2-2 +- Rebuild libopcodes.a with -fPIC. + +* Tue Aug 09 2011 Nick Clifton - 2.21.53.0.2-1 +- Rebase on 2.21.53.0.2 tarball. Delete unneeded patches. (BZ 728677) + +* Tue Aug 02 2011 Nick Clifton - 2.21.53.0.1-3 +- Update libiberty demangling. (BZ 727453) + +* Wed Jul 27 2011 Nick Clifton - 2.21.53.0.1-2 +- Import Jakub Jelinek's patch to add support for displaying the contents of .debug_macro sections. + +* Tue Jul 19 2011 Nick Clifton - 2.21.53.0.1-1 +- Rebase on 2.21.53.0.1 tarball. Delete unneeded patches. (BZ 712668) + +* Fri Jun 24 2011 Nick Clifton - 2.21.52.0.1-5 +- Import fix for PR ld/12921. + +* Fri Jun 24 2011 Nick Clifton - 2.21.52.0.1-4 +- Run "alternatives --auto" to restore ld symbolic link if it was manually configured. (BZ 661247) + +* Thu Jun 16 2011 Nick Clifton - 2.21.52.0.1-3 +- Fix seg-fault attempting to find a function name without a symbol table. (BZ 713471) + +* Fri Jun 10 2011 Nick Clifton - 2.21.52.0.1-2 +- Import fix for PR ld/12851 (BZ 711268) + +* Thu Jun 09 2011 Nick Clifton - 2.21.52.0.1-1 +- Rebase on 2.21.52.0.1 tarball. (BZ 712025) + +* Tue May 17 2011 Nick Clifton - 2.21.51.0.9-1 +- Rebase on 2.21.51.0.9 tarball. (BZ 703105) + +* Mon May 2 2011 Peter Robinson - 2.21.51.0.8-3 +- Add ARM to BFD checks + +* Mon Apr 11 2011 Nick Clifton - 2.21.51.0.8-2 +- Delete plugins patch - enable plugins via configure option. + +* Mon Apr 11 2011 Nick Clifton - 2.21.51.0.8-1 +- Rebase on 2.21.51.0.8 tarball. + +* Thu Mar 17 2011 Nick Clifton - 2.21.51.0.7-1 +- Rebase on 2.21.51.0.7 tarball. + +* Tue Mar 08 2011 Nick Clifton - 2.21.51.0.6-2 +- Enable gold plugins. (BZ 682852) + +* Thu Feb 10 2011 Nick Clifton - 2.21.51.0.6-1 +- Rebase on 2.21.51.0.6 tarball. + +* Mon Feb 07 2011 Fedora Release Engineering - 2.21.51.0.5-4 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_15_Mass_Rebuild + +* Fri Jan 28 2011 Jakub Jelinek - 2.21.51.0.5-3 +- Readd --build-id fix patch. (PR ld/12451) + +* Thu Jan 6 2011 Dan Horák - 2.21.51.0.5-2 +- fix build on non-gold arches like s390(x) where both ld and ld.bfd is installed + +* Wed Jan 5 2011 Nick Clifton - 2.21.51.0.5-1 +- Rebase on 2.21.51.0.5 tarball. +- Delete redundant patches. +- Fix gold+ld configure command line option. + +* Fri Nov 5 2010 Dan Horák - 2.20.51.0.12-2 +- "no" is not valid option for --enable-gold + +* Thu Oct 28 2010 Nick Clifton - 2.20.51.0.12-1 +- Rebase on 2.20.51.0.12 tarball. (BZ 582160) + +* Fri Sep 10 2010 Nick Clifton - 2.20.51.0.11-1 +- Rebase on 2.20.51.0.11 tarball. (BZ 631771) + +* Fri Aug 20 2010 Nick Clifton - 2.20.51.0.10-3 +- Allow ^ and ! characters in linker script wildcard patterns. (BZ 621742) + +* Fri Aug 20 2010 Nick Clifton - 2.20.51.0.10-2 +- Fix seg fault in sec_merge_emit(). (BZ 623687) + +* Tue Aug 10 2010 Nick Clifton - 2.20.51.0.10-1 +- Rebase on 2.20.51.0.10 tarball. +- Import GOLD sources from binutils mainline as of 10 Aug 2010. + +* Wed Jun 30 2010 Nick Clifton - 2.20.51.0.7-5 +- Rename the binutils-static package to binutils-devel in line with the Fedora packaging guidelines. + +* Wed Jun 9 2010 Nick Clifton - 2.20.51.0.7-4 +- Allow GOLD linker to parse "-l" directives inside INPUT statements in linker scripts. (BZ 600553) + +* Tue May 4 2010 Nick Clifton - 2.20.51.0.7-3 +- Allow unique symbols in archive maps. + +* Tue Apr 20 2010 Nick Clifton - 2.20.51.0.7-2 +- Merge binutils-devel package into binutils-static package. (BZ 576300) + +* Thu Apr 8 2010 Nick Clifton - 2.20.51.0.7-1 +- Rebase on 2.20.51.0.7 tarball. +- Delete redundant patches: + binutils-2.20.51.0.2-add-needed.patch, + binutils-2.20.51.0.2-do-not-set-ifunc.patch, + binutils-2.20.51.0.2-enable-gold.patch, + binutils-2.20.51.0.2-gas-expr.patch, + binutils-2.20.51.0.2-ifunc-ld-s.patch, + binutils-2.20.51.0.2-lwp.patch, + binutils-2.20.51.0.2-ppc-hidden-plt-relocs.patch, + binutils-2.20.51.0.2-x86-hash-table.patch, +- Do not allow unique symbols to be bound locally. (PR ld/11434) +- Add support for DWARF4 debug information. + +* Thu Mar 4 2010 Nick Clifton - 2.20.51.0.2-17 +- Do not set ELFOSABI_LINUX on binaries which just link to IFUNC using DSOs. (BZ 568941) + +* Tue Mar 2 2010 Nick Clifton - 2.20.51.0.2-16 +- Copy the OSABI field in ELF headers, if set. (BZ 568921) + +* Fri Feb 12 2010 Nick Clifton - 2.20.51.0.2-15 +- Create separate static and devel sub-packages. (BZ 556040) + +* Tue Feb 2 2010 Nick Clifton - 2.20.51.0.2-14 +- Fix seg-fault when linking mixed x86 and x86_64 binaries. (BZ 487472) + +* Fri Jan 22 2010 Nick Clifton - 2.20.51.0.2-13 +- Add a requirement for the coreutils. (BZ 557006) + +* Wed Jan 20 2010 Nick Clifton - 2.20.51.0.2-12 +- Fix --no-copy-dt-needed so that it will not complain about weak references. + +* Fri Dec 18 2009 Nick Clifton - 2.20.51.0.2-11 +- Add missing part of PR 11088 patch. + +* Thu Dec 17 2009 Nick Clifton - 2.20.51.0.2-10 +- Apply patch for PR 11088. (BZ 544149) + +* Wed Dec 9 2009 Nick Clifton - 2.20.51.0.2-9 +- Apply patch for PR 10856. (BZ 544358) + +* Tue Dec 1 2009 Roland McGrath - 2.20.51.0.2-8 +- Build gold only for x86 flavors until others are tested. + +* Tue Nov 24 2009 Roland McGrath - 2.20.51.0.2-7 +- Add support for building gold. + +* Mon Nov 9 2009 Jakub Jelinek 2.20.51.0.2-5 +- Fix up --copy-dt-needed-entries default. (Nick Clifton) + +* Mon Nov 9 2009 Jakub Jelinek 2.20.51.0.2-4 +- Fix ld -s with IRELATIVE relocations. (BZ 533321, PR ld/10911) +- Add AMD Orochi LWP support, fix FMA4 support. + +* Thu Nov 05 2009 Nick CLifton 2.20.51.0.2-3 +- Rename --add-needed to --copy-dt-needed-entries and improve error message about unresolved symbols in DT_NEEDED DSOs. + +* Tue Oct 27 2009 Jan Kratochvil 2.20.51.0.2-2 +- Fix rpm --excludedocs (BZ 515922). +- Fix spurious scriplet errors by `exit 0'. (BZ 517979, Nick Clifton) + +* Mon Oct 12 2009 Nick Clifton 2.20.51.0.2-1 +- Rebase on 2.20 tarball. +- Remove redundant moxie patch. +- Remove redundant unique is global patch. +- Remove redundant cxxfilt java doc patch. + +* Tue Sep 29 2009 Jan Kratochvil 2.19.51.0.14-32 +- Remove spurious description of nonexistent --java switch for cxxfilt. + +* Thu Aug 6 2009 Jakub Jelinek 2.19.51.0.14-31 +- Fix strip on objects with STB_GNU_UNIQUE symbols. (BZ 515700, PR binutils/10492) + +* Fri Jul 24 2009 Fedora Release Engineering - 2.19.51.0.14-30 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_12_Mass_Rebuild + +* Wed Jul 22 2009 Nick Clifton 2.19.51.0.11-28 +- Rebase sources on 2.19.51.0.14 tarball. Gain fixes for PRs 10429 and 10433. + +* Wed Jul 22 2009 Nick Clifton 2.19.51.0.11-28 +- Rebase sources on 2.19.51.0.13 tarball. Remove redundant orphan section placement patch. (BZ 512937) + +* Tue Jul 14 2009 Nick Clifton 2.19.51.0.11-27 +- Add patch to allow moxie target to build, and hence --enable-targets=all to work. + +* Tue Jul 14 2009 Nick Clifton 2.19.51.0.11-26 +- Import orphan section placement patch from mainline. (BZ 510384) + +* Tue Jul 14 2009 Nick Clifton 2.19.51.0.11-25 +- Fix build-id patch to avoid memory corruption. (BZ 501582) + +* Sat Jul 11 2009 Jan Kratochvil 2.19.51.0.11-24 +- Provide uuencode output of the testsuite results. + +* Tue Jun 30 2009 Nick Clifton 2.19.51.0.11-23 +- Rebase sources on the 2.19.51.0.11 tarball. + +* Mon Jun 22 2009 Nick Clifton 2.19.51.0.10-22 +- Rebase sources on the 2.19.51.0.10 tarball. + +* Thu Jun 11 2009 Nick Clifton 2.19.51.0.2-21 +- Do not attempt to set execute permission on non-regular files. (BZ 503426) + +* Tue Jun 9 2009 Jakub Jelinek 2.19.51.0.2-20 +- Fix .cfi_* skip over >= 64KB of code. (PR gas/10255) + +* Wed May 27 2009 Nick Clifton 2.19.51.0.2-19 +- Import fix for binutils PR #9938. (BZ 500295) + +* Wed Apr 15 2009 Nick Clifton 2.19.51.0.2-18 +- Update IBM Power 7 support patch to fix tlbilx opcode. (BZ 494718) + +* Tue Mar 17 2009 Nick Clifton 2.19.51.0.2-17 +- Add glibc-static to BuildRequires when running the testsuite. + +* Thu Mar 05 2009 Nick Clifton 2.19.51.0.2-16 +- Add IBM Power7 support. (BZ 487887) + +* Mon Mar 02 2009 Nick Clifton 2.19.51.0.2-15 +- Add IFUNC support. (BZ 465302) + +* Mon Feb 23 2009 Fedora Release Engineering - 2.19.51.0.2-14 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_11_Mass_Rebuild + +* Mon Feb 23 2009 Jan Kratochvil 2.19.50.0.2-13 +- Rediff the symbolic-envvar-revert patch to comply with rpm patch --fuzz=0. + +* Thu Feb 5 2009 Nick Clifton 2.19.51.0.2-12 +- Rebase sources on 2.19.51.0.2 tarball. Remove linkonce-r-discard and + gcc-expect-table patches. + +* Mon Feb 2 2009 Jan Kratochvil 2.19.50.0.1-11 +- Fix .eh_frame_hdr build also for .gcc_except_table LSDA refs (BZ 461675). + +* Fri Jan 23 2009 Nick Clifton 2.19.50.0.1-10 +- Only require dejagnu if the testsuites are going to be run. (BZ 481169) + +* Sat Nov 29 2008 Nick Clifton 2.19.50.0.1-8 +- Add build-id patch to ensure that section contents are incorporated + into a build id. (BZ 472152) + +* Fri Nov 21 2008 Nick Clifton 2.19.50.0.1 +- Rebase sources on 2.19.50.0.1 tarball. Update all patches, trimming + those that are no longer needed. + +* Thu Oct 30 2008 Jan Kratochvil 2.18.50.0.9-7 +- Fix %%{_prefix}/include/bfd.h on 32-bit hosts due the 64-bit BFD target + support from 2.18.50.0.8-2 (BZ 468495). + +* Thu Oct 30 2008 Jan Kratochvil 2.18.50.0.9-6 +- binutils-devel now requires zlib-devel (BZ 463101 comment 5). +- Fix complains on .gnu.linkonce.r relocations to their discarded + .gnu.linkonce.t counterparts. + +* Mon Sep 22 2008 Jan Kratochvil 2.18.50.0.9-5 +- Remove %%makeinstall to comply with the spu-binutils review (BZ 452211). + +* Mon Sep 22 2008 Jan Kratochvil 2.18.50.0.9-4 +- Fix *.so scripts for multilib linking (BZ 463101, suggested by Jakub Jelinek). + +* Sun Sep 21 2008 Jan Kratochvil 2.18.50.0.9-3 +- Provide libbfd.so and libopcodes.so for automatic dependencies (BZ 463101). +- Fix .eh_frame_hdr build on C++ files with discarded common groups (BZ 458950). +- Provide --build and --host to fix `rpmbuild --target' biarch builds. +- Include %%{binutils_target}- filename prefix for binaries for cross builds. +- Fix multilib conflict on %%{_prefix}/include/bfd.h's BFD_HOST_64BIT_LONG_LONG. + +* Mon Sep 15 2008 Jan Kratochvil 2.18.50.0.9-2 +- Package review, analysed by Jon Ciesla and Patrice Dumas (BZ 225615). + - build back in the sourcedir without problems as gasp is no longer included. + - Fix the install-info requirement. + - Drop the needless gzipping of the info files. + - Provide Obsoletes versions. + - Use the %%configure macro. + +* Sat Aug 30 2008 Jan Kratochvil 2.18.50.0.9-1 +- Update to 2.18.50.0.9. + - Drop the ppc-only spu target pre-build stage (BZ 455242). + - Drop parsing elf64-i386 files for kdump PAE vmcore dumps (BZ 457189). +- New .spec BuildRequires zlib-devel (/-static) for compressed sections. +- Update .spec Buildroot to be more unique. + +* Fri Aug 1 2008 Jan Kratochvil 2.18.50.0.8-2 +- Fix parsing elf64-i386 files for kdump PAE vmcore dumps (BZ 457189). +- Turn on 64-bit BFD support for i386, globally enable AC_SYS_LARGEFILE. +- `--with debug' builds now with --disable-shared. +- Removed a forgotten unused ld/eelf32_spu.c workaround from 2.18.50.0.8-1. + +* Thu Jul 31 2008 Jan Kratochvil 2.18.50.0.8-1 +- Update to 2.18.50.0.8. + - Drop the .clmul -> .pclmul renaming backport. +- Add %%{binutils_target} macro to support building cross-binutils. + (David Woodhouse) +- Support `--without testsuite' to suppress the testsuite run. +- Support `--with debug' to build without optimizations. +- Refresh the patchset with fuzz 0 (for new rpmbuild). +- Enable the spu target on ppc/ppc64 (BZ 455242). + +* Wed Jul 16 2008 Jan Kratochvil 2.18.50.0.6-4 +- include the `dist' tag in the Release number +- libbfd.a symbols visibility is now hidden (for #447426, suggested by Jakub) + +* Wed Jul 16 2008 Jan Kratochvil 2.18.50.0.6-3 +- rebuild libbfd.a with -fPIC for inclusion into shared libraries (#447426) + +* Tue Apr 8 2008 Jakub Jelinek 2.18.50.0.6-2 +- backport .clmul -> .pclmul renaming + +* Fri Apr 4 2008 Jakub Jelinek 2.18.50.0.6-1 +- update to 2.18.50.0.6 + - Intel AES, CLMUL, AVX/FMA support + +* Mon Mar 3 2008 Jakub Jelinek 2.18.50.0.4-2 +- revert aranges optimization (Alan Modra, BZ#5303, BZ#5755) +- fix ld-shared testcase for GCC 4.3 (H.J. Lu) + +* Fri Feb 29 2008 Jakub Jelinek 2.18.50.0.4-1 +- update to 2.18.50.0.4 + +* Tue Feb 19 2008 Fedora Release Engineering 2.18.50.0.3-2 +- Autorebuild for GCC 4.3 + +* Wed Dec 12 2007 Jakub Jelinek 2.18.50.0.3-1 +- update to 2.18.50.0.3 + - fix build with recent makeinfo (#415271) + +* Thu Aug 16 2007 Jakub Jelinek 2.17.50.0.18-1 +- update to 2.17.50.0.18 + - GPLv3+ + - preserve .note.gnu.build-id in objcopy --only-keep-debug (#251935) + - fix sparc64/alpha broken by --build-id patch (#252936) +- update License tag +- fix ld crash with --build-id and non-ELF output format (Alan Modra, BZ#4923) + +* Tue Jul 31 2007 Jakub Jelinek 2.17.50.0.17-7 +- fix ppc32 secure PLT detection (Alan Modra) + +* Wed Jul 25 2007 Jakub Jelinek 2.17.50.0.17-6 +- rebuilt to make sure even libbfd.so and libopcodes.so aren't + broken by #249435 + +* Tue Jul 24 2007 Jakub Jelinek 2.17.50.0.17-5 +- add .note.gnu.build-id into default linker script (#249435) + +* Tue Jul 24 2007 Jakub Jelinek 2.17.50.0.17-4 +- don't kill the %%{_gnu} part of target name on arm + (Lennert Buytenhek, #243516) +- create just one PT_NOTE segment header for all consecutive SHT_NOTE + sections + +* Wed Jul 18 2007 Roland McGrath 2.17.50.0.17-3 +- fix for ld --build-id + +* Sun Jul 15 2007 Roland McGrath 2.17.50.0.17-2 +- ld --build-id support + +* Wed Jun 27 2007 Jakub Jelinek 2.17.50.0.17-1 +- update to 2.17.50.0.17 + +* Tue Jun 12 2007 Jakub Jelinek 2.17.50.0.16-1 +- update to 2.17.50.0.16 + +* Sat Apr 14 2007 Jakub Jelinek 2.17.50.0.12-4 +- fix linking non-ELF input objects into ELF output (#235747) + +* Wed Mar 14 2007 Jakub Jelinek 2.17.50.0.12-3 +- don't require matching ELF_OSABI for target vecs with ELFOSABI_NONE, + only prefer specific osabi target vecs over the generic ones + (H.J.Lu, #230964, BZ#3826) +- build libbfd.so and libopcodes.so with -Bsymbolic-functions + +* Fri Mar 2 2007 Jakub Jelinek 2.17.50.0.12-2 +- ignore install-info errors from scriptlets (#223678) + +* Thu Mar 1 2007 Jakub Jelinek 2.17.50.0.12-1 +- update to 2.17.50.0.12 +- revert the misdesigned LD_SYMBOLIC{,_FUNCTIONS} env var support, + only support -Bsymbolic/-Bsymbolic-functions/--dynamic-list* + +* Mon Jan 8 2007 Jakub Jelinek 2.17.50.0.9-1 +- update to 2.17.50.0.9 +- fix tekhex reader + +* Sat Dec 23 2006 Jakub Jelinek 2.17.50.0.8-2 +- fix --as-needed on ppc64 (#219629) + +* Sun Dec 3 2006 Jakub Jelinek 2.17.50.0.8-1 +- update to 2.17.50.0.8 +- initialize frch_cfi_data (BZ#3607) + +* Fri Dec 1 2006 Jakub Jelinek 2.17.50.0.7-1 +- update to 2.17.50.0.7 + - .cfi_personality and .cfi_lsda directives, per subsection .cfi_* + directives, better .eh_frame CIE merging + +* Thu Nov 9 2006 Jakub Jelinek 2.17.50.0.6-3 +- fix popcnt instruction assembly and disassembly on amd64 (#214767) + +* Mon Oct 23 2006 Jakub Jelinek 2.17.50.0.6-2 +- update to 2.17.50.0.6 + - fix for section relative linker script defined symbols in + empty sections (#207598, BZ#3267) + - fix handling of DW_CFA_set_loc in .eh_frame optimizations + - fix R_PPC_{PLT,GOT{,_TLSGD,_TLSLD,_TPREL,_DTPREL}}16_HA relocation + handling with weak undefined symbols (Alan Modra, #211094) + +* Tue Sep 12 2006 Jakub Jelinek 2.17.50.0.3-6 +- fix multilib conflict in %%{_prefix}/include/bfd.h + +* Tue Sep 12 2006 Jakub Jelinek 2.17.50.0.3-5 +- fix efi-app-ia64 magic number (#206002, BZ#3171) + +* Tue Sep 5 2006 Jakub Jelinek 2.17.50.0.3-4 +- link libopcodes*.so against libbfd*.so (#202327) +- split *.a and header files into binutils-devel + +* Fri Aug 18 2006 Jakub Jelinek 2.17.50.0.3-3 +- on ppc and ppc64 increase default -z commonpagesize to 64K (#203001) + +* Fri Jul 28 2006 Alexandre Oliva 2.17.50.0.3-2 +- do not infer x86 arch implicitly based on instruction in the input + (#200330) + +* Mon Jul 17 2006 Jakub Jelinek 2.17.50.0.3-1 +- update to 2.17.50.0.3 + +* Fri Jul 14 2006 Jakub Jelinek 2.17.50.0.2-8 +- add support for new AMDFAM10 instructions (#198281, IT#97662) +- add -march=/-mtune= gas support on x86/x86-64 +- x86/x86-64 nop insn improvements +- fix DT_GNU_HASH shift count value computation + +* Tue Jul 11 2006 Jakub Jelinek 2.17.50.0.2-7 +- add DT_GNU_HASH support (--hash-style=gnu and --hash-style=both + ld options) + +* Thu Jun 29 2006 Jakub Jelinek 2.17.50.0.2-4 +- fix i?86 TLS GD->IE transition in executables (#196157, BZ#2513) + +* Mon Jun 19 2006 Jakub Jelinek 2.17.50.0.2-3 +- fix two places in ld that misbehaved with MALLOC_PERTURB_=N +- fix .tls_common handling in relocatable linking + +* Mon Jun 5 2006 Jakub Jelinek 2.17.50.0.2-2 +- fix --as-needed (Alan Modra, #193689, BZ#2721) + +* Thu Jun 1 2006 Jakub Jelinek 2.17.50.0.2-1 +- update to 2.17.50.0.2 +- update from CVS to 20060601 +- speed up the ELF linker by caching the result of kept section check + (H.J. Lu) + +* Tue May 9 2006 Jakub Jelinek 2.17.50.0.1-1 +- update to 2.17.50.0.1 + +* Fri Mar 31 2006 Jakub Jelinek 2.16.91.0.6-6 +- fix ld error message formatting, so that collect2 parser can + parse it again for g++ -frepo (#187142) + +* Thu Mar 9 2006 Alexandre Oliva 2.16.91.0.6-4 +- fix relaxation of TLS GD to LE on PPC (#184590) + +* Fri Mar 3 2006 Jakub Jelinek 2.16.91.0.6-3 +- support DW_CFA_val_{offset,offset_sf,expression} in readelf/objdump + +* Tue Feb 28 2006 Jakub Jelinek 2.16.91.0.6-2 +- add MNI support on i?86/x86_64 (#183080) +- support S signal frame augmentation flag in .eh_frame, + add .cfi_signal_frame support (#175951, PR other/26208, BZ#300) + +* Tue Feb 14 2006 Jakub Jelinek 2.16.91.0.6-1 +- update to 2.16.91.0.6 + - fix ppc64 --gc-sections + - disassembler fixes for x86_64 cr/debug regs + - fix linker search order for DT_NEEDED libs + +* Mon Jan 02 2006 Jakub Jelinek 2.16.91.0.5-1 +- update to 2.16.91.0.5 +- don't error about .toc1 references to discarded sectiosn on ppc64 + (#175944) + +* Wed Dec 14 2005 Jakub Jelinek 2.16.91.0.3-2 +- put .gnu.linkonce.d.rel.ro.* sections into relro region + +* Fri Dec 09 2005 Jesse Keating +- rebuilt + +* Fri Nov 11 2005 Jakub Jelinek 2.16.91.0.3-1 +- update to 2.16.91.0.3 +- add .weakref support (Alexandre Oliva, #115157, #165728) + +* Thu Aug 18 2005 Jakub Jelinek 2.16.91.0.2-4 +- install-info also configure.info +- update standards.texi from gnulib (#165530) + +* Tue Aug 16 2005 Jakub Jelinek 2.16.91.0.2-3 +- update to 20050816 CVS +- better fix for ld-cdtest +- fix symbol version script parsing + +* Fri Jul 29 2005 Jakub Jelinek 2.16.91.0.2-2 +- don't complain about relocs to discarded sections in ppc32 + .got2 sections (Alan Modra, PR target/17828) + +* Fri Jul 22 2005 Jakub Jelinek 2.16.91.0.2-1 +- update to 2.16.91.0.2 + +* Thu Jul 21 2005 Jakub Jelinek 2.16.91.0.1-3 +- fix buffer overflow in readelf ia64 unwind printing code +- use vsnprintf rather than vsprintf in gas diagnostics (Tavis Ormandy) +- fix ld-cdtest when CFLAGS contains -fexceptions + +* Wed Jul 20 2005 Jakub Jelinek 2.16.91.0.1-2 +- update to 20050720 CVS + +* Mon Jul 11 2005 Jakub Jelinek 2.16.91.0.1-1 +- update to 2.16.91.0.1 plus 20050708 CVS + +* Wed Jun 15 2005 Jakub Jelinek 2.16.90.0.3-1 +- update to 2.16.90.0.3 +- update to 20050615 CVS + - ppc32 secure PLT support (Alan Modra) +- further bfd/readelf robustification + +* Sat Jun 11 2005 Jakub Jelinek 2.15.94.0.2.2-4 +- further bfd robustification (CAN-2005-1704, #158680) + +* Fri Jun 10 2005 Jakub Jelinek 2.15.94.0.2.2-3 +- further objdump and readelf robustification (CAN-2005-1704, #158680) + +* Wed May 25 2005 Jakub Jelinek 2.15.94.0.2.2-2 +- bfd and readelf robustification (CAN-2005-1704, #158680) + +* Tue Mar 29 2005 Jakub Jelinek 2.15.94.0.2.2-1 +- update to 2.15.94.0.2.2 +- speed up walk_wild_section (Robert O'Callahan) + +* Mon Mar 7 2005 Jakub Jelinek 2.15.94.0.2-4 +- rebuilt with GCC 4 + +* Mon Feb 28 2005 Jakub Jelinek 2.15.94.0.2-3 +- fix buffer overflows in readelf (#149506) +- move c++filt to binutils from gcc-c++, conflict with gcc-c++ < 4.0 (#86333) + +* Thu Feb 10 2005 Jakub Jelinek 2.15.94.0.2-1 +- update to 2.15.94.0.2 +- fix .note.GNU-stack/PT_GNU_STACK computation in linker on ppc64 (#147296) +- fix stripping of binaries/libraries that have empty sections right before + .dynamic section (with the same starting address; #144038) +- handle AS_NEEDED (...) in linker script INPUT/GROUP + +* Tue Dec 14 2004 Jakub Jelinek 2.15.92.0.2-11 +- fix a longstanding -z relro bug + +* Mon Dec 13 2004 Jakub Jelinek 2.15.92.0.2-10 +- avoid unnecessary gap with -z relro showing on i686 libc.so +- ppc64 --emit-relocs fix (Alan Modra) +- don't crash if STT_SECTION symbol has incorrect st_shndx (e.g. SHN_ABS, + as created by nasm; #142181) +- don't try to make absptr LSDAs relative if they don't have relocations + against them (Alan Modra, #141162) + +* Wed Oct 27 2004 Jakub Jelinek 2.15.92.0.2-5.EL4 +- fix ar xo (#104344) + +* Wed Oct 20 2004 Jakub Jelinek 2.15.92.0.2-5 +- fix --just-symbols on ppc64 (Alan Modra, #135498) + +* Fri Oct 15 2004 Jakub Jelinek 2.15.92.0.2-4 +- fix code detecting matching linkonce and single member comdat + group sections (#133078) + +* Mon Oct 11 2004 Jakub Jelinek 2.15.92.0.2-3 +- revert Sep 09 change to make ppc L second argument e.g. for tlbie + non-optional +- fix stripping of prelinked binaries and libraries (#133734) +- allow strings(1) on 32-bit arches to be used again with > 2GB + files (#133555) + +* Mon Oct 4 2004 Jakub Jelinek 2.15.92.0.2-2 +- update to 2.15.92.0.2 +- change ld's ld.so.conf parser to match ldconfig's (#129340) + +* Mon Sep 20 2004 Jakub Jelinek 2.15.91.0.2-9 +- avoid almost 1MB (sparse) gaps in the middle of -z relro + libraries on x86-64 (Andreas Schwab) +- fix -z relro to make sure end of PT_GNU_RELRO segment is always + COMMONPAGESIZE aligned + +* Wed Aug 18 2004 Jakub Jelinek 2.15.91.0.2-8 +- fix linker segfaults on input objects with SHF_LINK_ORDER with + incorrect sh_link (H.J.Lu, Nick Clifton, #130198, BZ #290) + +* Wed Aug 18 2004 Jakub Jelinek 2.15.91.0.2-7 +- resolve all undefined ppc64 .* syms to the function bodies through + .opd, not just those used in brach instructions (Alan Modra) + +* Tue Aug 17 2004 Jakub Jelinek 2.15.91.0.2-6 +- fix ppc64 ld --dotsyms (Alan Modra) + +* Tue Aug 17 2004 Jakub Jelinek 2.15.91.0.2-5 +- various ppc64 make check fixes when using non-dot-syms gcc (Alan Modra) +- fix --gc-sections +- on ia64 create empty .gnu.linkonce.ia64unw*.* sections for + .gnu.linkonce.t.* function doesn't need unwind info + +* Mon Aug 16 2004 Jakub Jelinek 2.15.91.0.2-4 +- kill ppc64 dot symbols (Alan Modra) +- objdump -d support for objects without dot symbols +- support for overlapping ppc64 .opd entries + +* Mon Aug 9 2004 Jakub Jelinek 2.15.91.0.2-3 +- fix a newly introduced linker crash on x86-64 + +* Sun Aug 8 2004 Alan Cox 2.15.91.0.2-2 +- BuildRequire bison and macroise buildroot - from Steve Grubb + +* Fri Jul 30 2004 Jakub Jelinek 2.15.91.0.2-1 +- update to 2.15.91.0.2 +- BuildRequire flex (#117763) + +* Wed May 19 2004 Jakub Jelinek 2.15.90.0.3-7 +- use lib64 instead of lib directories on ia64 if %%{_lib} is + set to lib64 by rpm + +* Sat May 15 2004 Jakub Jelinek 2.15.90.0.3-6 +- fix a bug introduced in the ++/-- rejection patch + from 2.15.90.0.3 (Alan Modra) + +* Tue May 4 2004 Jakub Jelinek 2.15.90.0.3-5 +- fix s390{,x} .{,b,p2}align handling +- ppc/ppc64 testsuite fix + +* Mon May 3 2004 Jakub Jelinek 2.15.90.0.3-4 +- -z relro ppc/ppc64/ia64 fixes +- change x86-64 .plt symbol st_size handling to match ia32 +- prettify objdump -d output + +* Tue Apr 20 2004 Jakub Jelinek 2.15.90.0.3-3 +- several SPARC fixes + +* Sun Apr 18 2004 Jakub Jelinek 2.15.90.0.3-2 +- yet another fix for .tbss handling + +* Fri Apr 16 2004 Jakub Jelinek 2.15.90.0.3-1 +- update to 2.15.90.0.3 + +* Fri Mar 26 2004 Jakub Jelinek 2.15.90.0.1.1-2 +- update to 20040326 CVS + - fix ppc64 weak .opd symbol handling (Alan Modra, #119086) +- fix .tbss handling bug introduced + +* Fri Mar 26 2004 Jakub Jelinek 2.15.90.0.1.1-1 +- update to 2.15.90.0.1.1 + +* Sat Feb 21 2004 Jakub Jelinek 2.14.90.0.8-8 +- with -z now without --enable-new-dtags create DT_BIND_NOW + dynamic entry in addition to DT_FLAGS_1 with DF_1_NOW bit set + +* Fri Feb 20 2004 Jakub Jelinek 2.14.90.0.8-7 +- fix -pie on ppc32 + +* Fri Feb 20 2004 Jakub Jelinek 2.14.90.0.8-6 +- clear .plt sh_entsize on sparc32 +- put whole .got into relro area with -z now -z relro + +* Fri Feb 13 2004 Elliot Lee +- rebuilt + +* Thu Jan 22 2004 Jakub Jelinek 2.14.90.0.8-4 +- fix -pie on IA64 + +* Mon Jan 19 2004 Jakub Jelinek 2.14.90.0.8-3 +- fix testcases on s390 and s390x + +* Fri Jan 16 2004 Jakub Jelinek 2.14.90.0.8-2 +- fix testcases on AMD64 +- fix .got's sh_entsize on IA32/AMD64 +- set COMMONPAGESIZE on s390/s390x +- set COMMONPAGESIZE on ppc32 (Alan Modra) + +* Fri Jan 16 2004 Jakub Jelinek 2.14.90.0.8-1 +- update to 2.14.90.0.8 + +* Tue Jan 13 2004 Jakub Jelinek 2.14.90.0.7-4 +- fix -z relro on 64-bit arches + +* Mon Jan 12 2004 Jakub Jelinek 2.14.90.0.7-3 +- fix some bugs in -z relro support + +* Fri Jan 9 2004 Jakub Jelinek 2.14.90.0.7-2 +- -z relro support, reordering of RW sections + +* Fri Jan 9 2004 Jakub Jelinek 2.14.90.0.7-1 +- update to 2.14.90.0.7 + +* Mon Nov 24 2003 Jakub Jelinek 2.14.90.0.6-4 +- fix assembly parsing of foo=(.-bar)/4 (Alan Modra) +- fix IA-64 assembly parsing of (p7) hint @pause + +* Tue Sep 30 2003 Jakub Jelinek 2.14.90.0.6-3 +- don't abort on some linker warnings/errors on IA-64 + +* Sat Sep 20 2003 Jakub Jelinek 2.14.90.0.6-2 +- fix up merge2.s to use .p2align instead of .align + +* Sat Sep 20 2003 Jakub Jelinek 2.14.90.0.6-1 +- update to 2.14.90.0.6 +- speed up string merging (Lars Knoll, Michael Matz, Alan Modra) +- speed up IA-64 local symbol handling during linking + +* Fri Sep 5 2003 Jakub Jelinek 2.14.90.0.5-7 +- avoid ld -s segfaults introduced in 2.14.90.0.5-5 (Dmitry V. Levin, + #103180) + +* Fri Aug 29 2003 Jakub Jelinek 2.14.90.0.5-6 +- build old demangler into libiberty.a (#102268) +- SPARC .cfi* support + +* Tue Aug 5 2003 Jakub Jelinek 2.14.90.0.5-5 +- fix orphan section placement + +* Tue Jul 29 2003 Jakub Jelinek 2.14.90.0.5-4 +- fix ppc64 elfvsb linker tests +- some more 64-bit cleanliness fixes, give ppc64 fdesc symbols + type and size (Alan Modra) + +* Tue Jul 29 2003 Jakub Jelinek 2.14.90.0.5-3 +- fix 64-bit unclean code in ppc-opc.c + +* Mon Jul 28 2003 Jakub Jelinek 2.14.90.0.5-2 +- fix 64-bit unclean code in tc-ppc.c + +* Mon Jul 28 2003 Jakub Jelinek 2.14.90.0.5-1 +- update to 2.14.90.0.5 +- fix ld -r on ppc64 (Alan Modra) + +* Fri Jul 18 2003 Jakub Jelinek 2.14.90.0.4-23 +- rebuilt + +* Thu Jul 17 2003 Jakub Jelinek 2.14.90.0.4-22 +- fix elfNN_ia64_dynamic_symbol_p (Richard Henderson, #86661) +- don't access memory beyond what was allocated in readelf + (Richard Henderson) + +* Thu Jul 10 2003 Jakub Jelinek 2.14.90.0.4-21 +- add .cfi_* support on ppc{,64} and s390{,x} + +* Tue Jul 8 2003 Jakub Jelinek 2.14.90.0.4-20 +- remove lib{bfd,opcodes}.la (#98190) + +* Mon Jul 7 2003 Jakub Jelinek 2.14.90.0.4-19 +- fix -pie support on amd64, s390, s390x and ppc64 +- issue relocation overflow errors for s390/s390x -fpic code when + accessing .got slots above 4096 bytes from .got start + +* Thu Jul 3 2003 Jakub Jelinek 2.14.90.0.4-18 +- rebuilt + +* Thu Jul 3 2003 Jakub Jelinek 2.14.90.0.4-17 +- fix ia64 -pie support +- require no undefined non-weak symbols in PIEs like required for normal + binaries + +* Wed Jul 2 2003 Jakub Jelinek 2.14.90.0.4-16 +- fix readelf -d on IA-64 +- build libiberty.a with -fPIC, so that it can be lined into shared + libraries + +* Wed Jun 25 2003 Jakub Jelinek 2.14.90.0.4-15 +- rebuilt + +* Wed Jun 25 2003 Jakub Jelinek 2.14.90.0.4-14 +- added support for Intel Prescott instructions +- fix hint@pause for ia64 +- add workaround for LTP sillyness (#97934) + +* Wed Jun 18 2003 Jakub Jelinek 2.14.90.0.4-13 +- update CFI stuff to 2003-06-18 +- make sure .eh_frame is aligned to 8 bytes on 64-bit arches, + remove padding within one .eh_frame section + +* Tue Jun 17 2003 Jakub Jelinek 2.14.90.0.4-12 +- rebuilt + +* Tue Jun 17 2003 Jakub Jelinek 2.14.90.0.4-11 +- one more fix for the same patch + +* Tue Jun 17 2003 Jakub Jelinek 2.14.90.0.4-10 +- fix previous patch + +* Mon Jun 16 2003 Jakub Jelinek 2.14.90.0.4-9 +- ensure R_PPC64_{RELATIVE,ADDR64} have *r_offset == r_addend + and the other relocs have *r_offset == 0 + +* Tue Jun 10 2003 Jakub Jelinek 2.14.90.0.4-8 +- remove some unnecessary provides in ppc64 linker script + which were causing e.g. empty .ctors/.dtors section creation + +* Fri Jun 6 2003 Jakub Jelinek 2.14.90.0.4-7 +- some CFI updates/fixes +- don't create dynamic relocations against symbols defined in PIE + exported from its .dynsym + +* Wed Jun 4 2003 Jakub Jelinek 2.14.90.0.4-6 +- update gas to 20030604 +- PT_GNU_STACK support + +* Mon Jun 2 2003 Jakub Jelinek 2.14.90.0.4-5 +- buildrequire gettext (#91838) + +* Sat May 31 2003 Jakub Jelinek 2.14.90.0.4-4 +- fix shared libraries with >= 8192 .plt slots on ppc32 + +* Thu May 29 2003 Jakub Jelinek 2.14.90.0.4-3 +- rebuilt + +* Thu May 29 2003 Jakub Jelinek 2.14.90.0.4-2 +- rename ld --dynamic option to --pic-executable or --pie +- fix ld --help output +- document --pie/--pic-executable in ld.info and ld.1 + +* Wed May 28 2003 Jakub Jelinek 2.14.90.0.4-1 +- update to 2.14.90.0.4-1 +- gas CFI updates (Richard Henderson) +- dynamic executables (Ulrich Drepper) + +* Tue May 20 2003 Jakub Jelinek 2.14.90.0.2-2 +- fix ELF visibility handling +- tidy plt entries on IA-32, ppc and ppc64 + +* Mon May 19 2003 Jakub Jelinek 2.14.90.0.2-1 +- update to 2.14.90.0.2-1 + +* Tue May 13 2003 Jakub Jelinek 2.13.90.0.20-8 +- fix bfd_elf_hash on 64-bit arches (Andrew Haley) + +* Wed Apr 30 2003 Jakub Jelinek 2.13.90.0.20-7 +- rebuilt + +* Mon Apr 14 2003 Jakub Jelinek 2.13.90.0.20-6 +- optimize DW_CFA_advance_loc4 in gas even if there is 'z' augmentation + with size 0 in FDE + +* Fri Apr 11 2003 Jakub Jelinek 2.13.90.0.20-5 +- fix SPARC build + +* Thu Apr 3 2003 Jakub Jelinek 2.13.90.0.20-4 +- fix ppc32 plt reference counting +- don't include %%{_prefix}/%%{_lib}/debug in the non-debuginfo package + (#87729) + +* Mon Mar 31 2003 Jakub Jelinek 2.13.90.0.20-3 +- make elf64ppc target native extra on ppc and elf32ppc native extra + on ppc64. + +* Fri Mar 28 2003 Jakub Jelinek 2.13.90.0.20-2 +- fix TLS on IA-64 with ld relaxation + +* Sat Mar 22 2003 Jakub Jelinek 2.13.90.0.20-1 +- update to 2.13.90.0.20 + +* Mon Feb 24 2003 Jakub Jelinek 2.13.90.0.18-9 +- rebuilt + +* Mon Feb 24 2003 Jakub Jelinek 2.13.90.0.18-8 +- don't strip binaries in %%install, so that there is non-empty + debuginfo + +* Mon Feb 24 2003 Jakub Jelinek 2.13.90.0.18-7 +- don't optimize .eh_frame during ld -r + +* Thu Feb 13 2003 Jakub Jelinek 2.13.90.0.18-6 +- don't clear elf_link_hash_flags in the .symver patch +- only use TC_FORCE_RELOCATION in s390's TC_FORCE_RELOCATION_SUB_SAME + (Alan Modra) + +* Mon Feb 10 2003 Jakub Jelinek 2.13.90.0.18-5 +- fix the previous .symver change +- remove libbfd.so and libopcodes.so symlinks, so that other packages + link statically, not dynamically against libbfd and libopcodes + whose ABI is everything but stable + +* Mon Feb 10 2003 Jakub Jelinek 2.13.90.0.18-4 +- do .symver x, x@FOO handling earlier +- support .file and .loc on s390* + +* Mon Feb 10 2003 Jakub Jelinek 2.13.90.0.18-3 +- handle .symver x, x@FOO in ld such that relocs against x become + dynamic relocations against x@FOO (#83325) +- two PPC64 TLS patches (Alan Modra) + +* Sun Feb 09 2003 Jakub Jelinek 2.13.90.0.18-2 +- fix SEARCH_DIR on x86_64/s390x +- fix Alpha --relax +- create DT_RELA{,SZ,ENT} on s390 even if there is just .rela.plt + and no .rela.dyn section +- support IA-32 on IA-64 (#83752) +- .eh_frame_hdr fix (Andreas Schwab) + +* Thu Feb 06 2003 Jakub Jelinek 2.13.90.0.18-1 +- update to 2.13.90.0.18 + 20030121->20030206 CVS diff + +* Tue Feb 04 2003 Jakub Jelinek 2.13.90.0.16-8 +- alpha TLS fixes +- use .debug_line directory table to make the section tiny bit smaller +- libtool fix from Jens Petersen + +* Sun Feb 02 2003 Jakub Jelinek 2.13.90.0.16-7 +- sparc32 TLS + +* Fri Jan 24 2003 Jakub Jelinek 2.13.90.0.16-6 +- s390{,x} TLS and two other mainframe patches + +* Fri Jan 17 2003 Jakub Jelinek 2.13.90.0.16-5 +- fix IA-64 TLS IE in shared libs +- .{preinit,init,fini}_array compat hack from Alexandre Oliva + +* Thu Jan 16 2003 Jakub Jelinek 2.13.90.0.16-4 +- IA-64 TLS fixes +- fix .plt sh_entsize on Alpha +- build with %%_smp_mflags + +* Sat Nov 30 2002 Jakub Jelinek 2.13.90.0.16-3 +- fix strip on TLS binaries and libraries + +* Fri Nov 29 2002 Jakub Jelinek 2.13.90.0.16-2 +- fix IA-64 ld bootstrap + +* Thu Nov 28 2002 Jakub Jelinek 2.13.90.0.16-1 +- update to 2.13.90.0.16 +- STT_TLS SHN_UNDEF fix + +* Wed Nov 27 2002 Jakub Jelinek 2.13.90.0.10-4 +- pad .rodata.cstNN sections at the end if they aren't sized to multiple + of sh_entsize +- temporary patch to make .eh_frame and .gcc_except_table sections + readonly if possible (should be removed when AUTO_PLACE is implemented) +- fix .PPC.EMB.apuinfo section flags + +* Wed Oct 23 2002 Jakub Jelinek 2.13.90.0.10-3 +- fix names and content of alpha non-alloced .rela.* sections (#76583) +- delete unpackaged files from the buildroot + +* Tue Oct 15 2002 Jakub Jelinek 2.13.90.0.10-2 +- enable s390x resp. s390 emulation in linker too + +* Mon Oct 14 2002 Jakub Jelinek 2.13.90.0.10-1 +- update to 2.13.90.0.10 +- add a bi-arch patch for sparc/s390/x86_64 +- add --enable-64-bit-bfd on sparc, s390 and ppc + +* Thu Oct 10 2002 Jakub Jelinek 2.13.90.0.4-3 +- fix combreloc testcase + +* Thu Oct 10 2002 Jakub Jelinek 2.13.90.0.4-2 +- fix orphan .rel and .rela section placement with -z combreloc (Alan Modra) +- skip incompatible linker scripts when searching for libraries + +* Tue Oct 1 2002 Jakub Jelinek 2.13.90.0.4-1 +- update to 2.13.90.0.4 +- x86-64 TLS support +- some IA-32 TLS fixes +- some backported patches from trunk +- include opcodes, ld, gas and bfd l10n too + +* Thu Sep 19 2002 Jakub Jelinek 2.13.90.0.2-3 +- allow addends for IA-32 TLS @tpoff, @ntpoff and @dtpoff +- clear memory at *r_offset of dynamic relocs on PPC +- avoid ld crash if accessing non-local symbols through LE relocs +- new IA-32 TLS relocs, bugfixes and testcases +- use brl insn on IA-64 (Richard Henderson) +- fix R_IA64_PCREL21{M,F} handling (Richard Henderson) +- build in separate builddir, so that gasp tests don't fail +- include localization + +* Thu Aug 8 2002 Jakub Jelinek 2.13.90.0.2-2 +- fix R_386_TPOFF32 addends (#70824) + +* Sat Aug 3 2002 Jakub Jelinek 2.13.90.0.2-1 +- update to 2.13.90.0.2 + - fix ld TLS assertion failure (#70084) + - fix readelf --debug-dump= handling to match man page and --help + (#68997) +- fix _GLOBAL_OFFSET_TABLE gas handling (#70241) + +* Wed Jul 24 2002 Jakub Jelinek 2.12.90.0.15-1 +- update to 2.12.90.0.15 +- TLS .tbss fix +- don't use rpm %%configure macro, it is broken too often (#69366) + +* Thu May 30 2002 Jakub Jelinek 2.12.90.0.9-1 +- update to 2.12.90.0.9 + - TLS support +- remove gasp.info from %%post/%%preun (#65400) + +* Mon Apr 29 2002 Jakub Jelinek 2.12.90.0.7-1 +- update to 2.12.90.0.7 +- run make check + +* Mon Apr 29 2002 Jakub Jelinek 2.11.93.0.2-12 +- fix .hidden handling on SPARC (Richard Henderson) +- don't crash when linking -shared non-pic code with SHF_MERGE +- fix .eh_frame_hdr for DW_EH_PE_aligned +- correctly adjust DW_EH_PE_pcrel encoded personalities in CIEs + +* Fri Apr 5 2002 Jakub Jelinek 2.11.93.0.2-11 +- don't emit dynamic R_SPARC_DISP* relocs against STV_HIDDEN symbols + into shared libraries + +* Thu Mar 21 2002 Jakub Jelinek 2.11.93.0.2-10 +- don't merge IA-64 unwind info sections together during ld -r + +* Mon Mar 11 2002 Jakub Jelinek 2.11.93.0.2-9 +- fix DATA_SEGMENT_ALIGN on ia64/alpha/sparc/sparc64 + +* Fri Mar 8 2002 Jakub Jelinek 2.11.93.0.2-8 +- don't crash on SHN_UNDEF local dynsyms (Andrew MacLeod) + +* Thu Mar 7 2002 Jakub Jelinek 2.11.93.0.2-7 +- fix bfd configury bug (Alan Modra) + +* Tue Mar 5 2002 Jakub Jelinek 2.11.93.0.2-6 +- don't copy visibility when equating symbols +- fix alpha .text/.data with .previous directive bug + +* Tue Mar 5 2002 Jakub Jelinek 2.11.93.0.2-5 +- fix SHF_MERGE crash with --gc-sections (#60369) +- C++ symbol versioning patch + +* Fri Feb 22 2002 Jakub Jelinek 2.11.93.0.2-4 +- add DW_EH_PE_absptr -> DW_EH_PE_pcrel optimization for shared libs, + if DW_EH_PE_absptr cannot be converted that way, don't build the + .eh_frame_hdr search table + +* Fri Feb 15 2002 Jakub Jelinek 2.11.93.0.2-3 +- fix ld -N broken by last patch + +* Tue Feb 12 2002 Jakub Jelinek 2.11.93.0.2-2 +- trade one saved runtime page for data segment (=almost always not shared) + for up to one page of disk space where possible + +* Fri Feb 8 2002 Jakub Jelinek 2.11.93.0.2-1 +- update to 2.11.93.0.2 +- use %%{ix86} instead of i386 for -z combreloc default (#59086) + +* Thu Jan 31 2002 Jakub Jelinek 2.11.92.0.12-10 +- don't create SHN_UNDEF STB_WEAK symbols unless there are any relocations + against them + +* Wed Jan 30 2002 Bill Nottingham 2.11.92.0.12-9.1 +- rebuild (fix ia64 miscompilation) + +* Wed Jan 09 2002 Tim Powers +- automated rebuild + +* Fri Dec 28 2001 Jakub Jelinek 2.11.92.0.12-8 +- two further .eh_frame patch fixes + +* Wed Dec 19 2001 Jakub Jelinek 2.11.92.0.12-7 +- as ld is currently not able to shrink input sections to zero size + during discard_info, build a fake minimal CIE in that case +- update elf-strtab patch to what was commited + +* Mon Dec 17 2001 Jakub Jelinek 2.11.92.0.12-6 +- one more .eh_frame patch fix +- fix alpha .eh_frame handling +- optimize elf-strtab finalize + +* Sat Dec 15 2001 Jakub Jelinek 2.11.92.0.12-5 +- yet another fix for the .eh_frame patch + +* Fri Dec 14 2001 Jakub Jelinek 2.11.92.0.12-4 +- Alan Modra's patch to avoid crash if there is no dynobj + +* Thu Dec 13 2001 Jakub Jelinek 2.11.92.0.12-3 +- H.J.'s patch to avoid crash if input files are not ELF +- don't crash if a SHF_MERGE for some reason could not be merged +- fix objcopy/strip to preserve SHF_MERGE sh_entsize +- optimize .eh_frame sections, add PT_GNU_EH_FRAME support +- support anonymous version tags in version script + +* Tue Nov 27 2001 Jakub Jelinek 2.11.92.0.12-2 +- fix IA-64 SHF_MERGE handling + +* Tue Nov 27 2001 Jakub Jelinek 2.11.92.0.12-1 +- update to 2.11.92.0.12 + - optimize .dynstr and .shstrtab sections (#55524) + - fix ld.1 glitch (#55459) +- turn relocs against SHF_MERGE local symbols with zero addend + into STT_SECTION + addend +- remove man pages for programs not included (nlmconv, windres, dlltool; + #55456, #55461) +- add BuildRequires for texinfo + +* Thu Oct 25 2001 Jakub Jelinek 2.11.92.0.7-2 +- duh, fix strings on bfd objects (#55084) + +* Sat Oct 20 2001 Jakub Jelinek 2.11.92.0.7-1 +- update to 2.11.92.0.7 +- remove .rel{,a}.dyn from output if it is empty + +* Thu Oct 11 2001 Jakub Jelinek 2.11.92.0.5-2 +- fix strings patch +- use getc_unlocked in strings to speed it up by 50% on large files + +* Wed Oct 10 2001 Jakub Jelinek 2.11.92.0.5-1 +- update to 2.11.92.0.5 + - binutils localization (#45148) + - fix typo in REPORT_BUGS_TO (#54325) +- support files bigger than 2GB in strings (#54406) + +* Wed Sep 26 2001 Jakub Jelinek 2.11.90.0.8-12 +- on IA-64, don't mix R_IA64_IPLTLSB relocs with non-PLT relocs in + .rela.dyn section. + +* Tue Sep 25 2001 Jakub Jelinek 2.11.90.0.8-11 +- add iplt support for IA-64 (Richard Henderson) +- switch to new section flags for SHF_MERGE and SHF_STRINGS, put + in compatibility code +- "s" section flag for small data sections on IA-64 and Alpha + (Richard Henderson) +- fix sparc64 .plt[32768+] handling +- don't emit .rela.stab on sparc + +* Mon Sep 10 2001 Jakub Jelinek 2.11.90.0.8-10 +- fix SHF_MERGE on Sparc + +* Fri Aug 31 2001 Jakub Jelinek 2.11.90.0.8-9 +- on Alpha, copy *r_offset to R_ALPHA_RELATIVE's r_addend + +* Thu Aug 30 2001 Jakub Jelinek 2.11.90.0.8-8 +- on IA-64, put crtend{,S}.o's .IA_64.unwind section last in + .IA_64.unwind output section (for compatibility with 7.1 eh) + +* Fri Aug 24 2001 Jakub Jelinek 2.11.90.0.8-7 +- put RELATIVE relocs first, not last +- enable -z combreloc by default on IA-{32,64}, Alpha, Sparc* + +* Thu Aug 23 2001 Jakub Jelinek 2.11.90.0.8-6 +- support for -z combreloc +- remove .dynamic patch, -z combreloc patch does this better +- set STT_FUNC default symbol sizes in .endp directive on IA-64 + +* Mon Jul 16 2001 Jakub Jelinek 2.11.90.0.8-5 +- fix last patch (H.J.Lu) + +* Fri Jul 13 2001 Jakub Jelinek 2.11.90.0.8-4 +- fix placing of orphan sections + +* Sat Jun 23 2001 Jakub Jelinek +- fix SHF_MERGE support on Alpha + +* Fri Jun 8 2001 Jakub Jelinek +- 2.11.90.0.8 + - some SHF_MERGE suport fixes +- don't build with tooldir /usrusr instead of /usr (#40937) +- reserve few .dynamic entries for prelinking + +* Mon Apr 16 2001 Jakub Jelinek +- 2.11.90.0.5 + - SHF_MERGE support + +* Tue Apr 3 2001 Jakub Jelinek +- 2.11.90.0.4 + - fix uleb128 support, so that CVS gcc bootstraps + - some ia64 fixes + +* Mon Mar 19 2001 Jakub Jelinek +- add -Bgroup support from Ulrich Drepper + +* Fri Mar 9 2001 Jakub Jelinek +- hack - add elf_i386_glibc21 emulation + +* Fri Feb 16 2001 Jakub Jelinek +- 2.10.91.0.2 + +* Fri Feb 9 2001 Jakub Jelinek +- 2.10.1.0.7 +- remove ExcludeArch ia64 +- back out the -oformat, -omagic and -output change for now + +* Fri Dec 15 2000 Jakub Jelinek +- Prereq /sbin/install-info + +* Tue Nov 21 2000 Jakub Jelinek +- 2.10.1.0.2 + +* Tue Nov 21 2000 Jakub Jelinek +- add one more alpha patch + +* Wed Nov 15 2000 Jakub Jelinek +- fix alpha visibility as problem +- add support for Ultra-III + +* Fri Sep 15 2000 Jakub Jelinek +- and one more alpha patch + +* Fri Sep 15 2000 Jakub Jelinek +- two sparc patches + +* Mon Jul 24 2000 Jakub Jelinek +- 2.10.0.18 + +* Mon Jul 10 2000 Jakub Jelinek +- 2.10.0.12 + +* Mon Jun 26 2000 Jakub Jelinek +- 2.10.0.9 + +* Thu Jun 15 2000 Jakub Jelinek +- fix ld -r + +* Mon Jun 5 2000 Jakub Jelinek +- 2.9.5.0.46 +- use _mandir/_infodir/_lib + +* Mon May 8 2000 Bernhard Rosenkraenzer +- 2.9.5.0.41 + +* Wed Apr 12 2000 Bernhard Rosenkraenzer +- 2.9.5.0.34 + +* Wed Mar 22 2000 Bernhard Rosenkraenzer +- 2.9.5.0.31 + +* Fri Feb 04 2000 Cristian Gafton +- man pages are compressed +- apply kingdon's patch from #5031 + +* Wed Jan 19 2000 Jeff Johnson +- Permit package to be built with a prefix other than /usr. + +* Thu Jan 13 2000 Cristian Gafton +- add pacth from hjl to fix the versioning problems in ld + +* Tue Jan 11 2000 Bernhard Rosenkraenzer +- Add sparc patches from Jakub Jelinek +- Add URL: + +* Tue Dec 14 1999 Bernhard Rosenkraenzer +- 2.9.5.0.22 + +* Wed Nov 24 1999 Bernhard Rosenkraenzer +- 2.9.5.0.19 + +* Sun Oct 24 1999 Bernhard Rosenkraenzer +- 2.9.5.0.16 + +* Mon Sep 06 1999 Jakub Jelinek +- make shared non-pic libraries work on sparc with glibc 2.1. + +* Fri Aug 27 1999 Jim Kingdon +- No source/spec changes, just rebuilding with egcs-1.1.2-18 because + the older egcs was miscompling gprof. + +* Mon Apr 26 1999 Cristian Gafton +- back out very *stupid* sparc patch done by HJLu. People, keep out of + things you don't understand. +- add alpha relax patch from rth + +* Mon Apr 05 1999 Cristian Gafton +- version 2.9.1.0.23 +- patch to make texinfo documentation compile +- auto rebuild in the new build environment (release 2) + +* Tue Feb 23 1999 Cristian Gafton +- updated to 2.9.1.0.21 +- merged with UltraPenguin + +* Mon Jan 04 1999 Cristian Gafton +- added ARM patch from philb +- version 2.9.1.0.19a +- added a patch to allow arm* arch to be identified as an ARM + +* Thu Oct 01 1998 Cristian Gafton +- updated to 2.9.1.0.14. + +* Sat Sep 19 1998 Jeff Johnson +- updated to 2.9.1.0.13. + +* Wed Sep 09 1998 Cristian Gafton +- updated to 2.9.1.0.12 + +* Thu Jul 2 1998 Jeff Johnson +- updated to 2.9.1.0.7. + +* Wed Jun 03 1998 Jeff Johnson +- updated to 2.9.1.0.6. + +* Tue Jun 02 1998 Erik Troan +- added patch from rth to get right offsets for sections in relocateable + objects on sparc32 + +* Thu May 07 1998 Prospector System +- translations modified for de, fr, tr + +* Tue May 05 1998 Cristian Gafton +- version 2.9.1.0.4 is out; even more, it is public ! + +* Tue May 05 1998 Jeff Johnson +- updated to 2.9.1.0.3. + +* Mon Apr 20 1998 Cristian Gafton +- updated to 2.9.0.3 + +* Tue Apr 14 1998 Cristian Gafton +- upgraded to 2.9.0.2 + +* Sun Apr 05 1998 Cristian Gafton +- updated to 2.8.1.0.29 (HJ warned me that this thing is a moving target... + :-) +- "fixed" the damn make install command so that all tools get installed + +* Thu Apr 02 1998 Cristian Gafton +- upgraded again to 2.8.1.0.28 (at least on alpha now egcs will compile) +- added info packages handling + +* Tue Mar 10 1998 Cristian Gafton +- upgraded to 2.8.1.0.23 + +* Mon Mar 02 1998 Cristian Gafton +- updated to 2.8.1.0.15 (required to compile the newer glibc) +- all patches are obsoleted now + +* Wed Oct 22 1997 Erik Troan +- added 2.8.1.0.1 patch from hj +- added patch for alpha palcode form rth