Hello community,

here is the log from the commit of package binutils for openSUSE:Leap:15.2 
checked in at 2020-04-05 17:06:56
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Comparing /work/SRC/openSUSE:Leap:15.2/binutils (Old)
 and      /work/SRC/openSUSE:Leap:15.2/.binutils.new.3248 (New)
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

Package is "binutils"

Sun Apr  5 17:06:56 2020 rev:30 rq:789883 version:2.34

Changes:
--------
--- /work/SRC/openSUSE:Leap:15.2/binutils/binutils.changes      2020-01-15 
14:48:32.713346599 +0100
+++ /work/SRC/openSUSE:Leap:15.2/.binutils.new.3248/binutils.changes    
2020-04-05 17:06:59.370208168 +0200
@@ -1,0 +2,140 @@
+Wed Mar 25 14:12:50 UTC 2020 - Martin Liška <[email protected]>
+
+- Update binutils-2.34-branch.diff.gz.
+
+-------------------------------------------------------------------
+Fri Feb 28 16:20:14 UTC 2020 - Martin Liška <[email protected]>
+
+- Remove fix-try_load_plugin.patch as it is part
+  of the updated binutils-2.34-branch.diff.gz patch.
+
+-------------------------------------------------------------------
+Wed Feb 26 08:13:33 UTC 2020 - Richard Biener <[email protected]>
+
+- Add binutils-pr25593.diff to fix DT_NEEDED order with -flto
+  [bsc#1163744]
+
+-------------------------------------------------------------------
+Tue Feb 18 16:12:52 UTC 2020 - Martin Liška <[email protected]>
+
+- Update fix-try_load_plugin.patch to latest version.
+
+-------------------------------------------------------------------
+Tue Feb 18 12:48:26 UTC 2020 - Martin Liška <[email protected]>
+
+- Add fix-try_load_plugin.patch in order to fix fallback caused
+  by backport for PR25355.
+
+-------------------------------------------------------------------
+Sat Feb  1 17:46:57 UTC 2020 - Martin Liška <[email protected]>
+
+- Update to binutils 2.34:
+  * The disassembler (objdump --disassemble) now has an option to
+    generate ascii art thats show the arcs between that start and end
+    points of control flow instructions.
+
+  * The binutils tools now have support for debuginfod.  Debuginfod is a 
+    HTTP service for distributing ELF/DWARF debugging information as
+    well as source code.  The tools can now connect to debuginfod
+    servers in order to download debug information about the files that
+    they are processing.
+
+  * The assembler and linker now support the generation of ELF format
+    files for the Z80 architecture.
+- Rename and get binutils-2.34-branch.diff.gz (boo#1160254).
+- Rebase add-ulp-section.diff, binutils-revert-plt32-in-branches.diff,
+  cross-avr-size.patch and binutils-skip-rpaths.patch.
+- Add new subpackages for libctf and libctf-nobfd.
+- Disable LTO due to boo#1163333.
+- Includes fixes for these CVEs:
+  bnc#1153768 aka CVE-2019-17451 aka PR25070
+  bnc#1153770 aka CVE-2019-17450 aka PR25078
+
+-------------------------------------------------------------------
+Tue Jan  7 12:42:34 UTC 2020 - Andreas Schwab <[email protected]>
+
+- Disable LTO during testsuite run
+
+-------------------------------------------------------------------
+Wed Nov 20 16:22:51 UTC 2019 - [email protected]
+
+- Add binutils-fix-invalid-op-errata.diff to fix various
+  build fails on aarch64 (PR25210, bsc#1157755).
+
+-------------------------------------------------------------------
+Mon Nov 18 17:06:15 UTC 2019 - [email protected]
+
+- Add add-ulp-section.diff for user space live patching.
+
+-------------------------------------------------------------------
+Tue Oct 22 13:45:51 UTC 2019 - Martin Liška <[email protected]>
+
+- Update to binutils 2.33.1:
+  * Adds support for the Arm Scalable Vector Extension version 2
+    (SVE2) instructions, the Arm Transactional Memory Extension (TME)
+    instructions and the Armv8.1-M Mainline and M-profile Vector
+    Extension (MVE) instructions.
+  * Adds support for the Arm Cortex-A76AE, Cortex-A77 and Cortex-M35P
+    processors and the AArch64 Cortex-A34, Cortex-A65, Cortex-A65AE,
+    Cortex-A76AE, and Cortex-A77 processors.
+  * Adds a .float16 directive for both Arm and AArch64 to allow
+    encoding of 16-bit floating point literals.
+  * For MIPS, Add -m[no-]fix-loongson3-llsc option to fix (or not)
+    Loongson3 LLSC Errata.  Add a --enable-mips-fix-loongson3-llsc=[yes|no]
+    configure time option to set the default behavior. Set the default
+    if the configure option is not used to "no".
+  * The Cortex-A53 Erratum 843419 workaround now supports a choice of
+    which workaround to use.  The option --fix-cortex-a53-843419 now
+    takes an optional argument --fix-cortex-a53-843419[=full|adr|adrp]
+    which can be used to force a particular workaround to be used.
+    See --help for AArch64 for more details.
+  * Add support for GNU_PROPERTY_AARCH64_FEATURE_1_BTI and
+    GNU_PROPERTY_AARCH64_FEATURE_1_PAC  in ELF GNU program properties
+    in the AArch64 ELF linker. 
+  * Add -z force-bti for AArch64 to enable GNU_PROPERTY_AARCH64_FEATURE_1_BTI
+    on output while warning about missing GNU_PROPERTY_AARCH64_FEATURE_1_BTI 
+    on inputs and use PLTs protected with BTI.
+  * Add -z pac-plt for AArch64 to pick PAC enabled PLTs.
+  * Add --source-comment[=<txt>] option to objdump which if present,
+    provides a prefix to source code lines displayed in a disassembly.
+  * Add --set-section-alignment <section-name>=<power-of-2-align>
+    option to objcopy to allow the changing of section alignments.
+  * Add --verilog-data-width option to objcopy for verilog targets to
+    control width of data elements in verilog hex format.
+  * The separate debug info file options of readelf (--debug-dump=links
+    and --debug-dump=follow) and objdump (--dwarf=links and
+    --dwarf=follow-links) will now display and/or follow multiple
+    links if more than one are present in a file.  (This usually
+    happens when gcc's -gsplit-dwarf option is used).
+    In addition objdump's --dwarf=follow-links now also affects its
+    other display options, so that for example, when combined with
+    --syms it will cause the symbol tables in any linked debug info
+    files to also be displayed.  In addition when combined with
+    --disassemble the --dwarf= follow-links option will ensure that
+    any symbol tables in the linked files are read and used when
+    disassembling code in the main file.
+  * Add support for dumping types encoded in the Compact Type Format
+    to objdump and readelf.
+- Includes fixes for these CVEs:
+  bnc#1126826 aka CVE-2019-9077 aka PR1126826
+  bnc#1126829 aka CVE-2019-9075 aka PR1126829
+  bnc#1126831 aka CVE-2019-9074 aka PR24235
+  bnc#1140126 aka CVE-2019-12972 aka PR23405
+  bnc#1143609 aka CVE-2019-14444 aka PR24829
+  bnc#1142649 aka CVE-2019-14250 aka PR90924
+- Remove patches that are now included in the release:
+  binutils-2.32-branch.diff.gz, binutils-fix-ld-segv.diff,
+  binutils-pr24486.patch, riscv-abi-check.patch,
+  rx-gas-padding-pr24464.patch.
+- Add binutils-2.33-branch.diff.gz patch.
+- Rebase binutils-revert-plt32-in-branches.diff and
+  cross-avr-size.patch patch.
+
+-------------------------------------------------------------------
+Tue Oct 15 14:05:57 UTC 2019 - [email protected]
+
+- Add binutils-fix-ld-segv.diff to fix a segfault in ld
+  when building some versions of pacemaker.  [bsc#1154025,
+  bsc#1154016]
+
+-------------------------------------------------------------------
cross-aarch64-binutils.changes: same change
cross-arm-binutils.changes: same change
cross-avr-binutils.changes: same change
cross-epiphany-binutils.changes: same change
cross-hppa-binutils.changes: same change
cross-hppa64-binutils.changes: same change
cross-i386-binutils.changes: same change
cross-ia64-binutils.changes: same change
cross-m68k-binutils.changes: same change
cross-mips-binutils.changes: same change
cross-ppc-binutils.changes: same change
cross-ppc64-binutils.changes: same change
cross-ppc64le-binutils.changes: same change
cross-riscv64-binutils.changes: same change
cross-rx-binutils.changes: same change
cross-s390-binutils.changes: same change
cross-s390x-binutils.changes: same change
cross-sparc-binutils.changes: same change
cross-sparc64-binutils.changes: same change
cross-spu-binutils.changes: same change
cross-x86_64-binutils.changes: same change
cross-xtensa-binutils.changes: same change

Old:
----
  binutils-2.32-branch.diff.gz
  binutils-2.32.tar.bz2
  binutils-2.32.tar.bz2.sig
  binutils-pr24486.patch
  riscv-abi-check.patch
  rx-gas-padding-pr24464.patch

New:
----
  add-ulp-section.diff
  binutils-2.34-branch.diff.gz
  binutils-2.34.tar.bz2
  binutils-2.34.tar.bz2.sig
  binutils-fix-invalid-op-errata.diff
  binutils-pr25593.diff

++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

Other differences:
------------------
++++++ binutils.spec ++++++
--- /var/tmp/diff_new_pack.xO69n9/_old  2020-04-05 17:07:02.126211106 +0200
+++ /var/tmp/diff_new_pack.xO69n9/_new  2020-04-05 17:07:02.126211106 +0200
@@ -1,7 +1,7 @@
 #
 # spec file for package binutils
 #
-# Copyright (c) 2019 SUSE LINUX GmbH, Nuernberg, Germany.
+# Copyright (c) 2020 SUSE LLC
 #
 # All modifications and additions to the file contributed by third parties
 # remain the property of their copyright owners, unless otherwise agreed
@@ -12,7 +12,7 @@
 # license that conforms to the Open Source Definition (Version 1.9)
 # published by the Open Source Initiative.
 
-# Please submit bugfixes or comments via http://bugs.opensuse.org/
+# Please submit bugfixes or comments via https://bugs.opensuse.org/
 #
 
 
@@ -33,7 +33,7 @@
 %else
 BuildRequires:  zlib-devel
 %endif
-Version:        2.32
+Version:        2.34
 Release:        0
 #
 # RUN_TESTS
@@ -65,7 +65,7 @@
 #
 #
 #
-Url:            http://www.gnu.org/software/binutils/
+URL:            http://www.gnu.org/software/binutils/
 PreReq:         %{install_info_prereq}
 # bug437293
 %ifarch ppc64
@@ -81,7 +81,7 @@
 Source1:        pre_checkin.sh
 Source2:        README.First-for.SUSE.packagers
 Source3:        baselibs.conf
-Patch1:         binutils-2.32-branch.diff.gz
+Patch1:         binutils-2.34-branch.diff.gz
 Patch3:         binutils-skip-rpaths.patch
 Patch4:         s390-biarch.diff
 Patch5:         x86-64-biarch.patch
@@ -95,9 +95,9 @@
 Patch34:        aarch64-common-pagesize.patch
 Patch36:        binutils-pr22868.diff
 Patch37:        binutils-revert-plt32-in-branches.diff
-Patch38:        riscv-abi-check.patch
-Patch39:        rx-gas-padding-pr24464.patch
-Patch40:        binutils-pr24486.patch
+Patch38:        binutils-fix-invalid-op-errata.diff
+Patch40:        binutils-pr25593.diff
+Patch100:       add-ulp-section.diff
 Patch90:        cross-avr-nesc-as.patch
 Patch92:        cross-avr-omit_section_dynsym.patch
 Patch93:        cross-avr-size.patch
@@ -140,6 +140,23 @@
 build programs which use the GNU BFD library, which is part of
 binutils.
 
+%package -n libctf0
+Summary:        Compact C Type Format library (runtime, BFD dependency)
+License:        GFDL-1.3-only AND GPL-3.0-or-later
+Group:          Development/Tools/Building
+
+%description -n libctf0
+This package includes the libctf shared library.
+The Compact C Type Format (CTF) is a way of representing information about a 
binary program
+
+%package -n libctf-nobfd0
+Summary:        Compact C Type Format library (runtime, no BFD dependency)
+License:        GFDL-1.3-only AND GPL-3.0-or-later
+Group:          Development/Tools/Building
+
+%description -n libctf-nobfd0
+This package includes the libctf-nobfd shared library.
+The Compact C Type Format (CTF) is a way of representing information about a 
binary program
 
 %ifarch %arm
 %define HOST %{_target_cpu}-suse-linux-gnueabi
@@ -155,7 +172,7 @@
 # patch bringing the tarball to the newest upstream version
 %patch1 -p1
 %if !%{test_vanilla}
-%patch3
+%patch3 -p1
 %patch4
 %patch5
 %patch6
@@ -170,25 +187,23 @@
 %if %{suse_version} < 1550
 %patch37 -p1
 %endif
-%patch38 -p1
-%patch39 -p1
+%patch38
 %patch40 -p1
+%patch100
 %if "%{TARGET}" == "avr"
 cp gas/config/tc-avr.h gas/config/tc-avr-nesc.h
 %patch90
 %patch92
-%patch93
+%patch93 -p1
 %endif
 #
 # test_vanilla
 %endif
 
 %build
+%define _lto_cflags %{nil}
 sed -i -e '/BFD_VERSION_DATE/s/$/-%(echo %release | sed 's/\.[0-9]*$//')/' 
bfd/version.h
 RPM_OPT_FLAGS="$RPM_OPT_FLAGS -Wno-error"
-%if 0%{suse_version} > 1110
-RPM_OPT_FLAGS="$RPM_OPT_FLAGS -ffat-lto-objects"
-%endif
 
 %if 0%{!?cross:1}
 # Building native binutils
@@ -346,9 +361,9 @@
 unset SUSE_ASNEEDED
 cd build-dir
 %if 0%{?cross:1}
-make -k check CFLAGS="-O2 -g" CXXFLAGS="-O2 -g" || %{make_check_handling}
+make -k check CFLAGS="-O2 -g" CXXFLAGS="-O2 -g" CFLAGS_FOR_TARGET="-O2 -g" 
CXXFLAGS_FOR_TARGET="-O2 -g" || %{make_check_handling}
 %else
-make -k check CFLAGS="$RPM_OPT_FLAGS -Wno-unused -Wno-unprototyped-calls" || :
+make -k check CFLAGS="$RPM_OPT_FLAGS" CXXFLAGS="$RPM_OPT_FLAGS" 
CFLAGS_FOR_TARGET="$RPM_OPT_FLAGS" CXXFLAGS_FOR_TARGET="$RPM_OPT_FLAGS" || 
%{make_check_handling}
 %endif
 
 %install
@@ -456,6 +471,9 @@
 "%_sbindir/update-alternatives" --install \
        "%_bindir/ld" ld "%_bindir/ld.gold" 1
 
+%post -n libctf0 -p /sbin/ldconfig
+%post -n libctf-nobfd0 -p /sbin/ldconfig
+
 %preun
 %install_info_delete --info-dir=%{_infodir} %{_infodir}/as.info.gz
 %install_info_delete --info-dir=%{_infodir} %{_infodir}/bfd.info.gz
@@ -471,6 +489,9 @@
        "%_sbindir/update-alternatives" --remove ld "%_bindir/ld.gold";
 fi;
 
+%postun -n libctf0 -p /sbin/ldconfig
+%postun -n libctf-nobfd0 -p /sbin/ldconfig
+
 %postun
 /sbin/ldconfig
 %endif
@@ -509,6 +530,14 @@
 %defattr(-,root,root)
 %{_prefix}/include/*.h
 %{_libdir}/lib*.*a
+%{_libdir}/libctf.so
+%{_libdir}/libctf-nobfd.so
+
+%files -n libctf0
+%{_libdir}/libctf.so.*
+
+%files -n libctf-nobfd0
+%{_libdir}/libctf-nobfd.so.*
 %endif
 
 %changelog

++++++ cross-aarch64-binutils.spec ++++++
--- /var/tmp/diff_new_pack.xO69n9/_old  2020-04-05 17:07:02.150211132 +0200
+++ /var/tmp/diff_new_pack.xO69n9/_new  2020-04-05 17:07:02.150211132 +0200
@@ -1,7 +1,7 @@
 #
 # spec file for package cross-aarch64-binutils
 #
-# Copyright (c) 2019 SUSE LINUX GmbH, Nuernberg, Germany.
+# Copyright (c) 2020 SUSE LLC
 #
 # All modifications and additions to the file contributed by third parties
 # remain the property of their copyright owners, unless otherwise agreed
@@ -12,7 +12,7 @@
 # license that conforms to the Open Source Definition (Version 1.9)
 # published by the Open Source Initiative.
 
-# Please submit bugfixes or comments via http://bugs.opensuse.org/
+# Please submit bugfixes or comments via https://bugs.opensuse.org/
 #
 
 
@@ -36,7 +36,7 @@
 %else
 BuildRequires:  zlib-devel
 %endif
-Version:        2.32
+Version:        2.34
 Release:        0
 #
 # RUN_TESTS
@@ -68,7 +68,7 @@
 #
 #
 #
-Url:            http://www.gnu.org/software/binutils/
+URL:            http://www.gnu.org/software/binutils/
 PreReq:         %{install_info_prereq}
 # bug437293
 %ifarch ppc64
@@ -84,7 +84,7 @@
 Source1:        pre_checkin.sh
 Source2:        README.First-for.SUSE.packagers
 Source3:        baselibs.conf
-Patch1:         binutils-2.32-branch.diff.gz
+Patch1:         binutils-2.34-branch.diff.gz
 Patch3:         binutils-skip-rpaths.patch
 Patch4:         s390-biarch.diff
 Patch5:         x86-64-biarch.patch
@@ -98,9 +98,9 @@
 Patch34:        aarch64-common-pagesize.patch
 Patch36:        binutils-pr22868.diff
 Patch37:        binutils-revert-plt32-in-branches.diff
-Patch38:        riscv-abi-check.patch
-Patch39:        rx-gas-padding-pr24464.patch
-Patch40:        binutils-pr24486.patch
+Patch38:        binutils-fix-invalid-op-errata.diff
+Patch40:        binutils-pr25593.diff
+Patch100:       add-ulp-section.diff
 Patch90:        cross-avr-nesc-as.patch
 Patch92:        cross-avr-omit_section_dynsym.patch
 Patch93:        cross-avr-size.patch
@@ -143,6 +143,23 @@
 build programs which use the GNU BFD library, which is part of
 binutils.
 
+%package -n libctf0
+Summary:        Compact C Type Format library (runtime, BFD dependency)
+License:        GFDL-1.3-only AND GPL-3.0-or-later
+Group:          Development/Tools/Building
+
+%description -n libctf0
+This package includes the libctf shared library.
+The Compact C Type Format (CTF) is a way of representing information about a 
binary program
+
+%package -n libctf-nobfd0
+Summary:        Compact C Type Format library (runtime, no BFD dependency)
+License:        GFDL-1.3-only AND GPL-3.0-or-later
+Group:          Development/Tools/Building
+
+%description -n libctf-nobfd0
+This package includes the libctf-nobfd shared library.
+The Compact C Type Format (CTF) is a way of representing information about a 
binary program
 
 %ifarch %arm
 %define HOST %{_target_cpu}-suse-linux-gnueabi
@@ -158,7 +175,7 @@
 # patch bringing the tarball to the newest upstream version
 %patch1 -p1
 %if !%{test_vanilla}
-%patch3
+%patch3 -p1
 %patch4
 %patch5
 %patch6
@@ -173,25 +190,23 @@
 %if %{suse_version} < 1550
 %patch37 -p1
 %endif
-%patch38 -p1
-%patch39 -p1
+%patch38
 %patch40 -p1
+%patch100
 %if "%{TARGET}" == "avr"
 cp gas/config/tc-avr.h gas/config/tc-avr-nesc.h
 %patch90
 %patch92
-%patch93
+%patch93 -p1
 %endif
 #
 # test_vanilla
 %endif
 
 %build
+%define _lto_cflags %{nil}
 sed -i -e '/BFD_VERSION_DATE/s/$/-%(echo %release | sed 's/\.[0-9]*$//')/' 
bfd/version.h
 RPM_OPT_FLAGS="$RPM_OPT_FLAGS -Wno-error"
-%if 0%{suse_version} > 1110
-RPM_OPT_FLAGS="$RPM_OPT_FLAGS -ffat-lto-objects"
-%endif
 
 %if 0%{!?cross:1}
 # Building native binutils
@@ -349,9 +364,9 @@
 unset SUSE_ASNEEDED
 cd build-dir
 %if 0%{?cross:1}
-make -k check CFLAGS="-O2 -g" CXXFLAGS="-O2 -g" || %{make_check_handling}
+make -k check CFLAGS="-O2 -g" CXXFLAGS="-O2 -g" CFLAGS_FOR_TARGET="-O2 -g" 
CXXFLAGS_FOR_TARGET="-O2 -g" || %{make_check_handling}
 %else
-make -k check CFLAGS="$RPM_OPT_FLAGS -Wno-unused -Wno-unprototyped-calls" || :
+make -k check CFLAGS="$RPM_OPT_FLAGS" CXXFLAGS="$RPM_OPT_FLAGS" 
CFLAGS_FOR_TARGET="$RPM_OPT_FLAGS" CXXFLAGS_FOR_TARGET="$RPM_OPT_FLAGS" || 
%{make_check_handling}
 %endif
 
 %install
@@ -459,6 +474,9 @@
 "%_sbindir/update-alternatives" --install \
        "%_bindir/ld" ld "%_bindir/ld.gold" 1
 
+%post -n libctf0 -p /sbin/ldconfig
+%post -n libctf-nobfd0 -p /sbin/ldconfig
+
 %preun
 %install_info_delete --info-dir=%{_infodir} %{_infodir}/as.info.gz
 %install_info_delete --info-dir=%{_infodir} %{_infodir}/bfd.info.gz
@@ -474,6 +492,9 @@
        "%_sbindir/update-alternatives" --remove ld "%_bindir/ld.gold";
 fi;
 
+%postun -n libctf0 -p /sbin/ldconfig
+%postun -n libctf-nobfd0 -p /sbin/ldconfig
+
 %postun
 /sbin/ldconfig
 %endif
@@ -512,6 +533,14 @@
 %defattr(-,root,root)
 %{_prefix}/include/*.h
 %{_libdir}/lib*.*a
+%{_libdir}/libctf.so
+%{_libdir}/libctf-nobfd.so
+
+%files -n libctf0
+%{_libdir}/libctf.so.*
+
+%files -n libctf-nobfd0
+%{_libdir}/libctf-nobfd.so.*
 %endif
 
 %changelog

cross-arm-binutils.spec: same change
cross-avr-binutils.spec: same change
cross-epiphany-binutils.spec: same change
cross-hppa-binutils.spec: same change
cross-hppa64-binutils.spec: same change
cross-i386-binutils.spec: same change
cross-ia64-binutils.spec: same change
cross-m68k-binutils.spec: same change
cross-mips-binutils.spec: same change
cross-ppc-binutils.spec: same change
cross-ppc64-binutils.spec: same change
cross-ppc64le-binutils.spec: same change
cross-riscv64-binutils.spec: same change
cross-rx-binutils.spec: same change
cross-s390-binutils.spec: same change
cross-s390x-binutils.spec: same change
cross-sparc-binutils.spec: same change
cross-sparc64-binutils.spec: same change
cross-spu-binutils.spec: same change
cross-x86_64-binutils.spec: same change
cross-xtensa-binutils.spec: same change
++++++ add-ulp-section.diff ++++++
This is for userspace live patching, adding some space into
shared libs or executable (in the .ulp section) when one of the 
input files contains a section named .ulp.track.

Index: bfd/elflink.c
===================================================================
--- bfd/elflink.c.orig  2019-09-09 15:19:43.000000000 +0200
+++ bfd/elflink.c       2019-11-18 21:43:18.000000000 +0100
@@ -7070,6 +7070,13 @@ bfd_elf_size_dynamic_sections (bfd *outp
          s = bfd_get_linker_section (dynobj, ".gnu.version");
          s->flags |= SEC_EXCLUDE;
        }
+
+      if (bed->elf_backend_is_ulp_enabled != NULL
+         && bed->elf_backend_setup_ulp != NULL
+         && (*bed->elf_backend_is_ulp_enabled) (info->input_bfds))
+        {
+          (*bed->elf_backend_setup_ulp)(info);
+        }
     }
   return TRUE;
 }
Index: bfd/elfxx-x86.c
===================================================================
--- bfd/elfxx-x86.c.orig        2019-09-09 15:19:43.000000000 +0200
+++ bfd/elfxx-x86.c     2019-11-18 20:50:24.000000000 +0100
@@ -31,6 +31,8 @@
 #define ELF64_DYNAMIC_INTERPRETER "/lib/ld64.so.1"
 #define ELFX32_DYNAMIC_INTERPRETER "/lib/ldx32.so.1"
 
+#define ULP_ENTRY_LEN 16
+
 bfd_boolean
 _bfd_x86_elf_mkobject (bfd *abfd)
 {
@@ -952,6 +954,64 @@ _bfd_x86_elf_link_check_relocs (bfd *abf
   return _bfd_elf_link_check_relocs (abfd, info);
 }
 
+/* Check if input bfds are ulp-enabled by containing .ulp.track section */
+
+bfd_boolean
+_bfd_x86_elf_is_ulp_enabled (struct bfd *input_bfd)
+{
+  while (input_bfd != NULL)
+  for (; input_bfd != NULL; input_bfd = input_bfd->link.next)
+    {
+      if (input_bfd->section_count == 0) continue;
+      if (bfd_get_section_by_name (input_bfd, ".ulp.track")) return TRUE;
+    }
+  return FALSE;
+}
+
+/* To be used by elf_link_hash_traverse when computing the ulp length */
+
+static bfd_boolean
+bfd_x86_elf_link_compute_ulp (struct elf_link_hash_entry *h, void *data)
+{
+  unsigned long *ulp_length = (unsigned long *) data;
+
+  if (h->dynindx != -1 && h->type == STT_FUNC && !h->def_dynamic)
+    {
+      ++(*ulp_length);
+    }
+  return TRUE;
+}
+
+/* Fill the user-space live patching section */
+
+bfd_boolean
+_bfd_x86_elf_setup_ulp (struct bfd_link_info *info)
+{
+  struct elf_x86_link_hash_table *htab;
+  asection *ulp;
+  unsigned int ulp_length = 0;
+
+  htab = elf_x86_hash_table (info, X86_64_ELF_DATA);
+
+  elf_link_hash_traverse (elf_hash_table (info),
+                          bfd_x86_elf_link_compute_ulp,
+                          &ulp_length);
+
+  ulp = htab->ulp;
+
+  ulp->size = ulp_length * ULP_ENTRY_LEN;
+
+  ulp->contents = (bfd_byte *) bfd_malloc (ulp->size);
+  if (ulp->contents == NULL)
+    return FALSE;
+
+  if (!ulp->contents)
+    return FALSE;
+
+  memset(ulp->contents, 0x00, ulp->size);
+  return TRUE;
+}
+
 /* Set the sizes of the dynamic sections.  */
 
 bfd_boolean
@@ -2935,7 +2995,26 @@ error_alignment:
 
              htab->plt_second = sec;
            }
-       }
+
+         /* create sections to support user-space live patching */
+         if (_bfd_x86_elf_is_ulp_enabled(info->input_bfds))
+           {
+             flagword flags = (bed->dynamic_sec_flags
+                               | SEC_ALLOC
+                               | SEC_CODE
+                               | SEC_LOAD
+                               | SEC_READONLY);
+
+              sec = bfd_make_section_anyway_with_flags (dynobj, ".ulp", flags);
+              if (sec == NULL)
+                info->callbacks->einfo (_("%F%P: failed to create ULP 
section\n"));
+
+              if (!bfd_set_section_alignment (sec,  plt_alignment))
+                goto error_alignment;
+
+              htab->ulp = sec;
+           }
+      }
 
       if (!info->no_ld_generated_unwind_info)
        {
Index: bfd/elfxx-x86.h
===================================================================
--- bfd/elfxx-x86.h.orig        2019-09-09 15:19:43.000000000 +0200
+++ bfd/elfxx-x86.h     2019-11-18 20:48:33.000000000 +0100
@@ -447,6 +447,7 @@ struct elf_x86_link_hash_table
   asection *plt_second_eh_frame;
   asection *plt_got;
   asection *plt_got_eh_frame;
+  asection *ulp;
 
   /* Parameters describing PLT generation, lazy or non-lazy.  */
   struct elf_x86_plt_layout plt;
@@ -708,6 +709,12 @@ extern void _bfd_x86_elf_link_fixup_ifun
   (struct bfd_link_info *, struct elf_x86_link_hash_table *,
    struct elf_link_hash_entry *, Elf_Internal_Sym *sym);
 
+extern bfd_boolean _bfd_x86_elf_is_ulp_enabled
+  (struct bfd *);
+
+extern bfd_boolean _bfd_x86_elf_setup_ulp
+  (struct bfd_link_info *);
+
 #define bfd_elf64_mkobject \
   _bfd_x86_elf_mkobject
 #define bfd_elf32_mkobject \
@@ -745,3 +752,7 @@ extern void _bfd_x86_elf_link_fixup_ifun
   _bfd_x86_elf_merge_gnu_properties
 #define elf_backend_fixup_gnu_properties \
   _bfd_x86_elf_link_fixup_gnu_properties
+#define elf_backend_is_ulp_enabled \
+  _bfd_x86_elf_is_ulp_enabled
+#define elf_backend_setup_ulp \
+  _bfd_x86_elf_setup_ulp
Index: bfd/elf-bfd.h
===================================================================
--- bfd/elf-bfd.h.orig  2019-09-09 15:19:43.000000000 +0200
+++ bfd/elf-bfd.h       2019-11-18 20:48:33.000000000 +0100
@@ -1423,6 +1423,10 @@ struct elf_backend_data
     (const bfd *ibfd, bfd *obfd, const Elf_Internal_Shdr *isection,
      Elf_Internal_Shdr *osection);
 
+  bfd_boolean (*elf_backend_is_ulp_enabled) (bfd *abfd);
+
+  bfd_boolean (*elf_backend_setup_ulp) (struct bfd_link_info *);
+
   /* Used to handle bad SHF_LINK_ORDER input.  */
   void (*link_order_error_handler) (const char *, ...);
 
Index: bfd/elfxx-target.h
===================================================================
--- bfd/elfxx-target.h.orig     2019-09-09 15:19:43.000000000 +0200
+++ bfd/elfxx-target.h  2019-11-18 20:48:33.000000000 +0100
@@ -754,6 +754,14 @@
 #define elf_backend_copy_special_section_fields NULL
 #endif
 
+#ifndef elf_backend_is_ulp_enabled
+#define elf_backend_is_ulp_enabled NULL
+#endif
+
+#ifndef elf_backend_setup_ulp
+#define elf_backend_setup_ulp NULL
+#endif
+
 #ifndef elf_backend_compact_eh_encoding
 #define elf_backend_compact_eh_encoding NULL
 #endif
@@ -867,6 +875,8 @@ static struct elf_backend_data elfNN_bed
   elf_backend_maybe_function_sym,
   elf_backend_get_reloc_section,
   elf_backend_copy_special_section_fields,
+  elf_backend_is_ulp_enabled,
+  elf_backend_setup_ulp,
   elf_backend_link_order_error_handler,
   elf_backend_relplt_name,
   ELF_MACHINE_ALT1,
++++++ binutils-2.32-branch.diff.gz -> binutils-2.34-branch.diff.gz ++++++
Binary files /work/SRC/openSUSE:Leap:15.2/binutils/binutils-2.32-branch.diff.gz 
and 
/work/SRC/openSUSE:Leap:15.2/.binutils.new.3248/binutils-2.34-branch.diff.gz 
differ

++++++ binutils-2.32.tar.bz2 -> binutils-2.34.tar.bz2 ++++++
/work/SRC/openSUSE:Leap:15.2/binutils/binutils-2.32.tar.bz2 
/work/SRC/openSUSE:Leap:15.2/.binutils.new.3248/binutils-2.34.tar.bz2 differ: 
char 11, line 1

++++++ binutils-fix-invalid-op-errata.diff ++++++
Also reported as PR25210.  There's a problem when using the two
linker options '--fix-cortex-a53-835769 --fix-cortex-a53-843419'
together.  This is the default in our distro, but not upstream so
it went unnoticed.

Leads to an error while linking any code that sports one of the
sequences that triggers the errata fixup (gcc being one of those),
namely:
ld: can not size stub section: invalid operation
ld: warning: cannot find entry symbol _start; defaulting to 0000000000400078
ld: linker stubs: file class ELFCLASSNONE incompatible with ELFCLASS64
ld: final link failed: file in wrong format

--- bfd/elfnn-aarch64.c.mm      2019-09-09 13:19:43.000000000 +0000
+++ bfd/elfnn-aarch64.c 2019-11-20 11:44:00.000000000 +0000
@@ -4312,7 +4312,8 @@ elfNN_aarch64_size_stubs (bfd *output_bf
 
       for (input_bfd = info->input_bfds;
           input_bfd != NULL; input_bfd = input_bfd->link.next)
-       if (!_bfd_aarch64_erratum_835769_scan (input_bfd, info,
+       if (input_bfd != stub_bfd
+           && !_bfd_aarch64_erratum_835769_scan (input_bfd, info,
                                               &num_erratum_835769_fixes))
          return FALSE;
 
@@ -4327,6 +4328,7 @@ elfNN_aarch64_size_stubs (bfd *output_bf
       for (input_bfd = info->input_bfds;
           input_bfd != NULL;
           input_bfd = input_bfd->link.next)
+       if (input_bfd != stub_bfd)
        {
          asection *section;
 
++++++ binutils-pr25593.diff ++++++
commit e310298cf3fc02112ac0018260748828affa4061
Author: Alan Modra <[email protected]>
Date:   Tue Feb 25 12:50:10 2020 +1030

    PR25593, --as-needed breaks DT_NEEDED order with linker plugin
    
    This patch delays setting up DT_NEEDED dynamic tags until all object
    files and libraries have been opened and their symbols processed,
    rather than adding the tags while processing symbols.  Tags are
    ordered according to the position of the associated library on the
    command line and linker scripts.  It is still possible with
    --as-needed libs that are mentioned more than once for tags to be
    ordered according to which mention was needed.  For example with
    "--as-needed a.so b.so c.so b.so" when b.so is not needed by a.so or
    any other prior object file but is needed by c.so, the order of tags
    will be "A C B".
    
    bfd/
            PR 25593
            * elf-bfd.h (struct elf_link_hash_table): Rename "loaded" to
            "dyn_loaded".
            (bfd_elf_add_dt_needed_tag): Declare.
            * elf-strtab.c (_bfd_elf_strtab_restore): Handle NULL buf.
            * elflink.c (bfd_elf_add_dt_needed_tag): Make global and rename
            from elf_add_dt_needed_tag.  Remove soname and doit param.
            (elf_link_add_object_symbols): Don't use elf_add_dt_needed_tag
            to see whether as-needed lib is already loaded, use dyn_loaded
            list instead.  When saving and restoring around as-needed lib
            handle possibility that dynstr has not been initialised.  Don't
            add DT_NEEDED tags here.  Limit dyn_loaded list to dynamic libs.
            Mark libs loaded via DT_NEEDED entries of other libs with
            DYN_NO_NEEDED if they should not be mentioned in DT_NEEDED of
            the output.
            (elf_link_check_versioned_symbol): Remove now unneccesary
            DYNAMIC check when traversing dyn_loaded list.
    ld/
            PR 25593
            * ldelf.c (ldelf_try_needed): Add DT_NEEDED lib to input_bfds.
            (ldelf_after_open): Save state of input_bfds list before loading
            DT_NEEDED libs.  Traverse input_bfds list adding DT_NEEDED tags.
            Restore input_bfds list.
            * testsuite/ld-cris/gotplt1.d: Adjust for changed .dynstr order.

diff --git a/bfd/elf-bfd.h b/bfd/elf-bfd.h
index 7d36e23ea1..b930761363 100644
--- a/bfd/elf-bfd.h
+++ b/bfd/elf-bfd.h
@@ -637,8 +637,8 @@ struct elf_link_hash_table
   asection *tls_sec;
   bfd_size_type tls_size;
 
-  /* A linked list of BFD's loaded in the link.  */
-  struct elf_link_loaded_list *loaded;
+  /* A linked list of dynamic BFD's loaded in the link.  */
+  struct elf_link_loaded_list *dyn_loaded;
 
   /* Short-cuts to get to dynamic linker sections.  */
   asection *sgot;
@@ -2510,6 +2510,8 @@ extern bfd_boolean bfd_elf_link_add_symbols
   (bfd *, struct bfd_link_info *);
 extern bfd_boolean _bfd_elf_add_dynamic_entry
   (struct bfd_link_info *, bfd_vma, bfd_vma);
+extern int bfd_elf_add_dt_needed_tag
+  (bfd *, struct bfd_link_info *);
 extern bfd_boolean _bfd_elf_link_check_relocs
   (bfd *, struct bfd_link_info *);
 
diff --git a/bfd/elf-strtab.c b/bfd/elf-strtab.c
index d3e50c76cf..c397180dcc 100644
--- a/bfd/elf-strtab.c
+++ b/bfd/elf-strtab.c
@@ -245,13 +245,16 @@ _bfd_elf_strtab_save (struct elf_strtab_hash *tab)
 void
 _bfd_elf_strtab_restore (struct elf_strtab_hash *tab, void *buf)
 {
-  size_t idx, curr_size = tab->size;
+  size_t idx, curr_size = tab->size, save_size;
   struct strtab_save *save = (struct strtab_save *) buf;
 
   BFD_ASSERT (tab->sec_size == 0);
-  BFD_ASSERT (save->size <= curr_size);
-  tab->size = save->size;
-  for (idx = 1; idx < save->size; ++idx)
+  save_size = 1;
+  if (save != NULL)
+    save_size = save->size;
+  BFD_ASSERT (save_size <= curr_size);
+  tab->size = save_size;
+  for (idx = 1; idx < save_size; ++idx)
     tab->array[idx]->refcount = save->refcount[idx];
 
   for (; idx < curr_size; ++idx)
diff --git a/bfd/elflink.c b/bfd/elflink.c
index 8e7ae2a160..6f03c5c09f 100644
--- a/bfd/elflink.c
+++ b/bfd/elflink.c
@@ -3501,23 +3501,21 @@ _bfd_elf_add_dynamic_entry (struct bfd_link_info *info,
   return TRUE;
 }
 
-/* Add a DT_NEEDED entry for this dynamic object if DO_IT is true,
-   otherwise just check whether one already exists.  Returns -1 on error,
+/* Add a DT_NEEDED entry for this dynamic object.  Returns -1 on error,
    1 if a DT_NEEDED tag already exists, and 0 on success.  */
 
-static int
-elf_add_dt_needed_tag (bfd *abfd,
-                      struct bfd_link_info *info,
-                      const char *soname,
-                      bfd_boolean do_it)
+int
+bfd_elf_add_dt_needed_tag (bfd *abfd, struct bfd_link_info *info)
 {
   struct elf_link_hash_table *hash_table;
   size_t strindex;
+  const char *soname;
 
   if (!_bfd_elf_link_create_dynstrtab (abfd, info))
     return -1;
 
   hash_table = elf_hash_table (info);
+  soname = elf_dt_name (abfd);
   strindex = _bfd_elf_strtab_add (hash_table->dynstr, soname, FALSE);
   if (strindex == (size_t) -1)
     return -1;
@@ -3547,17 +3545,11 @@ elf_add_dt_needed_tag (bfd *abfd,
          }
     }
 
-  if (do_it)
-    {
-      if (!_bfd_elf_link_create_dynamic_sections (hash_table->dynobj, info))
-       return -1;
+  if (!_bfd_elf_link_create_dynamic_sections (hash_table->dynobj, info))
+    return -1;
 
-      if (!_bfd_elf_add_dynamic_entry (info, DT_NEEDED, strindex))
-       return -1;
-    }
-  else
-    /* We were just checking for existence of the tag.  */
-    _bfd_elf_strtab_delref (hash_table->dynstr, strindex);
+  if (!_bfd_elf_add_dynamic_entry (info, DT_NEEDED, strindex))
+    return -1;
 
   return 0;
 }
@@ -4069,7 +4061,7 @@ elf_link_add_object_symbols (bfd *abfd, struct 
bfd_link_info *info)
       char *audit = NULL;
       struct bfd_link_needed_list *rpath = NULL, *runpath = NULL;
       const Elf_Internal_Phdr *phdr;
-      int ret;
+      struct elf_link_loaded_list *loaded_lib;
 
       /* ld --just-symbols and dynamic objects don't mix very well.
         ld shouldn't allow it.  */
@@ -4258,15 +4250,22 @@ error_free_dyn:
         will need to know it.  */
       elf_dt_name (abfd) = soname;
 
-      ret = elf_add_dt_needed_tag (abfd, info, soname, add_needed);
-      if (ret < 0)
-       goto error_return;
-
       /* If we have already included this dynamic object in the
         link, just ignore it.  There is no reason to include a
         particular dynamic object more than once.  */
-      if (ret > 0)
-       return TRUE;
+      for (loaded_lib = htab->dyn_loaded;
+          loaded_lib != NULL;
+          loaded_lib = loaded_lib->next)
+       {
+         if (strcmp (elf_dt_name (loaded_lib->abfd), soname) == 0)
+           return TRUE;
+       }
+
+      /* Create dynamic sections for backends that require that be done
+        before setup_gnu_properties.  */
+      if (add_needed
+         && !_bfd_elf_link_create_dynamic_sections (abfd, info))
+       return FALSE;
 
       /* Save the DT_AUDIT entry for the linker emulation code. */
       elf_dt_audit (abfd) = audit;
@@ -4389,9 +4388,13 @@ error_free_dyn:
       old_table = htab->root.table.table;
       old_size = htab->root.table.size;
       old_count = htab->root.table.count;
-      old_strtab = _bfd_elf_strtab_save (htab->dynstr);
-      if (old_strtab == NULL)
-       goto error_free_vers;
+      old_strtab = NULL;
+      if (htab->dynstr != NULL)
+       {
+         old_strtab = _bfd_elf_strtab_save (htab->dynstr);
+         if (old_strtab == NULL)
+           goto error_free_vers;
+       }
 
       for (i = 0; i < htab->root.table.size; i++)
        {
@@ -5102,7 +5105,6 @@ error_free_dyn:
                      && !on_needed_list (elf_dt_name (abfd),
                                          htab->needed, NULL))))
            {
-             int ret;
              const char *soname = elf_dt_name (abfd);
 
              info->callbacks->minfo ("%!", soname, old_bfd,
@@ -5127,12 +5129,11 @@ error_free_dyn:
              elf_dyn_lib_class (abfd) = (enum dynamic_lib_link_class)
                (elf_dyn_lib_class (abfd) & ~DYN_AS_NEEDED);
 
+             /* Create dynamic sections for backends that require
+                that be done before setup_gnu_properties.  */
+             if (!_bfd_elf_link_create_dynamic_sections (abfd, info))
+               return FALSE;
              add_needed = TRUE;
-             ret = elf_add_dt_needed_tag (abfd, info, soname, add_needed);
-             if (ret < 0)
-               goto error_free_vers;
-
-             BFD_ASSERT (ret == 0);
            }
        }
     }
@@ -5222,7 +5223,8 @@ error_free_dyn:
       memcpy (htab->root.table.table, old_tab, tabsize);
       htab->root.undefs = old_undefs;
       htab->root.undefs_tail = old_undefs_tail;
-      _bfd_elf_strtab_restore (htab->dynstr, old_strtab);
+      if (htab->dynstr != NULL)
+       _bfd_elf_strtab_restore (htab->dynstr, old_strtab);
       free (old_strtab);
       old_strtab = NULL;
       for (i = 0; i < htab->root.table.size; i++)
@@ -5550,7 +5552,7 @@ error_free_dyn:
        }
     }
 
-  if (is_elf_hash_table (htab) && add_needed)
+  if (dynamic && add_needed)
     {
       /* Add this bfd to the loaded list.  */
       struct elf_link_loaded_list *n;
@@ -5559,9 +5561,12 @@ error_free_dyn:
       if (n == NULL)
        goto error_return;
       n->abfd = abfd;
-      n->next = htab->loaded;
-      htab->loaded = n;
+      n->next = htab->dyn_loaded;
+      htab->dyn_loaded = n;
     }
+  if (dynamic && !add_needed
+      && (elf_dyn_lib_class (abfd) & DYN_DT_NEEDED) != 0)
+    elf_dyn_lib_class (abfd) |= DYN_NO_NEEDED;
 
   return TRUE;
 
@@ -9689,7 +9694,7 @@ elf_link_check_versioned_symbol (struct bfd_link_info 
*info,
     }
   BFD_ASSERT (abfd != NULL);
 
-  for (loaded = elf_hash_table (info)->loaded;
+  for (loaded = elf_hash_table (info)->dyn_loaded;
        loaded != NULL;
        loaded = loaded->next)
     {
@@ -9709,7 +9714,6 @@ elf_link_check_versioned_symbol (struct bfd_link_info 
*info,
 
       /* We check each DSO for a possible hidden versioned definition.  */
       if (input == abfd
-         || (input->flags & DYNAMIC) == 0
          || elf_dynversym (input) == 0)
        continue;
 
diff --git a/ld/ldelf.c b/ld/ldelf.c
index 3ac3bb4e0a..b055929d02 100644
--- a/ld/ldelf.c
+++ b/ld/ldelf.c
@@ -375,6 +375,9 @@ ldelf_try_needed (struct dt_needed *needed, int force, int 
is_linux)
 
   bfd_elf_set_dyn_lib_class (abfd, (enum dynamic_lib_link_class) link_class);
 
+  *link_info.input_bfds_tail = abfd;
+  link_info.input_bfds_tail = &abfd->link.next;
+
   /* Add this file into the symbol table.  */
   if (! bfd_link_add_symbols (abfd, &link_info))
     einfo (_("%F%P: %pB: error adding symbols: %E\n"), abfd);
@@ -992,6 +995,7 @@ ldelf_after_open (int use_libpath, int native, int 
is_linux, int is_freebsd,
   struct elf_link_hash_table *htab;
   asection *s;
   bfd *abfd;
+  bfd **save_input_bfd_tail;
 
   after_open_default ();
 
@@ -1134,6 +1138,7 @@ ldelf_after_open (int use_libpath, int native, int 
is_linux, int is_freebsd,
      special action by the person doing the link.  Note that the
      needed list can actually grow while we are stepping through this
      loop.  */
+  save_input_bfd_tail = link_info.input_bfds_tail;
   needed = bfd_elf_get_needed_list (link_info.output_bfd, &link_info);
   for (l = needed; l != NULL; l = l->next)
     {
@@ -1290,6 +1295,20 @@ ldelf_after_open (int use_libpath, int native, int 
is_linux, int is_freebsd,
             l->name, l->by);
     }
 
+  for (abfd = link_info.input_bfds; abfd; abfd = abfd->link.next)
+    if (bfd_get_format (abfd) == bfd_object
+       && ((abfd->flags) & DYNAMIC) != 0
+       && bfd_get_flavour (abfd) == bfd_target_elf_flavour
+       && (elf_dyn_lib_class (abfd) & (DYN_AS_NEEDED | DYN_NO_NEEDED)) == 0
+       && elf_dt_name (abfd) != NULL)
+      {
+       if (bfd_elf_add_dt_needed_tag (abfd, &link_info) < 0)
+         einfo (_("%F%P: failed to add DT_NEEDED dynamic tag\n"));
+      }
+
+  link_info.input_bfds_tail = save_input_bfd_tail;
+  *save_input_bfd_tail = NULL;
+
   if (link_info.eh_frame_hdr_type == COMPACT_EH_HDR)
     if (!bfd_elf_parse_eh_frame_entries (NULL, &link_info))
       einfo (_("%F%P: failed to parse EH frame entries\n"));
diff --git a/ld/testsuite/ld-cris/gotplt1.d b/ld/testsuite/ld-cris/gotplt1.d
index 28724d7004..defba8ad6a 100644
--- a/ld/testsuite/ld-cris/gotplt1.d
+++ b/ld/testsuite/ld-cris/gotplt1.d
@@ -34,7 +34,7 @@ Contents of section \.text:
  80178 6f0d1000 0000611a 6f2e5401 08000000  .*
  80188 6f3e70df ffff0000                    .*
 Contents of section \.dynamic:
- 82190 01000000 01000000 04000000 e4000800  .*
+ 82190 01000000 07000000 04000000 e4000800  .*
  821a0 05000000 18010800 06000000 f8000800  .*
  821b0 0a000000 1a000000 0b000000 10000000  .*
  821c0 15000000 00000000 03000000 18220800  .*
++++++ binutils-revert-plt32-in-branches.diff ++++++
--- /var/tmp/diff_new_pack.xO69n9/_old  2020-04-05 17:07:02.774211797 +0200
+++ /var/tmp/diff_new_pack.xO69n9/_new  2020-04-05 17:07:02.774211797 +0200
@@ -78,11 +78,11 @@
        * testsuite/ld-x86-64/pr22791-2c.s: Likewise.
        * testsuite/ld-x86-64/x86-64.exp: Run PR ld/22791 tests.
 
-Index: binutils-2.32/bfd/elf64-x86-64.c
-===================================================================
---- binutils-2.32.orig/bfd/elf64-x86-64.c      2019-09-09 18:29:44.000000000 
+0200
-+++ binutils-2.32/bfd/elf64-x86-64.c   2019-09-09 18:31:48.000000000 +0200
-@@ -1789,6 +1789,24 @@ rewrite_modrm_rex:
+diff --git a/bfd/elf64-x86-64.c b/bfd/elf64-x86-64.c
+index 79e68ff476..cee387da7d 100644
+--- a/bfd/elf64-x86-64.c
++++ b/bfd/elf64-x86-64.c
+@@ -1798,6 +1798,24 @@ rewrite_modrm_rex:
    return TRUE;
  }
  
@@ -107,62 +107,62 @@
  /* Look through the relocs for a section during the first phase, and
     calculate needed space in the global offset table, procedure
     linkage table, and dynamic reloc sections.  */
-@@ -2248,28 +2266,30 @@ check_pic:
-                           && (eh == NULL
-                               || !UNDEFINED_WEAK_RESOLVED_TO_ZERO (info,
-                                                                    eh)))
--                         || (bfd_link_pie (info)
--                             && !SYMBOL_DEFINED_NON_SHARED_P (h)
--                             && h->def_dynamic)
-                          || (no_copyreloc_p
-                              && h->def_dynamic
-                              && !(h->root.u.def.section->flags & SEC_CODE))))
-                     || bfd_link_dll (info)))
-               {
-                 bfd_boolean fail = FALSE;
-+                bfd_boolean branch
-+                  = ((r_type == R_X86_64_PC32
-+                      || r_type == R_X86_64_PC32_BND)
-+                     && is_32bit_relative_branch (contents, rel->r_offset));
+@@ -3089,28 +3107,30 @@ use_plt:
+                       && (eh == NULL
+                           || !UNDEFINED_WEAK_RESOLVED_TO_ZERO (info,
+                                                                eh)))
+-                     || (bfd_link_pie (info)
+-                         && !SYMBOL_DEFINED_NON_SHARED_P (h)
+-                         && h->def_dynamic)
+                      || (no_copyreloc_p
+                          && h->def_dynamic
+                          && !(h->root.u.def.section->flags & SEC_CODE))))
+                 || bfd_link_dll (info)))
+           {
+             bfd_boolean fail = FALSE;
++            bfd_boolean branch
++              = ((r_type == R_X86_64_PC32
++                  || r_type == R_X86_64_PC32_BND)
++                 && is_32bit_relative_branch (contents, rel->r_offset));
 +
-                 if (SYMBOL_REFERENCES_LOCAL_P (info, h))
-                   {
-                     /* Symbol is referenced locally.  Make sure it is
--                       defined locally.  */
--                    fail = !SYMBOL_DEFINED_NON_SHARED_P (h);
-+                       defined locally or for a branch.  */
-+                    fail = !SYMBOL_DEFINED_NON_SHARED_P (h) && !branch;
-                   }
-                 else if (bfd_link_pie (info))
-                   {
-                     /* We can only use PC-relative relocations in PIE
--                       from non-code sections.  */
-+                       from non-code sections or branches.  */
-                     if (h->type == STT_FUNC
-                         && (sec->flags & SEC_CODE) != 0)
--                      fail = TRUE;
-+                      fail = !branch;
-                   }
-                 else if (no_copyreloc_p || bfd_link_dll (info))
-                   {
-@@ -2278,9 +2298,10 @@ check_pic:
-                        relocations against default and protected
-                        symbols since address of protected function
-                        and location of protected data may not be in
--                       the shared object.   */
-+                       the shared object.  We do allow branch to symbol
-+                       with non-default visibility.  */
-                     fail = (ELF_ST_VISIBILITY (h->other) == STV_DEFAULT
--                            || ELF_ST_VISIBILITY (h->other) == STV_PROTECTED);
-+                            || !branch);
-                   }
- 
-                 if (fail)
-Index: binutils-2.32/gas/config/tc-i386.c
-===================================================================
---- binutils-2.32.orig/gas/config/tc-i386.c    2019-01-19 17:01:33.000000000 
+0100
-+++ binutils-2.32/gas/config/tc-i386.c 2019-09-09 18:29:44.000000000 +0200
-@@ -7690,46 +7690,12 @@ output_branch (void)
+             if (SYMBOL_REFERENCES_LOCAL_P (info, h))
+               {
+                 /* Symbol is referenced locally.  Make sure it is
+-                   defined locally.  */
+-                fail = !SYMBOL_DEFINED_NON_SHARED_P (h);
++                   defined locally or for a branch.  */
++                fail = !SYMBOL_DEFINED_NON_SHARED_P (h) && !branch;
+               }
+             else if (bfd_link_pie (info))
+               {
+                 /* We can only use PC-relative relocations in PIE
+-                   from non-code sections.  */
++                   from non-code sections or branches.  */
+                 if (h->type == STT_FUNC
+                     && (sec->flags & SEC_CODE) != 0)
+-                  fail = TRUE;
++                  fail = !branch;
+               }
+             else if (no_copyreloc_p || bfd_link_dll (info))
+               {
+@@ -3119,9 +3139,10 @@ use_plt:
+                    relocations against default and protected
+                    symbols since address of protected function
+                    and location of protected data may not be in
+-                   the shared object.   */
++                   the shared object.  We do allow branch to symbol
++                   with non-default visibility.  */
+                 fail = (ELF_ST_VISIBILITY (h->other) == STV_DEFAULT
+-                        || ELF_ST_VISIBILITY (h->other) == STV_PROTECTED);
++                        || !branch);
+               }
+ 
+             if (fail)
+diff --git a/gas/config/tc-i386.c b/gas/config/tc-i386.c
+index 8728725b82..527ae0b701 100644
+--- a/gas/config/tc-i386.c
++++ b/gas/config/tc-i386.c
+@@ -7954,52 +7954,12 @@ output_branch (void)
    frag_var (rs_machine_dependent, 5, i.reloc[0], subtype, sym, off, p);
  }
  
@@ -177,6 +177,12 @@
 -  if (!IS_ELF)
 -    return FALSE;
 -
+-#ifdef TE_SOLARIS
+-  /* Don't emit PLT32 relocation on Solaris: neither native linker nor
+-     krtld support it.  */
+-  return FALSE;
+-#endif
+-
 -  /* Since there is no need to prepare for PLT branch on x86-64, we
 -     can generate R_X86_64_PLT32, instead of R_X86_64_PC32, which can
 -     be used as a marker for 32-bit PC-relative branches.  */
@@ -207,9 +213,9 @@
    fixS *fixP;
 -  bfd_reloc_code_real_type jump_reloc = i.reloc[0];
  
-   if (i.tm.opcode_modifier.jumpbyte)
+   if (i.tm.opcode_modifier.jump == JUMP_BYTE)
      {
-@@ -7797,17 +7763,8 @@ output_jump (void)
+@@ -8067,17 +8027,8 @@ output_jump (void)
        abort ();
      }
  
@@ -228,7 +234,7 @@
  
    /* All jumps handled here are signed, but don't use a signed limit
       check for 32 and 16 bit jumps as we want to allow wrap around at
-@@ -10236,10 +10193,6 @@ md_estimate_size_before_relax (fragS *fr
+@@ -11263,10 +11214,6 @@ md_estimate_size_before_relax (fragS *fragP, segT 
segment)
        reloc_type = (enum bfd_reloc_code_real) fragP->fr_var;
        else if (size == 2)
        reloc_type = BFD_RELOC_16_PCREL;
@@ -239,10 +245,10 @@
        else
        reloc_type = BFD_RELOC_32_PCREL;
  
-Index: binutils-2.32/gas/testsuite/gas/i386/ilp32/reloc64.d
-===================================================================
---- binutils-2.32.orig/gas/testsuite/gas/i386/ilp32/reloc64.d  2019-01-19 
17:01:33.000000000 +0100
-+++ binutils-2.32/gas/testsuite/gas/i386/ilp32/reloc64.d       2019-09-09 
18:29:44.000000000 +0200
+diff --git a/gas/testsuite/gas/i386/ilp32/reloc64.d 
b/gas/testsuite/gas/i386/ilp32/reloc64.d
+index 78ca3fd9e3..a961679754 100644
+--- a/gas/testsuite/gas/i386/ilp32/reloc64.d
++++ b/gas/testsuite/gas/i386/ilp32/reloc64.d
 @@ -17,7 +17,7 @@ Disassembly of section \.text:
  .*[   ]+R_X86_64_PC8[         ]+xtrn\+0x0*1
  .*[   ]+R_X86_64_PC32[        ]+xtrn-0x0*4
@@ -252,10 +258,10 @@
  .*[   ]+R_X86_64_PC8[         ]+xtrn-0x0*1
  .*[   ]+R_X86_64_GOT32[       ]+xtrn
  .*[   ]+R_X86_64_GOT32[       ]+xtrn
-Index: binutils-2.32/gas/testsuite/gas/i386/ilp32/x86-64-branch.d
-===================================================================
---- binutils-2.32.orig/gas/testsuite/gas/i386/ilp32/x86-64-branch.d    
2019-01-19 17:01:33.000000000 +0100
-+++ binutils-2.32/gas/testsuite/gas/i386/ilp32/x86-64-branch.d 2019-09-09 
18:29:44.000000000 +0200
+diff --git a/gas/testsuite/gas/i386/ilp32/x86-64-branch.d 
b/gas/testsuite/gas/i386/ilp32/x86-64-branch.d
+index 45ab6178b9..915dbf3f1c 100644
+--- a/gas/testsuite/gas/i386/ilp32/x86-64-branch.d
++++ b/gas/testsuite/gas/i386/ilp32/x86-64-branch.d
 @@ -20,9 +20,9 @@ Disassembly of section .text:
  [     ]*[a-f0-9]+:    66 ff 20                data16 jmpq \*\(%rax\)
  [     ]*[a-f0-9]+:    e8 00 00 00 00          callq  0x1f     1b: 
R_X86_64_PC32       \*ABS\*\+0x10003c
@@ -269,11 +275,11 @@
  [     ]*[a-f0-9]+:    ff d0                   callq  \*%rax
  [     ]*[a-f0-9]+:    ff d0                   callq  \*%rax
  [     ]*[a-f0-9]+:    66 ff d0                data16 callq \*%rax
-Index: binutils-2.32/gas/testsuite/gas/i386/reloc64.d
-===================================================================
---- binutils-2.32.orig/gas/testsuite/gas/i386/reloc64.d        2019-01-19 
17:01:33.000000000 +0100
-+++ binutils-2.32/gas/testsuite/gas/i386/reloc64.d     2019-09-09 
18:29:44.000000000 +0200
-@@ -19,7 +19,7 @@ Disassembly of section \.text:
+diff --git a/gas/testsuite/gas/i386/reloc64.d 
b/gas/testsuite/gas/i386/reloc64.d
+index 540a9b77d3..ea16c68de4 100644
+--- a/gas/testsuite/gas/i386/reloc64.d
++++ b/gas/testsuite/gas/i386/reloc64.d
+@@ -20,7 +20,7 @@ Disassembly of section \.text:
  .*[   ]+R_X86_64_PC8[         ]+xtrn\+0x0*1
  .*[   ]+R_X86_64_PC32[        ]+xtrn-0x0*4
  .*[   ]+R_X86_64_PC32[        ]+xtrn-0x0*4
@@ -282,11 +288,11 @@
  .*[   ]+R_X86_64_PC8[         ]+xtrn-0x0*1
  .*[   ]+R_X86_64_GOT64[       ]+xtrn
  .*[   ]+R_X86_64_GOT32[       ]+xtrn
-Index: binutils-2.32/gas/testsuite/gas/i386/x86-64-jump.d
-===================================================================
---- binutils-2.32.orig/gas/testsuite/gas/i386/x86-64-jump.d    2019-01-19 
17:01:33.000000000 +0100
-+++ binutils-2.32/gas/testsuite/gas/i386/x86-64-jump.d 2019-09-09 
18:29:44.000000000 +0200
-@@ -8,7 +8,7 @@ Disassembly of section .text:
+diff --git a/gas/testsuite/gas/i386/x86-64-jump.d 
b/gas/testsuite/gas/i386/x86-64-jump.d
+index 1a1521d278..b898d7d5eb 100644
+--- a/gas/testsuite/gas/i386/x86-64-jump.d
++++ b/gas/testsuite/gas/i386/x86-64-jump.d
+@@ -9,7 +9,7 @@ Disassembly of section .text:
  
  0+ <.text>:
  [     ]*[a-f0-9]+:    eb fe                   jmp    (0x0|0 <.text>)
@@ -295,7 +301,7 @@
  [     ]*[a-f0-9]+:    ff 24 25 00 00 00 00    jmpq   \*0x0    a: R_X86_64_32S 
xxx
  [     ]*[a-f0-9]+:    ff e7                   jmpq   \*%rdi
  [     ]*[a-f0-9]+:    ff 27                   jmpq   \*\(%rdi\)
-@@ -17,7 +17,7 @@ Disassembly of section .text:
+@@ -18,7 +18,7 @@ Disassembly of section .text:
  [     ]*[a-f0-9]+:    ff 2c 25 00 00 00 00    ljmp   \*0x0    24: 
R_X86_64_32S        xxx
  [     ]*[a-f0-9]+:    66 ff 2c 25 00 00 00 00         ljmpw  \*0x0    2c: 
R_X86_64_32S        xxx
  [     ]*[a-f0-9]+:    e8 cb ff ff ff          callq  0x0
@@ -304,78 +310,61 @@
  [     ]*[a-f0-9]+:    ff 14 25 00 00 00 00    callq  \*0x0    3d: 
R_X86_64_32S        xxx
  [     ]*[a-f0-9]+:    ff d7                   callq  \*%rdi
  [     ]*[a-f0-9]+:    ff 17                   callq  \*\(%rdi\)
-Index: binutils-2.32/gas/testsuite/gas/i386/x86-64-mpx-branch-1.d
-===================================================================
---- binutils-2.32.orig/gas/testsuite/gas/i386/x86-64-mpx-branch-1.d    
2019-01-19 17:01:33.000000000 +0100
-+++ binutils-2.32/gas/testsuite/gas/i386/x86-64-mpx-branch-1.d 2019-09-09 
18:29:44.000000000 +0200
-@@ -20,9 +20,9 @@ Disassembly of section .text:
- [     ]*[a-f0-9]+:    f2 e8 00 00 00 00       bnd callq 24 <foo2>
- 
- 0+24 <foo2>:
--[     ]*[a-f0-9]+:    f2 e9 00 00 00 00       bnd jmpq 2a <foo2\+0x6> 26: 
R_X86_64_PLT32      foo-0x4
--[     ]*[a-f0-9]+:    f2 0f 82 00 00 00 00    bnd jb 31 <foo2\+0xd>   2d: 
R_X86_64_PLT32      foo-0x4
--[     ]*[a-f0-9]+:    f2 e8 00 00 00 00       bnd callq 37 <foo2\+0x13>       
33: R_X86_64_PLT32      foo-0x4
-+[     ]*[a-f0-9]+:    f2 e9 00 00 00 00       bnd jmpq 2a <foo2\+0x6> 26: 
R_X86_64_PC32       foo-0x4
-+[     ]*[a-f0-9]+:    f2 0f 82 00 00 00 00    bnd jb 31 <foo2\+0xd>   2d: 
R_X86_64_PC32       foo-0x4
-+[     ]*[a-f0-9]+:    f2 e8 00 00 00 00       bnd callq 37 <foo2\+0x13>       
33: R_X86_64_PC32       foo-0x4
- [     ]*[a-f0-9]+:    f2 e9 00 00 00 00       bnd jmpq 3d <foo2\+0x19>        
39: R_X86_64_PLT32      foo-0x4
- [     ]*[a-f0-9]+:    f2 0f 82 00 00 00 00    bnd jb 44 <foo2\+0x20>  40: 
R_X86_64_PLT32      foo-0x4
- [     ]*[a-f0-9]+:    f2 e8 00 00 00 00       bnd callq 4a <foo2\+0x26>       
46: R_X86_64_PLT32      foo-0x4
-Index: binutils-2.32/gas/testsuite/gas/i386/x86-64-mpx-branch-2.d
-===================================================================
---- binutils-2.32.orig/gas/testsuite/gas/i386/x86-64-mpx-branch-2.d    
2019-01-19 17:01:33.000000000 +0100
-+++ binutils-2.32/gas/testsuite/gas/i386/x86-64-mpx-branch-2.d 2019-09-09 
18:29:44.000000000 +0200
-@@ -20,9 +20,9 @@ Disassembly of section .text:
- [     ]*[a-f0-9]+:    f2 e8 00 00 00 00       bnd callq 24 <foo2>
- 
- 0+24 <foo2>:
--[     ]*[a-f0-9]+:    f2 e9 00 00 00 00       bnd jmpq 2a <foo2\+0x6> 26: 
R_X86_64_PLT32      foo-0x4
--[     ]*[a-f0-9]+:    f2 0f 82 00 00 00 00    bnd jb 31 <foo2\+0xd>   2d: 
R_X86_64_PLT32      foo-0x4
--[     ]*[a-f0-9]+:    f2 e8 00 00 00 00       bnd callq 37 <foo2\+0x13>       
33: R_X86_64_PLT32      foo-0x4
-+[     ]*[a-f0-9]+:    f2 e9 00 00 00 00       bnd jmpq 2a <foo2\+0x6> 26: 
R_X86_64_PC32       foo-0x4
-+[     ]*[a-f0-9]+:    f2 0f 82 00 00 00 00    bnd jb 31 <foo2\+0xd>   2d: 
R_X86_64_PC32       foo-0x4
-+[     ]*[a-f0-9]+:    f2 e8 00 00 00 00       bnd callq 37 <foo2\+0x13>       
33: R_X86_64_PC32       foo-0x4
- [     ]*[a-f0-9]+:    f2 e9 00 00 00 00       bnd jmpq 3d <foo2\+0x19>        
39: R_X86_64_PLT32      foo-0x4
- [     ]*[a-f0-9]+:    f2 0f 82 00 00 00 00    bnd jb 44 <foo2\+0x20>  40: 
R_X86_64_PLT32      foo-0x4
- [     ]*[a-f0-9]+:    f2 e8 00 00 00 00       bnd callq 4a <foo2\+0x26>       
46: R_X86_64_PLT32      foo-0x4
-Index: binutils-2.32/gas/testsuite/gas/i386/x86-64-nop-3.d
-===================================================================
---- binutils-2.32.orig/gas/testsuite/gas/i386/x86-64-nop-3.d   2019-01-19 
17:01:33.000000000 +0100
-+++ binutils-2.32/gas/testsuite/gas/i386/x86-64-nop-3.d        2019-09-09 
18:29:44.000000000 +0200
-@@ -17,5 +17,5 @@ Disassembly of section .text:
+diff --git a/gas/testsuite/gas/i386/x86-64-mpx-branch-1.d 
b/gas/testsuite/gas/i386/x86-64-mpx-branch-1.d
+index 03e9675217..9d2ec05b7e 100644
+--- a/gas/testsuite/gas/i386/x86-64-mpx-branch-1.d
++++ b/gas/testsuite/gas/i386/x86-64-mpx-branch-1.d
+@@ -23,9 +23,9 @@ Disassembly of section .text:
+ [     ]*[a-f0-9]+:    f2 e8 00 00 00 00       bnd callq 34 <foo2>
+ 
+ 0+34 <foo2>:
+-[     ]*[a-f0-9]+:    f2 e9 00 00 00 00       bnd jmpq 3a <foo2\+0x6> 36: 
R_X86_64_PLT32      foo-0x4
+-[     ]*[a-f0-9]+:    f2 0f 82 00 00 00 00    bnd jb 41 <foo2\+0xd>   3d: 
R_X86_64_PLT32      foo-0x4
+-[     ]*[a-f0-9]+:    f2 e8 00 00 00 00       bnd callq 47 <foo2\+0x13>       
43: R_X86_64_PLT32      foo-0x4
++[     ]*[a-f0-9]+:    f2 e9 00 00 00 00       bnd jmpq 3a <foo2\+0x6> 36: 
R_X86_64_PC32       foo-0x4
++[     ]*[a-f0-9]+:    f2 0f 82 00 00 00 00    bnd jb 41 <foo2\+0xd>   3d: 
R_X86_64_PC32       foo-0x4
++[     ]*[a-f0-9]+:    f2 e8 00 00 00 00       bnd callq 47 <foo2\+0x13>       
43: R_X86_64_PC32       foo-0x4
+ [     ]*[a-f0-9]+:    f2 e9 00 00 00 00       bnd jmpq 4d <foo2\+0x19>        
49: R_X86_64_PLT32      foo-0x4
+ [     ]*[a-f0-9]+:    f2 0f 82 00 00 00 00    bnd jb 54 <foo2\+0x20>  50: 
R_X86_64_PLT32      foo-0x4
+ [     ]*[a-f0-9]+:    f2 e8 00 00 00 00       bnd callq 5a <foo2\+0x26>       
56: R_X86_64_PLT32      foo-0x4
+diff --git a/gas/testsuite/gas/i386/x86-64-nop-3.d 
b/gas/testsuite/gas/i386/x86-64-nop-3.d
+index 8514c4d077..617033a8ac 100644
+--- a/gas/testsuite/gas/i386/x86-64-nop-3.d
++++ b/gas/testsuite/gas/i386/x86-64-nop-3.d
+@@ -18,5 +18,5 @@ Disassembly of section .text:
  Disassembly of section .altinstr_replacement:
  
  0+ <.altinstr_replacement>:
 - +[a-f0-9]+:  e9 00 00 00 00          jmpq   5 <_start\+0x5>  1: 
R_X86_64_PLT32       foo-0x4
 + +[a-f0-9]+:  e9 00 00 00 00          jmpq   5 <_start\+0x5>  1: 
R_X86_64_PC32        foo-0x4
  #pass
-Index: binutils-2.32/gas/testsuite/gas/i386/x86-64-nop-4.d
-===================================================================
---- binutils-2.32.orig/gas/testsuite/gas/i386/x86-64-nop-4.d   2019-01-19 
17:01:33.000000000 +0100
-+++ binutils-2.32/gas/testsuite/gas/i386/x86-64-nop-4.d        2019-09-09 
18:29:44.000000000 +0200
-@@ -20,5 +20,5 @@ Disassembly of section .altinstr_replace
+diff --git a/gas/testsuite/gas/i386/x86-64-nop-4.d 
b/gas/testsuite/gas/i386/x86-64-nop-4.d
+index 7b696624cf..8610fc4303 100644
+--- a/gas/testsuite/gas/i386/x86-64-nop-4.d
++++ b/gas/testsuite/gas/i386/x86-64-nop-4.d
+@@ -21,5 +21,5 @@ Disassembly of section .altinstr_replacement:
   +[a-f0-9]+:  89 c0                   mov    %eax,%eax
   +[a-f0-9]+:  89 c0                   mov    %eax,%eax
   +[a-f0-9]+:  89 c0                   mov    %eax,%eax
 - +[a-f0-9]+:  e9 00 00 00 00          jmpq   b <_start\+0xb>  7: 
R_X86_64_PLT32       foo-0x4
 + +[a-f0-9]+:  e9 00 00 00 00          jmpq   b <_start\+0xb>  7: 
R_X86_64_PC32        foo-0x4
  #pass
-Index: binutils-2.32/gas/testsuite/gas/i386/x86-64-nop-5.d
-===================================================================
---- binutils-2.32.orig/gas/testsuite/gas/i386/x86-64-nop-5.d   2019-01-19 
17:01:33.000000000 +0100
-+++ binutils-2.32/gas/testsuite/gas/i386/x86-64-nop-5.d        2019-09-09 
18:29:44.000000000 +0200
-@@ -23,5 +23,5 @@ Disassembly of section .altinstr_replace
+diff --git a/gas/testsuite/gas/i386/x86-64-nop-5.d 
b/gas/testsuite/gas/i386/x86-64-nop-5.d
+index b0b7854f8a..333263bd93 100644
+--- a/gas/testsuite/gas/i386/x86-64-nop-5.d
++++ b/gas/testsuite/gas/i386/x86-64-nop-5.d
+@@ -24,5 +24,5 @@ Disassembly of section .altinstr_replacement:
   +[a-f0-9]+:  89 c0                   mov    %eax,%eax
   +[a-f0-9]+:  89 c0                   mov    %eax,%eax
   +[a-f0-9]+:  89 c0                   mov    %eax,%eax
 - +[a-f0-9]+:  e9 00 00 00 00          jmpq   d <_start\+0xd>  9: 
R_X86_64_PLT32       foo-0x4
 + +[a-f0-9]+:  e9 00 00 00 00          jmpq   d <_start\+0xd>  9: 
R_X86_64_PC32        foo-0x4
  #pass
-Index: binutils-2.32/gas/testsuite/gas/i386/x86-64-relax-2.d
-===================================================================
---- binutils-2.32.orig/gas/testsuite/gas/i386/x86-64-relax-2.d 2019-01-19 
17:01:33.000000000 +0100
-+++ binutils-2.32/gas/testsuite/gas/i386/x86-64-relax-2.d      2019-09-09 
18:29:44.000000000 +0200
-@@ -10,12 +10,12 @@ Disassembly of section .text:
+diff --git a/gas/testsuite/gas/i386/x86-64-relax-2.d 
b/gas/testsuite/gas/i386/x86-64-relax-2.d
+index 8f432dff52..6c7651886f 100644
+--- a/gas/testsuite/gas/i386/x86-64-relax-2.d
++++ b/gas/testsuite/gas/i386/x86-64-relax-2.d
+@@ -11,12 +11,12 @@ Disassembly of section .text:
  0+ <foo>:
  [     ]*[a-f0-9]+:    eb 24                   jmp    26 <local>
  [     ]*[a-f0-9]+:    eb 1e                   jmp    22 <hidden_def>
@@ -393,11 +382,11 @@
  
  0+22 <hidden_def>:
  [     ]*[a-f0-9]+:    c3                      retq   
-Index: binutils-2.32/gas/testsuite/gas/i386/x86-64-relax-3.d
-===================================================================
---- binutils-2.32.orig/gas/testsuite/gas/i386/x86-64-relax-3.d 2019-01-19 
17:01:33.000000000 +0100
-+++ binutils-2.32/gas/testsuite/gas/i386/x86-64-relax-3.d      2019-09-09 
18:29:44.000000000 +0200
-@@ -11,10 +11,10 @@ Disassembly of section .text:
+diff --git a/gas/testsuite/gas/i386/x86-64-relax-3.d 
b/gas/testsuite/gas/i386/x86-64-relax-3.d
+index bb60508145..f1ffdb89f6 100644
+--- a/gas/testsuite/gas/i386/x86-64-relax-3.d
++++ b/gas/testsuite/gas/i386/x86-64-relax-3.d
+@@ -12,10 +12,10 @@ Disassembly of section .text:
  [     ]*[a-f0-9]+:    eb 1b                   jmp    1f <hidden_def>
  [     ]*[a-f0-9]+:    eb 1b                   jmp    21 <global_def>
  [     ]*[a-f0-9]+:    e9 00 00 00 00          jmpq   b <foo\+0xb>     7: 
R_X86_64_PLT32       global_def-0x4
@@ -412,35 +401,38 @@
  
  0+1f <hidden_def>:
  [     ]*[a-f0-9]+:    c3                      retq   
-Index: binutils-2.32/ld/testsuite/ld-x86-64/mpx1c.rd
-===================================================================
---- binutils-2.32.orig/ld/testsuite/ld-x86-64/mpx1c.rd 2019-01-19 
17:01:34.000000000 +0100
-+++ binutils-2.32/ld/testsuite/ld-x86-64/mpx1c.rd      2019-09-09 
18:29:44.000000000 +0200
+diff --git a/ld/testsuite/ld-x86-64/mpx1c.rd b/ld/testsuite/ld-x86-64/mpx1c.rd
+index d66524c883..d3b292cbdc 100644
+--- a/ld/testsuite/ld-x86-64/mpx1c.rd
++++ b/ld/testsuite/ld-x86-64/mpx1c.rd
 @@ -1,3 +1,3 @@
  #...
 -[0-9a-f ]+R_X86_64_PLT32 +0+ +.*
 +[0-9a-f ]+R_X86_64_PC32 +0+ +.*
  #...
-Index: binutils-2.32/ld/testsuite/ld-x86-64/pr22791-1.err
-===================================================================
---- binutils-2.32.orig/ld/testsuite/ld-x86-64/pr22791-1.err    2019-01-19 
17:01:34.000000000 +0100
-+++ /dev/null  1970-01-01 00:00:00.000000000 +0000
+diff --git a/ld/testsuite/ld-x86-64/pr22791-1.err 
b/ld/testsuite/ld-x86-64/pr22791-1.err
+deleted file mode 100644
+index 8c5565992e..0000000000
+--- a/ld/testsuite/ld-x86-64/pr22791-1.err
++++ /dev/null
 @@ -1,2 +0,0 @@
--.*relocation R_X86_64_PC32 against symbol `foo' can not be used when making a 
PIE object; recompile with -fPIC
+-.*relocation R_X86_64_PC32 against symbol `foo' can not be used when making a 
PIE object; recompile with -fPIE
 -#...
-Index: binutils-2.32/ld/testsuite/ld-x86-64/pr22791-1a.c
-===================================================================
---- binutils-2.32.orig/ld/testsuite/ld-x86-64/pr22791-1a.c     2019-01-19 
17:01:34.000000000 +0100
-+++ /dev/null  1970-01-01 00:00:00.000000000 +0000
+diff --git a/ld/testsuite/ld-x86-64/pr22791-1a.c 
b/ld/testsuite/ld-x86-64/pr22791-1a.c
+deleted file mode 100644
+index cd0130cacd..0000000000
+--- a/ld/testsuite/ld-x86-64/pr22791-1a.c
++++ /dev/null
 @@ -1,4 +0,0 @@
 -void
 -foo (void)
 -{
 -}
-Index: binutils-2.32/ld/testsuite/ld-x86-64/pr22791-1b.s
-===================================================================
---- binutils-2.32.orig/ld/testsuite/ld-x86-64/pr22791-1b.s     2019-01-19 
17:01:34.000000000 +0100
-+++ /dev/null  1970-01-01 00:00:00.000000000 +0000
+diff --git a/ld/testsuite/ld-x86-64/pr22791-1b.s 
b/ld/testsuite/ld-x86-64/pr22791-1b.s
+deleted file mode 100644
+index 9751db49aa..0000000000
+--- a/ld/testsuite/ld-x86-64/pr22791-1b.s
++++ /dev/null
 @@ -1,6 +0,0 @@
 -      .text
 -      .globl  main
@@ -448,10 +440,11 @@
 -main:
 -      movl    foo(%rip), %eax
 -      .size   main, .-main
-Index: binutils-2.32/ld/testsuite/ld-x86-64/pr22791-2.rd
-===================================================================
---- binutils-2.32.orig/ld/testsuite/ld-x86-64/pr22791-2.rd     2019-01-19 
17:01:34.000000000 +0100
-+++ /dev/null  1970-01-01 00:00:00.000000000 +0000
+diff --git a/ld/testsuite/ld-x86-64/pr22791-2.rd 
b/ld/testsuite/ld-x86-64/pr22791-2.rd
+deleted file mode 100644
+index 70deb30d84..0000000000
+--- a/ld/testsuite/ld-x86-64/pr22791-2.rd
++++ /dev/null
 @@ -1,6 +0,0 @@
 -#failif
 -#...
@@ -459,10 +452,11 @@
 -#...
 -[0-9a-f ]+R_X86_64_NONE.*
 -#...
-Index: binutils-2.32/ld/testsuite/ld-x86-64/pr22791-2a.s
-===================================================================
---- binutils-2.32.orig/ld/testsuite/ld-x86-64/pr22791-2a.s     2019-01-19 
17:01:34.000000000 +0100
-+++ /dev/null  1970-01-01 00:00:00.000000000 +0000
+diff --git a/ld/testsuite/ld-x86-64/pr22791-2a.s 
b/ld/testsuite/ld-x86-64/pr22791-2a.s
+deleted file mode 100644
+index 0a855024d7..0000000000
+--- a/ld/testsuite/ld-x86-64/pr22791-2a.s
++++ /dev/null
 @@ -1,8 +0,0 @@
 -      .text
 -      .p2align 4,,15
@@ -472,10 +466,11 @@
 -      jmp     bar
 -      .size   foo, .-foo
 -      .section        .note.GNU-stack,"",@progbits
-Index: binutils-2.32/ld/testsuite/ld-x86-64/pr22791-2b.c
-===================================================================
---- binutils-2.32.orig/ld/testsuite/ld-x86-64/pr22791-2b.c     2019-01-19 
17:01:34.000000000 +0100
-+++ /dev/null  1970-01-01 00:00:00.000000000 +0000
+diff --git a/ld/testsuite/ld-x86-64/pr22791-2b.c 
b/ld/testsuite/ld-x86-64/pr22791-2b.c
+deleted file mode 100644
+index 79ef27c085..0000000000
+--- a/ld/testsuite/ld-x86-64/pr22791-2b.c
++++ /dev/null
 @@ -1,7 +0,0 @@
 -#include <stdio.h>
 -
@@ -484,10 +479,11 @@
 -{
 -  puts ("PASS");
 -}
-Index: binutils-2.32/ld/testsuite/ld-x86-64/pr22791-2c.s
-===================================================================
---- binutils-2.32.orig/ld/testsuite/ld-x86-64/pr22791-2c.s     2019-01-19 
17:01:34.000000000 +0100
-+++ /dev/null  1970-01-01 00:00:00.000000000 +0000
+diff --git a/ld/testsuite/ld-x86-64/pr22791-2c.s 
b/ld/testsuite/ld-x86-64/pr22791-2c.s
+deleted file mode 100644
+index 1460d1b828..0000000000
+--- a/ld/testsuite/ld-x86-64/pr22791-2c.s
++++ /dev/null
 @@ -1,12 +0,0 @@
 -      .text
 -      .p2align 4,,15
@@ -501,10 +497,10 @@
 -      ret
 -      .size   main, .-main
 -      .section        .note.GNU-stack,"",@progbits
-Index: binutils-2.32/ld/testsuite/ld-x86-64/pr22842b.S
-===================================================================
---- binutils-2.32.orig/ld/testsuite/ld-x86-64/pr22842b.S       2019-01-19 
17:01:34.000000000 +0100
-+++ binutils-2.32/ld/testsuite/ld-x86-64/pr22842b.S    2019-09-09 
18:29:44.000000000 +0200
+diff --git a/ld/testsuite/ld-x86-64/pr22842b.S 
b/ld/testsuite/ld-x86-64/pr22842b.S
+index f0659cd901..b9dd81345b 100644
+--- a/ld/testsuite/ld-x86-64/pr22842b.S
++++ b/ld/testsuite/ld-x86-64/pr22842b.S
 @@ -7,7 +7,7 @@ main:
          leaq    bar(%rip), %rdi
        addq    %rax, %rdi
@@ -514,14 +510,15 @@
        xorl    %eax, %eax
        popq    %rcx
        retq
-Index: binutils-2.32/ld/testsuite/ld-x86-64/x86-64.exp
-===================================================================
---- binutils-2.32.orig/ld/testsuite/ld-x86-64/x86-64.exp       2019-09-09 
18:29:44.000000000 +0200
-+++ binutils-2.32/ld/testsuite/ld-x86-64/x86-64.exp    2019-09-09 
18:29:44.000000000 +0200
-@@ -1208,44 +1208,6 @@ if { [isnative] && [which $CC] != 0 } {
+diff --git a/ld/testsuite/ld-x86-64/x86-64.exp 
b/ld/testsuite/ld-x86-64/x86-64.exp
+index 88f75e0e43..c632fe932c 100644
+--- a/ld/testsuite/ld-x86-64/x86-64.exp
++++ b/ld/testsuite/ld-x86-64/x86-64.exp
+@@ -1244,44 +1244,6 @@ if { [isnative] && [check_compiler_available] } {
+            {readelf -lW pr22393-3b.rd}} \
            "pr22393-3-static" \
        ] \
-       [list \
+-      [list \
 -          "Build pr22791-1.so" \
 -          "-shared" \
 -          "-fPIC -Wa,-mx86-used-note=yes" \
@@ -559,14 +556,14 @@
 -          {{readelf -drW pr22791-2.rd}} \
 -          "pr22791-2" \
 -      ] \
--      [list \
+       [list \
            "Build pr22842.so" \
            "-shared" \
-           "-fPIC -Wa,-mx86-used-note=yes" \
-@@ -1588,15 +1550,6 @@ if { [isnative] && [which $CC] != 0 } {
+@@ -1624,15 +1586,6 @@ if { [isnative] && [check_compiler_available] } {
+           "pr22393-3-static" \
            "pass.out" \
        ] \
-       [list \
+-      [list \
 -          "Run pr22791-2" \
 -          "-pie -Wl,--no-as-needed tmpdir/pr22791-2.so" \
 -          "-Wa,-mx86-used-note=yes" \
@@ -575,7 +572,8 @@
 -          "pass.out" \
 -          "$NOPIE_CFLAGS" \
 -      ] \
--      [list \
+       [list \
            "Run pr22842" \
            "-pie -Wl,--no-as-needed tmpdir/pr22842.so" \
-           "-Wa,-mx86-used-note=yes" \
+-- 
+2.25.0

++++++ binutils-skip-rpaths.patch ++++++
--- /var/tmp/diff_new_pack.xO69n9/_old  2020-04-05 17:07:02.786211810 +0200
+++ /var/tmp/diff_new_pack.xO69n9/_new  2020-04-05 17:07:02.786211810 +0200
@@ -1,17 +1,26 @@
-diff --git a/ld/emultempl/elf32.em b/ld/emultempl/elf32.em
-index f4f7ad6b4e..7b0f86031a 100644
---- ld/emultempl/elf32.em
-+++ ld/emultempl/elf32.em
-@@ -1638,8 +1638,35 @@ if test x"$LDEMUL_BEFORE_ALLOCATION" != 
xgld"$EMULATION_NAME"_before_allocation;
-   else
-     ELF_INTERPRETER_SET_DEFAULT=
+diff --git a/ld/emultempl/elf.em b/ld/emultempl/elf.em
+index 42c552b36e..dd0a6b1e60 100644
+--- a/ld/emultempl/elf.em
++++ b/ld/emultempl/elf.em
+@@ -135,6 +135,8 @@ if test x"$LDEMUL_BEFORE_ALLOCATION" != 
xgld"$EMULATION_NAME"_before_allocation;
+   if test x"${ELF_INTERPRETER_NAME}" = x; then
+     ELF_INTERPRETER_NAME=NULL
    fi
 +
 +  libpath_nl=`echo ${NATIVE_LIB_DIRS// /\\\n}`
  fragment <<EOF
  
+ /* This is called after the sections have been attached to output
+diff --git a/ld/ldelf.c b/ld/ldelf.c
+index 2e27cf48a8..7162d0cf91 100644
+--- a/ld/ldelf.c
++++ b/ld/ldelf.c
+@@ -1506,6 +1506,31 @@ ldelf_append_to_separated_string (char **to, char 
*op_arg)
+     }
+ }
+ 
 +static int
-+gld${EMULATION_NAME}_is_contained (const char *path, const char *dc)
++ldelf_is_contained (const char *path, const char *dc)
 +{
 +  while (*dc)
 +    {
@@ -35,19 +44,19 @@
 +  return 0;
 +}
 +
- /* used by before_allocation and handle_option. */
- static void
- gld${EMULATION_NAME}_append_to_separated_string (char **to, char *op_arg)
-@@ -1686,7 +1713,7 @@ gld${EMULATION_NAME}_append_to_separated_string (char 
**to, char *op_arg)
- static void
- gld${EMULATION_NAME}_before_allocation (void)
+ /* This is called after the sections have been attached to output
+    sections, but before any sizes or addresses have been set.  */
+ 
+@@ -1513,7 +1538,7 @@ void
+ ldelf_before_allocation (char *audit, char *depaudit,
+                        const char *default_interpreter_name)
  {
 -  const char *rpath;
 +  char *rpath;
    asection *sinterp;
    bfd *abfd;
    struct bfd_link_hash_entry *ehdr_start = NULL;
-@@ -1745,7 +1772,65 @@ gld${EMULATION_NAME}_before_allocation (void)
+@@ -1572,7 +1597,65 @@ ldelf_before_allocation (char *audit, char *depaudit,
       by dynamic linking.  */
    rpath = command_line.rpath;
    if (rpath == NULL)
@@ -79,8 +88,8 @@
 +
 +         while (*cr)
 +            {
-+             if (gld${EMULATION_NAME}_is_contained (cr, dirs)
-+                 || gld${EMULATION_NAME}_is_contained (cr, "$libpath_nl"))
++             if (ldelf_is_contained (cr, dirs)
++                 || ldelf_is_contained (cr, "$libpath_nl"))
 +               {
 +                 char *cc = cr, *cw = cr;
 +                 while (*cc && *cc != ':')


++++++ cross-avr-size.patch ++++++
--- /var/tmp/diff_new_pack.xO69n9/_old  2020-04-05 17:07:02.810211835 +0200
+++ /var/tmp/diff_new_pack.xO69n9/_new  2020-04-05 17:07:02.814211839 +0200
@@ -1,53 +1,16 @@
 diff --git a/binutils/size.c b/binutils/size.c
-index 93ec02691e..ad7cbee7c5 100644
---- binutils/size.c
-+++ binutils/size.c
-@@ -34,10 +34,31 @@
- #include "getopt.h"
- #include "bucomm.h"
- 
--#ifndef BSD_DEFAULT
--#define BSD_DEFAULT 1
-+typedef enum
-+{
-+    format_sysv = 0,
-+    format_bsd = 1,
-+    format_avr = 2,
-+} format_type_t;
-+
-+
-+/* Set the default format. */
-+#define FORMAT_DEFAULT_SYSV 0
-+#define FORMAT_DEFAULT_BSD 1
-+#define FORMAT_DEFAULT_AVR 0
-+
-+#if FORMAT_DEFAULT_SYSV
-+    #define FORMAT_DEFAULT format_sysv
-+    #define FORMAT_NAME "sysv"
-+#elif FORMAT_DEFAULT_BSD
-+    #define FORMAT_DEFAULT format_bsd
-+    #define FORMAT_NAME "berkeley"
-+#elif FORMAT_DEFAULT_AVR
-+    #define FORMAT_DEFAULT format_avr
-+    #define FORMAT_NAME "avr"
- #endif
- 
-+
- /* Program options.  */
- 
- static enum
-@@ -46,9 +67,8 @@ static enum
-   }
- radix = decimal;
- 
--/* 0 means use AT&T-style output.  */
--static int berkeley_format = BSD_DEFAULT;
- 
-+format_type_t format = FORMAT_DEFAULT;
- static int show_version = 0;
- static int show_help = 0;
- static int show_totals = 0;
-@@ -62,6 +82,246 @@ static bfd_size_type total_textsize;
+index 479a464887..971156ccbe 100644
+--- a/binutils/size.c
++++ b/binutils/size.c
+@@ -51,6 +51,7 @@ enum output_format
+   {
+    FORMAT_BERKLEY,
+    FORMAT_SYSV,
++   FORMAT_AVR,
+    FORMAT_GNU
+   };
+ static enum output_format selected_output_format =
+@@ -74,6 +75,246 @@ static bfd_size_type total_textsize;
  /* Program exit status.  */
  static int return_code = 0;
  
@@ -294,30 +257,17 @@
  static char *target = NULL;
  
  /* Forward declarations.  */
-@@ -77,7 +337,8 @@ usage (FILE *stream, int status)
+@@ -89,7 +330,8 @@ usage (FILE *stream, int status)
    fprintf (stream, _(" Displays the sizes of sections inside binary 
files\n"));
    fprintf (stream, _(" If no input file(s) are specified, a.out is 
assumed\n"));
    fprintf (stream, _(" The options are:\n\
--  -A|-B     --format={sysv|berkeley}  Select output style (default is %s)\n\
-+  -A|-B|-C  --format={sysv|berkeley|avr}  Select output style (default is 
%s)\n\
+-  -A|-B|-G  --format={sysv|berkeley|gnu}  Select output style (default is 
%s)\n\
++  -A|-B|-C|-G  --format={sysv|berkeley|avr|gnu}  Select output style (default 
is %s)\n\
 +            --mcu=<avrmcu>            MCU name for AVR format only\n\
    -o|-d|-x  --radix={8|10|16}         Display numbers in octal, decimal or 
hex\n\
    -t        --totals                  Display the total sizes (Berkeley 
only)\n\
              --common                  Display total size for *COM* syms\n\
-@@ -86,11 +347,7 @@ usage (FILE *stream, int status)
-   -h        --help                    Display this information\n\
-   -v        --version                 Display the program's version\n\
- \n"),
--#if BSD_DEFAULT
--  "berkeley"
--#else
--  "sysv"
--#endif
-+FORMAT_NAME
- );
-   list_supported_targets (program_name, stream);
-   if (REPORT_BUGS_TO[0] && status == 0)
-@@ -101,6 +358,7 @@ usage (FILE *stream, int status)
+@@ -113,6 +355,7 @@ usage (FILE *stream, int status)
  #define OPTION_FORMAT (200)
  #define OPTION_RADIX (OPTION_FORMAT + 1)
  #define OPTION_TARGET (OPTION_RADIX + 1)
@@ -325,7 +275,7 @@
  
  static struct option long_options[] =
  {
-@@ -108,6 +366,7 @@ static struct option long_options[] =
+@@ -120,6 +363,7 @@ static struct option long_options[] =
    {"format", required_argument, 0, OPTION_FORMAT},
    {"radix", required_argument, 0, OPTION_RADIX},
    {"target", required_argument, 0, OPTION_TARGET},
@@ -333,34 +283,26 @@
    {"totals", no_argument, &show_totals, 1},
    {"version", no_argument, &show_version, 1},
    {"help", no_argument, &show_help, 1},
-@@ -141,7 +400,7 @@ main (int argc, char **argv)
+@@ -153,13 +397,17 @@ main (int argc, char **argv)
      fatal (_("fatal error: libbfd ABI mismatch"));
    set_default_bfd_target ();
  
--  while ((c = getopt_long (argc, argv, "ABHhVvdfotx", long_options,
-+  while ((c = getopt_long (argc, argv, "ABCHhVvdfotx", long_options,
+-  while ((c = getopt_long (argc, argv, "ABGHhVvdfotx", long_options,
++  while ((c = getopt_long (argc, argv, "ABCGHhVvdfotx", long_options,
                           (int *) 0)) != EOF)
      switch (c)
        {
-@@ -150,11 +409,15 @@ main (int argc, char **argv)
+       case OPTION_FORMAT:
+       switch (*optarg)
          {
++    case 'A':
++    case 'a':
++      selected_output_format = FORMAT_AVR;
++      break;
          case 'B':
          case 'b':
--          berkeley_format = 1;
-+          format = format_bsd;
-           break;
-         case 'S':
-         case 's':
--          berkeley_format = 0;
-+          format = format_sysv;
-+          break;
-+        case 'A':
-+        case 'a':
-+          format = format_avr;
-           break;
-         default:
-           non_fatal (_("invalid argument to --format: %s"), optarg);
-@@ -162,6 +425,10 @@ main (int argc, char **argv)
+           selected_output_format = FORMAT_BERKLEY;
+@@ -178,6 +426,10 @@ main (int argc, char **argv)
          }
        break;
  
@@ -371,37 +313,20 @@
        case OPTION_TARGET:
        target = optarg;
        break;
-@@ -190,11 +457,14 @@ main (int argc, char **argv)
-       break;
- 
-       case 'A':
--      berkeley_format = 0;
-+      format = format_sysv;
-       break;
+@@ -211,6 +463,9 @@ main (int argc, char **argv)
        case 'B':
--      berkeley_format = 1;
-+      format = format_bsd;
+       selected_output_format = FORMAT_BERKLEY;
        break;
-+      case 'C':
-+    format = format_avr;
-+    break;
-       case 'v':
-       case 'V':
-       show_version = 1;
-@@ -240,7 +510,7 @@ main (int argc, char **argv)
-     for (; optind < argc;)
-       display_file (argv[optind++]);
- 
--  if (show_totals && berkeley_format)
-+  if (show_totals && format == format_bsd)
-     {
-       bfd_size_type total = total_textsize + total_datasize + total_bsssize;
- 
-@@ -606,13 +876,117 @@ print_sysv_format (bfd *file)
++    case 'C':
++      selected_output_format = FORMAT_AVR;
++      break;
+       case 'G':
+       selected_output_format = FORMAT_GNU;
+       break;
+@@ -648,13 +903,115 @@ print_sysv_format (bfd *file)
    printf ("\n\n");
  }
  
-+
 +static avr_device_t *
 +avr_find_device (void)
 +{
@@ -420,8 +345,6 @@
 +  return (NULL);
 +}
 +
-+
-+
 +static void
 +print_avr_format (bfd *file)
 +{
@@ -430,9 +353,9 @@
 +  int rammax = 0;
 +  int eeprommax = 0;
 +  asection *section; 
-+  bfd_size_type datasize = 0;
-+  bfd_size_type textsize = 0;
-+  bfd_size_type bsssize = 0;
++  datasize = 0;
++  textsize = 0;
++  bsssize = 0;
 +  bfd_size_type bootloadersize = 0;
 +  bfd_size_type noinitsize = 0;
 +  bfd_size_type eepromsize = 0;
@@ -447,17 +370,17 @@
 +  }
 +
 +  if ((section = bfd_get_section_by_name (file, ".data")) != NULL)
-+    datasize = bfd_section_size (file, section);
++    datasize = bfd_section_size (section);
 +  if ((section = bfd_get_section_by_name (file, ".text")) != NULL)
-+    textsize = bfd_section_size (file, section);
++    textsize = bfd_section_size (section);
 +  if ((section = bfd_get_section_by_name (file, ".bss")) != NULL)
-+    bsssize = bfd_section_size (file, section);
++    bsssize = bfd_section_size (section);
 +  if ((section = bfd_get_section_by_name (file, ".bootloader")) != NULL)
-+    bootloadersize = bfd_section_size (file, section);
++    bootloadersize = bfd_section_size (section);
 +  if ((section = bfd_get_section_by_name (file, ".noinit")) != NULL)
-+    noinitsize = bfd_section_size (file, section);
++    noinitsize = bfd_section_size (section);
 +  if ((section = bfd_get_section_by_name (file, ".eeprom")) != NULL)
-+    eepromsize = bfd_section_size (file, section);
++    eepromsize = bfd_section_size (section);
 +  
 +  bfd_size_type text = textsize + datasize + bootloadersize;
 +  bfd_size_type data = datasize + bsssize + noinitsize;
@@ -501,19 +424,20 @@
  {
    if (show_common)
      calculate_common_size (file);
--  if (berkeley_format)
--    print_berkeley_format (file);
--  else
+-  if (selected_output_format == FORMAT_SYSV)
 -    print_sysv_format (file);
-+  switch (format)
+-  else
+-    print_berkeley_or_gnu_format (file);
++  switch (selected_output_format)
 +  {
-+    case format_sysv:
++    case FORMAT_SYSV:
 +      print_sysv_format (file);
 +      break;
-+    case format_bsd:
-+      print_berkeley_format (file);
++    case FORMAT_BERKLEY:
++    case FORMAT_GNU:
++      print_berkeley_or_gnu_format (file);
 +      break;
-+    case format_avr:
++    case FORMAT_AVR:
 +    default:
 +      print_avr_format (file);
 +      break;


Reply via email to