Hello community, here is the log from the commit of package binutils for openSUSE:Leap:15.2 checked in at 2020-05-16 04:57:13 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Comparing /work/SRC/openSUSE:Leap:15.2/binutils (Old) and /work/SRC/openSUSE:Leap:15.2/.binutils.new.2738 (New) ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Package is "binutils" Sat May 16 04:57:13 2020 rev:31 rq:805677 version:2.32 Changes: -------- --- /work/SRC/openSUSE:Leap:15.2/binutils/binutils.changes 2020-04-05 17:06:59.370208168 +0200 +++ /work/SRC/openSUSE:Leap:15.2/.binutils.new.2738/binutils.changes 2020-05-16 04:57:16.895931309 +0200 @@ -2 +2 @@ -Wed Mar 25 14:12:50 UTC 2020 - Martin Liška <mli...@suse.cz> +Fri Jan 17 13:32:12 UTC 2020 - m...@suse.com @@ -4,129 +4,3 @@ -- Update binutils-2.34-branch.diff.gz. - -------------------------------------------------------------------- -Fri Feb 28 16:20:14 UTC 2020 - Martin Liška <mli...@suse.cz> - -- 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 <rguent...@suse.com> - -- Add binutils-pr25593.diff to fix DT_NEEDED order with -flto - [bsc#1163744] - -------------------------------------------------------------------- -Tue Feb 18 16:12:52 UTC 2020 - Martin Liška <mli...@suse.cz> - -- Update fix-try_load_plugin.patch to latest version. - -------------------------------------------------------------------- -Tue Feb 18 12:48:26 UTC 2020 - Martin Liška <mli...@suse.cz> - -- 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 <mli...@suse.cz> - -- 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 <sch...@suse.de> - -- Disable LTO during testsuite run - -------------------------------------------------------------------- -Wed Nov 20 16:22:51 UTC 2019 - m...@suse.com - -- 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 - m...@suse.com - -- Add add-ulp-section.diff for user space live patching. - -------------------------------------------------------------------- -Tue Oct 22 13:45:51 UTC 2019 - Martin Liška <mli...@suse.cz> - -- 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. +- Add binutils-add-z15-name.diff to recognize the official name + of s390 arch13: "z15". [bsc#1160590, jsc#SLE-7903 aka + jsc#SLE-7464] 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: ---- 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 New: ---- binutils-2.32-branch.diff.gz binutils-2.32.tar.bz2 binutils-2.32.tar.bz2.sig binutils-add-z15-name.diff binutils-fix-ld-segv.diff binutils-pr24486.patch riscv-abi-check.patch rx-gas-padding-pr24464.patch ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Other differences: ------------------ ++++++ binutils.spec ++++++ --- /var/tmp/diff_new_pack.ZmRrJL/_old 2020-05-16 04:57:20.743939196 +0200 +++ /var/tmp/diff_new_pack.ZmRrJL/_new 2020-05-16 04:57:20.743939196 +0200 @@ -1,7 +1,7 @@ # # spec file for package binutils # -# Copyright (c) 2020 SUSE LLC +# Copyright (c) 2020 SUSE LINUX GmbH, Nuernberg, Germany. # # 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 https://bugs.opensuse.org/ +# Please submit bugfixes or comments via http://bugs.opensuse.org/ # @@ -33,7 +33,7 @@ %else BuildRequires: zlib-devel %endif -Version: 2.34 +Version: 2.32 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.34-branch.diff.gz +Patch1: binutils-2.32-branch.diff.gz Patch3: binutils-skip-rpaths.patch Patch4: s390-biarch.diff Patch5: x86-64-biarch.patch @@ -95,9 +95,11 @@ Patch34: aarch64-common-pagesize.patch Patch36: binutils-pr22868.diff Patch37: binutils-revert-plt32-in-branches.diff -Patch38: binutils-fix-invalid-op-errata.diff -Patch40: binutils-pr25593.diff -Patch100: add-ulp-section.diff +Patch38: riscv-abi-check.patch +Patch39: rx-gas-padding-pr24464.patch +Patch40: binutils-pr24486.patch +Patch41: binutils-fix-ld-segv.diff +Patch42: binutils-add-z15-name.diff Patch90: cross-avr-nesc-as.patch Patch92: cross-avr-omit_section_dynsym.patch Patch93: cross-avr-size.patch @@ -140,23 +142,6 @@ 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 @@ -172,7 +157,7 @@ # patch bringing the tarball to the newest upstream version %patch1 -p1 %if !%{test_vanilla} -%patch3 -p1 +%patch3 %patch4 %patch5 %patch6 @@ -187,23 +172,27 @@ %if %{suse_version} < 1550 %patch37 -p1 %endif -%patch38 +%patch38 -p1 +%patch39 -p1 %patch40 -p1 -%patch100 +%patch41 +%patch42 -p1 %if "%{TARGET}" == "avr" cp gas/config/tc-avr.h gas/config/tc-avr-nesc.h %patch90 %patch92 -%patch93 -p1 +%patch93 %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 @@ -361,9 +350,9 @@ unset SUSE_ASNEEDED cd build-dir %if 0%{?cross:1} -make -k check CFLAGS="-O2 -g" CXXFLAGS="-O2 -g" CFLAGS_FOR_TARGET="-O2 -g" CXXFLAGS_FOR_TARGET="-O2 -g" || %{make_check_handling} +make -k check CFLAGS="-O2 -g" CXXFLAGS="-O2 -g" || %{make_check_handling} %else -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} +make -k check CFLAGS="$RPM_OPT_FLAGS -Wno-unused -Wno-unprototyped-calls" || : %endif %install @@ -471,9 +460,6 @@ "%_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 @@ -489,9 +475,6 @@ "%_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 @@ -530,14 +513,6 @@ %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.ZmRrJL/_old 2020-05-16 04:57:20.763939237 +0200 +++ /var/tmp/diff_new_pack.ZmRrJL/_new 2020-05-16 04:57:20.767939245 +0200 @@ -1,7 +1,7 @@ # # spec file for package cross-aarch64-binutils # -# Copyright (c) 2020 SUSE LLC +# Copyright (c) 2020 SUSE LINUX GmbH, Nuernberg, Germany. # # 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 https://bugs.opensuse.org/ +# Please submit bugfixes or comments via http://bugs.opensuse.org/ # @@ -36,7 +36,7 @@ %else BuildRequires: zlib-devel %endif -Version: 2.34 +Version: 2.32 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.34-branch.diff.gz +Patch1: binutils-2.32-branch.diff.gz Patch3: binutils-skip-rpaths.patch Patch4: s390-biarch.diff Patch5: x86-64-biarch.patch @@ -98,9 +98,11 @@ Patch34: aarch64-common-pagesize.patch Patch36: binutils-pr22868.diff Patch37: binutils-revert-plt32-in-branches.diff -Patch38: binutils-fix-invalid-op-errata.diff -Patch40: binutils-pr25593.diff -Patch100: add-ulp-section.diff +Patch38: riscv-abi-check.patch +Patch39: rx-gas-padding-pr24464.patch +Patch40: binutils-pr24486.patch +Patch41: binutils-fix-ld-segv.diff +Patch42: binutils-add-z15-name.diff Patch90: cross-avr-nesc-as.patch Patch92: cross-avr-omit_section_dynsym.patch Patch93: cross-avr-size.patch @@ -143,23 +145,6 @@ 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 @@ -175,7 +160,7 @@ # patch bringing the tarball to the newest upstream version %patch1 -p1 %if !%{test_vanilla} -%patch3 -p1 +%patch3 %patch4 %patch5 %patch6 @@ -190,23 +175,27 @@ %if %{suse_version} < 1550 %patch37 -p1 %endif -%patch38 +%patch38 -p1 +%patch39 -p1 %patch40 -p1 -%patch100 +%patch41 +%patch42 -p1 %if "%{TARGET}" == "avr" cp gas/config/tc-avr.h gas/config/tc-avr-nesc.h %patch90 %patch92 -%patch93 -p1 +%patch93 %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 @@ -364,9 +353,9 @@ unset SUSE_ASNEEDED cd build-dir %if 0%{?cross:1} -make -k check CFLAGS="-O2 -g" CXXFLAGS="-O2 -g" CFLAGS_FOR_TARGET="-O2 -g" CXXFLAGS_FOR_TARGET="-O2 -g" || %{make_check_handling} +make -k check CFLAGS="-O2 -g" CXXFLAGS="-O2 -g" || %{make_check_handling} %else -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} +make -k check CFLAGS="$RPM_OPT_FLAGS -Wno-unused -Wno-unprototyped-calls" || : %endif %install @@ -474,9 +463,6 @@ "%_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 @@ -492,9 +478,6 @@ "%_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 @@ -533,14 +516,6 @@ %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 ++++++ binutils-2.34-branch.diff.gz -> binutils-2.32-branch.diff.gz ++++++ Binary files /work/SRC/openSUSE:Leap:15.2/binutils/binutils-2.34-branch.diff.gz and /work/SRC/openSUSE:Leap:15.2/.binutils.new.2738/binutils-2.32-branch.diff.gz differ ++++++ binutils-2.34.tar.bz2 -> binutils-2.32.tar.bz2 ++++++ /work/SRC/openSUSE:Leap:15.2/binutils/binutils-2.34.tar.bz2 /work/SRC/openSUSE:Leap:15.2/.binutils.new.2738/binutils-2.32.tar.bz2 differ: char 11, line 1 ++++++ binutils-add-z15-name.diff ++++++ commit 1f656f70098a9acda9bdf4c047cb86fedc007206 Author: Andreas Krebbel <kreb...@linux.ibm.com> Date: Tue Oct 8 11:23:57 2019 +0200 S/390: Add support for z15 as CPU name. So far z15 was identified as arch13. After the machine has been announced we can now add the real name. gas/ChangeLog: 2019-12-17 Andreas Krebbel <kreb...@linux.ibm.com> Backport from mainline 2019-10-08 Andreas Krebbel <kreb...@linux.ibm.com> * config/tc-s390.c (s390_parse_cpu): Add z15 as alternate CPU name. * doc/as.texi: Add z15 to CPU string list. * doc/c-s390.texi: Likewise. opcodes/ChangeLog: 2019-12-17 Andreas Krebbel <kreb...@linux.ibm.com> Backport from mainline 2019-10-08 Andreas Krebbel <kreb...@linux.ibm.com> * s390-mkopc.c (main): Enable z15 as CPU string in the opcode table. diff --git a/gas/config/tc-s390.c b/gas/config/tc-s390.c index f74497a..1395d20 100644 --- a/gas/config/tc-s390.c +++ b/gas/config/tc-s390.c @@ -291,7 +291,7 @@ s390_parse_cpu (const char * arg, S390_INSTR_FLAG_HTM | S390_INSTR_FLAG_VX }, { STRING_COMMA_LEN ("z14"), STRING_COMMA_LEN ("arch12"), S390_INSTR_FLAG_HTM | S390_INSTR_FLAG_VX }, - { STRING_COMMA_LEN (""), STRING_COMMA_LEN ("arch13"), + { STRING_COMMA_LEN ("z15"), STRING_COMMA_LEN ("arch13"), S390_INSTR_FLAG_HTM | S390_INSTR_FLAG_VX } }; static struct diff --git a/gas/doc/as.texi b/gas/doc/as.texi index e0c6212..4c6db35 100644 --- a/gas/doc/as.texi +++ b/gas/doc/as.texi @@ -1816,7 +1816,8 @@ Specify which s390 processor variant is the target, @samp{g5} (or @samp{arch3}), @samp{g6}, @samp{z900} (or @samp{arch5}), @samp{z990} (or @samp{arch6}), @samp{z9-109}, @samp{z9-ec} (or @samp{arch7}), @samp{z10} (or @samp{arch8}), @samp{z196} (or @samp{arch9}), @samp{zEC12} (or @samp{arch10}), -@samp{z13} (or @samp{arch11}), or @samp{z14} (or @samp{arch12}). +@samp{z13} (or @samp{arch11}), @samp{z14} (or @samp{arch12}), or @samp{z15} +(or @samp{arch13}). @item -mregnames @itemx -mno-regnames Allow or disallow symbolic names for registers. diff --git a/gas/doc/c-s390.texi b/gas/doc/c-s390.texi index 27fa317..8cb6d6c 100644 --- a/gas/doc/c-s390.texi +++ b/gas/doc/c-s390.texi @@ -18,7 +18,7 @@ and eleven chip levels. The architecture modes are the Enterprise System Architecture (ESA) and the newer z/Architecture mode. The chip levels are g5 (or arch3), g6, z900 (or arch5), z990 (or arch6), z9-109, z9-ec (or arch7), z10 (or arch8), z196 (or arch9), zEC12 (or arch10), z13 -(or arch11), z14 (or arch12), and arch13. +(or arch11), z14 (or arch12), and z15 (or arch13). @menu * s390 Options:: Command-line Options. @@ -71,7 +71,7 @@ are recognized: @code{zEC12} (or @code{arch10}), @code{z13} (or @code{arch11}), @code{z14} (or @code{arch12}), and -@code{arch13}). +@code{z15} (or @code{arch13}). Assembling an instruction that is not supported on the target processor results in an error message. diff --git a/opcodes/s390-mkopc.c b/opcodes/s390-mkopc.c index 0d07678..fe21ea1 100644 --- a/opcodes/s390-mkopc.c +++ b/opcodes/s390-mkopc.c @@ -377,7 +377,8 @@ main (void) else if (strcmp (cpu_string, "z14") == 0 || strcmp (cpu_string, "arch12") == 0) min_cpu = S390_OPCODE_ARCH12; - else if (strcmp (cpu_string, "arch13") == 0) + else if (strcmp (cpu_string, "z15") == 0 + || strcmp (cpu_string, "arch13") == 0) min_cpu = S390_OPCODE_ARCH13; else { fprintf (stderr, "Couldn't parse cpu string %s\n", cpu_string); ++++++ binutils-fix-ld-segv.diff ++++++ Fix for bsc#1154025 Fixes a segfault in linking some pacemaker libs where some versions use linker script magic to force some symbols visible, making their sections not have an owner. --- bfd/elf64-x86-64.c.mm 2019-10-15 13:54:18.826038254 +0000 +++ bfd/elf64-x86-64.c 2019-10-15 13:52:38.040286437 +0000 @@ -2239,6 +2239,7 @@ check_pic: = (info->nocopyreloc || (h != NULL && eh->def_protected + && h->root.u.def.section->owner && elf_has_no_copy_on_protected (h->root.u.def.section->owner))); if ((sec->flags & SEC_ALLOC) != 0 && (sec->flags & SEC_READONLY) != 0 @@ -3859,6 +3860,7 @@ direct: sec = h->root.u.def.section; if ((info->nocopyreloc || (eh->def_protected + && h->root.u.def.section->owner && elf_has_no_copy_on_protected (h->root.u.def.section->owner))) && !(h->root.u.def.section->flags & SEC_CODE)) return elf_x86_64_need_pic (info, input_bfd, input_section, ++++++ binutils-pr24486.patch ++++++ >From c54f15248ee990df6cea0b4730cd61b227a0e082 Mon Sep 17 00:00:00 2001 From: "H.J. Lu" <hjl.to...@gmail.com> Date: Fri, 26 Apr 2019 07:52:00 -0700 Subject: [PATCH] Don't complain undefined weak dynamic reference When undefined non-weak references in IR objects are optimized out by LTO, we can have weak dynamic referencs to symbols marked with bfd_link_hash_undefined. We shouldn't complain such undefined weak dynamic references. bfd/ PR ld/24486 * elflink.c (elf_link_output_extsym): Don't complain undefined weak dynamic reference. ld/ PR ld/24486 * testsuite/ld-plugin/lto.exp: Run PR ld/24486 tests. * testsuite/ld-plugin/pr24486a.c: New file. * testsuite/ld-plugin/pr24486b.c: Likewise. * testsuite/ld-plugin/pr24486c.c: Likewise. --- bfd/ChangeLog | 6 ++++++ bfd/elflink.c | 2 +- ld/ChangeLog | 8 ++++++++ ld/testsuite/ld-plugin/lto.exp | 12 ++++++++++++ ld/testsuite/ld-plugin/pr24486a.c | 8 ++++++++ ld/testsuite/ld-plugin/pr24486b.c | 8 ++++++++ ld/testsuite/ld-plugin/pr24486c.c | 1 + 7 files changed, 44 insertions(+), 1 deletion(-) create mode 100644 ld/testsuite/ld-plugin/pr24486a.c create mode 100644 ld/testsuite/ld-plugin/pr24486b.c create mode 100644 ld/testsuite/ld-plugin/pr24486c.c diff --git a/bfd/elflink.c b/bfd/elflink.c index 81e667dab0..ddeaa08d50 100644 --- a/bfd/elflink.c +++ b/bfd/elflink.c @@ -9776,7 +9776,7 @@ elf_link_output_extsym (struct bfd_hash_entry *bh, void *data) /* If we are reporting errors for this situation then do so now. */ if (!ignore_undef - && h->ref_dynamic + && h->ref_dynamic_nonweak && (!h->ref_regular || flinfo->info->gc_sections) && !elf_link_check_versioned_symbol (flinfo->info, bed, h) && flinfo->info->unresolved_syms_in_shared_libs != RM_IGNORE) diff --git a/ld/testsuite/ld-plugin/lto.exp b/ld/testsuite/ld-plugin/lto.exp index b13a77333f..e913c6f203 100644 --- a/ld/testsuite/ld-plugin/lto.exp +++ b/ld/testsuite/ld-plugin/lto.exp @@ -325,6 +325,18 @@ set lto_link_elf_tests [list \ [list {Build pr22220main.o} \ {} {-flto} \ {pr22220main.cc} {} {} {c++}] \ + [list "Build pr24486a.o" \ + "$plug_opt" "-flto -O2" \ + {pr24486a.c} {} "" "c"] \ + [list "Build pr24486b.so" \ + "-shared" "-O2 -fpic" \ + {pr24486b.c} {} "pr24486b.so" "c"] \ + [list "Build pr24486c.so" \ + "-shared -Wl,--no-as-needed tmpdir/pr24486b.so" "-O2 -fpic" \ + {pr24486c.c} {} "pr24486c.so" "c"] \ + [list "PR ld/24486" \ + "-O2 -flto tmpdir/pr24486a.o tmpdir/pr24486c.so -Wl,--as-needed tmpdir/pr24486b.so" "" \ + {dummy.c} {} "pr24486.exe"] \ ] # PR 14918 checks that libgcc is not spuriously included in a shared link of diff --git a/ld/testsuite/ld-plugin/pr24486a.c b/ld/testsuite/ld-plugin/pr24486a.c new file mode 100644 index 0000000000..def0139598 --- /dev/null +++ b/ld/testsuite/ld-plugin/pr24486a.c @@ -0,0 +1,8 @@ +extern int FLAGS_verbose; +extern void bar (void); +int +a(void) { +return FLAGS_verbose; +} +void unused (void) { bar(); } +int main() { return a (); } diff --git a/ld/testsuite/ld-plugin/pr24486b.c b/ld/testsuite/ld-plugin/pr24486b.c new file mode 100644 index 0000000000..3aabe2a395 --- /dev/null +++ b/ld/testsuite/ld-plugin/pr24486b.c @@ -0,0 +1,8 @@ +extern void bar (void) __attribute__((weak)); + +void +foo (void) +{ + if (bar) + bar (); +} diff --git a/ld/testsuite/ld-plugin/pr24486c.c b/ld/testsuite/ld-plugin/pr24486c.c new file mode 100644 index 0000000000..f289177d3e --- /dev/null +++ b/ld/testsuite/ld-plugin/pr24486c.c @@ -0,0 +1 @@ +int FLAGS_verbose; -- 2.21.0 ++++++ binutils-revert-plt32-in-branches.diff ++++++ --- /var/tmp/diff_new_pack.ZmRrJL/_old 2020-05-16 04:57:21.411940565 +0200 +++ /var/tmp/diff_new_pack.ZmRrJL/_new 2020-05-16 04:57:21.415940573 +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. -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: +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: 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. */ -@@ -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)) +@@ -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))) { -@@ -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) + 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) frag_var (rs_machine_dependent, 5, i.reloc[0], subtype, sym, off, p); } @@ -177,12 +177,6 @@ - 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. */ @@ -213,9 +207,9 @@ fixS *fixP; - bfd_reloc_code_real_type jump_reloc = i.reloc[0]; - if (i.tm.opcode_modifier.jump == JUMP_BYTE) + if (i.tm.opcode_modifier.jumpbyte) { -@@ -8067,17 +8027,8 @@ output_jump (void) +@@ -7797,17 +7763,8 @@ output_jump (void) abort (); } @@ -234,7 +228,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 -@@ -11263,10 +11214,6 @@ md_estimate_size_before_relax (fragS *fragP, segT segment) +@@ -10236,10 +10193,6 @@ md_estimate_size_before_relax (fragS *fr reloc_type = (enum bfd_reloc_code_real) fragP->fr_var; else if (size == 2) reloc_type = BFD_RELOC_16_PCREL; @@ -245,10 +239,10 @@ else reloc_type = BFD_RELOC_32_PCREL; -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 +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 @@ -17,7 +17,7 @@ Disassembly of section \.text: .*[ ]+R_X86_64_PC8[ ]+xtrn\+0x0*1 .*[ ]+R_X86_64_PC32[ ]+xtrn-0x0*4 @@ -258,10 +252,10 @@ .*[ ]+R_X86_64_PC8[ ]+xtrn-0x0*1 .*[ ]+R_X86_64_GOT32[ ]+xtrn .*[ ]+R_X86_64_GOT32[ ]+xtrn -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 +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 @@ -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 @@ -275,11 +269,11 @@ [ ]*[a-f0-9]+: ff d0 callq \*%rax [ ]*[a-f0-9]+: ff d0 callq \*%rax [ ]*[a-f0-9]+: 66 ff d0 data16 callq \*%rax -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: +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: .*[ ]+R_X86_64_PC8[ ]+xtrn\+0x0*1 .*[ ]+R_X86_64_PC32[ ]+xtrn-0x0*4 .*[ ]+R_X86_64_PC32[ ]+xtrn-0x0*4 @@ -288,11 +282,11 @@ .*[ ]+R_X86_64_PC8[ ]+xtrn-0x0*1 .*[ ]+R_X86_64_GOT64[ ]+xtrn .*[ ]+R_X86_64_GOT32[ ]+xtrn -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: +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: 0+ <.text>: [ ]*[a-f0-9]+: eb fe jmp (0x0|0 <.text>) @@ -301,7 +295,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\) -@@ -18,7 +18,7 @@ Disassembly of section .text: +@@ -17,7 +17,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 @@ -310,61 +304,78 @@ [ ]*[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\) -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: +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: 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 -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: +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 +[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 -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: +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 +[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 -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: +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: 0+ <foo>: [ ]*[a-f0-9]+: eb 24 jmp 26 <local> [ ]*[a-f0-9]+: eb 1e jmp 22 <hidden_def> @@ -382,11 +393,11 @@ 0+22 <hidden_def>: [ ]*[a-f0-9]+: c3 retq -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: +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: [ ]*[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 @@ -401,38 +412,35 @@ 0+1f <hidden_def>: [ ]*[a-f0-9]+: c3 retq -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 +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 @@ -1,3 +1,3 @@ #... -[0-9a-f ]+R_X86_64_PLT32 +0+ +.* +[0-9a-f ]+R_X86_64_PC32 +0+ +.* #... -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 +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 @@ -1,2 +0,0 @@ --.*relocation R_X86_64_PC32 against symbol `foo' can not be used when making a PIE object; recompile with -fPIE +-.*relocation R_X86_64_PC32 against symbol `foo' can not be used when making a PIE object; recompile with -fPIC -#... -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 +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 @@ -1,4 +0,0 @@ -void -foo (void) -{ -} -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 +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 @@ -1,6 +0,0 @@ - .text - .globl main @@ -440,11 +448,10 @@ -main: - movl foo(%rip), %eax - .size main, .-main -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 +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 @@ -1,6 +0,0 @@ -#failif -#... @@ -452,11 +459,10 @@ -#... -[0-9a-f ]+R_X86_64_NONE.* -#... -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 +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 @@ -1,8 +0,0 @@ - .text - .p2align 4,,15 @@ -466,11 +472,10 @@ - jmp bar - .size foo, .-foo - .section .note.GNU-stack,"",@progbits -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 +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 @@ -1,7 +0,0 @@ -#include <stdio.h> - @@ -479,11 +484,10 @@ -{ - puts ("PASS"); -} -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 +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 @@ -1,12 +0,0 @@ - .text - .p2align 4,,15 @@ -497,10 +501,10 @@ - ret - .size main, .-main - .section .note.GNU-stack,"",@progbits -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 +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 @@ -7,7 +7,7 @@ main: leaq bar(%rip), %rdi addq %rax, %rdi @@ -510,15 +514,14 @@ xorl %eax, %eax popq %rcx retq -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}} \ +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 } { "pr22393-3-static" \ ] \ -- [list \ + [list \ - "Build pr22791-1.so" \ - "-shared" \ - "-fPIC -Wa,-mx86-used-note=yes" \ @@ -556,14 +559,14 @@ - {{readelf -drW pr22791-2.rd}} \ - "pr22791-2" \ - ] \ - [list \ +- [list \ "Build pr22842.so" \ "-shared" \ -@@ -1624,15 +1586,6 @@ if { [isnative] && [check_compiler_available] } { - "pr22393-3-static" \ + "-fPIC -Wa,-mx86-used-note=yes" \ +@@ -1588,15 +1550,6 @@ if { [isnative] && [which $CC] != 0 } { "pass.out" \ ] \ -- [list \ + [list \ - "Run pr22791-2" \ - "-pie -Wl,--no-as-needed tmpdir/pr22791-2.so" \ - "-Wa,-mx86-used-note=yes" \ @@ -572,8 +575,7 @@ - "pass.out" \ - "$NOPIE_CFLAGS" \ - ] \ - [list \ +- [list \ "Run pr22842" \ "-pie -Wl,--no-as-needed tmpdir/pr22842.so" \ --- -2.25.0 + "-Wa,-mx86-used-note=yes" \ ++++++ binutils-skip-rpaths.patch ++++++ --- /var/tmp/diff_new_pack.ZmRrJL/_old 2020-05-16 04:57:21.423940589 +0200 +++ /var/tmp/diff_new_pack.ZmRrJL/_new 2020-05-16 04:57:21.423940589 +0200 @@ -1,26 +1,17 @@ -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 +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= 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 -+ldelf_is_contained (const char *path, const char *dc) ++gld${EMULATION_NAME}_is_contained (const char *path, const char *dc) +{ + while (*dc) + { @@ -44,19 +35,19 @@ + return 0; +} + - /* 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) + /* 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) { - const char *rpath; + char *rpath; asection *sinterp; bfd *abfd; struct bfd_link_hash_entry *ehdr_start = NULL; -@@ -1572,7 +1597,65 @@ ldelf_before_allocation (char *audit, char *depaudit, +@@ -1745,7 +1772,65 @@ gld${EMULATION_NAME}_before_allocation (void) by dynamic linking. */ rpath = command_line.rpath; if (rpath == NULL) @@ -88,8 +79,8 @@ + + while (*cr) + { -+ if (ldelf_is_contained (cr, dirs) -+ || ldelf_is_contained (cr, "$libpath_nl")) ++ if (gld${EMULATION_NAME}_is_contained (cr, dirs) ++ || gld${EMULATION_NAME}_is_contained (cr, "$libpath_nl")) + { + char *cc = cr, *cw = cr; + while (*cc && *cc != ':') ++++++ cross-avr-size.patch ++++++ --- /var/tmp/diff_new_pack.ZmRrJL/_old 2020-05-16 04:57:21.451940647 +0200 +++ /var/tmp/diff_new_pack.ZmRrJL/_new 2020-05-16 04:57:21.451940647 +0200 @@ -1,16 +1,53 @@ diff --git a/binutils/size.c b/binutils/size.c -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; +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; /* Program exit status. */ static int return_code = 0; @@ -257,17 +294,30 @@ static char *target = NULL; /* Forward declarations. */ -@@ -89,7 +330,8 @@ usage (FILE *stream, int status) +@@ -77,7 +337,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|-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\ +- -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\ + --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\ -@@ -113,6 +355,7 @@ usage (FILE *stream, int status) +@@ -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) #define OPTION_FORMAT (200) #define OPTION_RADIX (OPTION_FORMAT + 1) #define OPTION_TARGET (OPTION_RADIX + 1) @@ -275,7 +325,7 @@ static struct option long_options[] = { -@@ -120,6 +363,7 @@ static struct option long_options[] = +@@ -108,6 +366,7 @@ static struct option long_options[] = {"format", required_argument, 0, OPTION_FORMAT}, {"radix", required_argument, 0, OPTION_RADIX}, {"target", required_argument, 0, OPTION_TARGET}, @@ -283,26 +333,34 @@ {"totals", no_argument, &show_totals, 1}, {"version", no_argument, &show_version, 1}, {"help", no_argument, &show_help, 1}, -@@ -153,13 +397,17 @@ main (int argc, char **argv) +@@ -141,7 +400,7 @@ main (int argc, char **argv) fatal (_("fatal error: libbfd ABI mismatch")); set_default_bfd_target (); -- while ((c = getopt_long (argc, argv, "ABGHhVvdfotx", long_options, -+ while ((c = getopt_long (argc, argv, "ABCGHhVvdfotx", long_options, +- while ((c = getopt_long (argc, argv, "ABHhVvdfotx", long_options, ++ while ((c = getopt_long (argc, argv, "ABCHhVvdfotx", long_options, (int *) 0)) != EOF) switch (c) { - case OPTION_FORMAT: - switch (*optarg) +@@ -150,11 +409,15 @@ main (int argc, char **argv) { -+ case 'A': -+ case 'a': -+ selected_output_format = FORMAT_AVR; -+ break; case 'B': case 'b': - selected_output_format = FORMAT_BERKLEY; -@@ -178,6 +426,10 @@ main (int argc, char **argv) +- 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) } break; @@ -313,20 +371,37 @@ case OPTION_TARGET: target = optarg; break; -@@ -211,6 +463,9 @@ main (int argc, char **argv) - case 'B': - selected_output_format = FORMAT_BERKLEY; +@@ -190,11 +457,14 @@ main (int argc, char **argv) break; -+ case 'C': -+ selected_output_format = FORMAT_AVR; -+ break; - case 'G': - selected_output_format = FORMAT_GNU; + + case 'A': +- berkeley_format = 0; ++ format = format_sysv; + break; + case 'B': +- berkeley_format = 1; ++ format = format_bsd; break; -@@ -648,13 +903,115 @@ print_sysv_format (bfd *file) ++ 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) printf ("\n\n"); } ++ +static avr_device_t * +avr_find_device (void) +{ @@ -345,6 +420,8 @@ + return (NULL); +} + ++ ++ +static void +print_avr_format (bfd *file) +{ @@ -353,9 +430,9 @@ + int rammax = 0; + int eeprommax = 0; + asection *section; -+ datasize = 0; -+ textsize = 0; -+ bsssize = 0; ++ bfd_size_type datasize = 0; ++ bfd_size_type textsize = 0; ++ bfd_size_type bsssize = 0; + bfd_size_type bootloadersize = 0; + bfd_size_type noinitsize = 0; + bfd_size_type eepromsize = 0; @@ -370,17 +447,17 @@ + } + + if ((section = bfd_get_section_by_name (file, ".data")) != NULL) -+ datasize = bfd_section_size (section); ++ datasize = bfd_section_size (file, section); + if ((section = bfd_get_section_by_name (file, ".text")) != NULL) -+ textsize = bfd_section_size (section); ++ textsize = bfd_section_size (file, section); + if ((section = bfd_get_section_by_name (file, ".bss")) != NULL) -+ bsssize = bfd_section_size (section); ++ bsssize = bfd_section_size (file, section); + if ((section = bfd_get_section_by_name (file, ".bootloader")) != NULL) -+ bootloadersize = bfd_section_size (section); ++ bootloadersize = bfd_section_size (file, section); + if ((section = bfd_get_section_by_name (file, ".noinit")) != NULL) -+ noinitsize = bfd_section_size (section); ++ noinitsize = bfd_section_size (file, section); + if ((section = bfd_get_section_by_name (file, ".eeprom")) != NULL) -+ eepromsize = bfd_section_size (section); ++ eepromsize = bfd_section_size (file, section); + + bfd_size_type text = textsize + datasize + bootloadersize; + bfd_size_type data = datasize + bsssize + noinitsize; @@ -424,20 +501,19 @@ { if (show_common) calculate_common_size (file); -- if (selected_output_format == FORMAT_SYSV) -- print_sysv_format (file); +- if (berkeley_format) +- print_berkeley_format (file); - else -- print_berkeley_or_gnu_format (file); -+ switch (selected_output_format) +- print_sysv_format (file); ++ switch (format) + { -+ case FORMAT_SYSV: ++ case format_sysv: + print_sysv_format (file); + break; -+ case FORMAT_BERKLEY: -+ case FORMAT_GNU: -+ print_berkeley_or_gnu_format (file); ++ case format_bsd: ++ print_berkeley_format (file); + break; -+ case FORMAT_AVR: ++ case format_avr: + default: + print_avr_format (file); + break; ++++++ riscv-abi-check.patch ++++++ 2019-04-02 Jim Wilson <j...@sifive.com> PR 24389 * elfnn-riscv.c (_bfd_riscv_elf_merge_private_bfd_data): Move read of ELF header flags to after check for ELF object file. Loop through sections looking for code sections, if none, then skip ABI checks. diff --git a/bfd/elfnn-riscv.c b/bfd/elfnn-riscv.c index dba1025994f..964b6bdcbcc 100644 --- a/bfd/elfnn-riscv.c +++ b/bfd/elfnn-riscv.c @@ -3086,8 +3086,7 @@ static bfd_boolean _bfd_riscv_elf_merge_private_bfd_data (bfd *ibfd, struct bfd_link_info *info) { bfd *obfd = info->output_bfd; - flagword new_flags = elf_elfheader (ibfd)->e_flags; - flagword old_flags = elf_elfheader (obfd)->e_flags; + flagword new_flags, old_flags; if (!is_riscv_elf (ibfd) || !is_riscv_elf (obfd)) return TRUE; @@ -3107,6 +3106,9 @@ _bfd_riscv_elf_merge_private_bfd_data (bfd *ibfd, struct bfd_link_info *info) if (!riscv_merge_attributes (ibfd, info)) return FALSE; + new_flags = elf_elfheader (ibfd)->e_flags; + old_flags = elf_elfheader (obfd)->e_flags; + if (! elf_flags_init (obfd)) { elf_flags_init (obfd) = TRUE; @@ -3114,6 +3116,34 @@ _bfd_riscv_elf_merge_private_bfd_data (bfd *ibfd, struct bfd_link_info *info) return TRUE; } + /* Check to see if the input BFD actually contains any sections. If not, + its flags may not have been initialized either, but it cannot actually + cause any incompatibility. Do not short-circuit dynamic objects; their + section list may be emptied by elf_link_add_object_symbols. + + Also check to see if there are no code sections in the input. In this + case, there is no need to check for code specific flags. */ + if (!(ibfd->flags & DYNAMIC)) + { + bfd_boolean null_input_bfd = TRUE; + bfd_boolean only_data_sections = TRUE; + asection *sec; + + for (sec = ibfd->sections; sec != NULL; sec = sec->next) + { + if ((bfd_get_section_flags (ibfd, sec) + & (SEC_LOAD | SEC_CODE | SEC_HAS_CONTENTS)) + == (SEC_LOAD | SEC_CODE | SEC_HAS_CONTENTS)) + only_data_sections = FALSE; + + null_input_bfd = FALSE; + break; + } + + if (null_input_bfd || only_data_sections) + return TRUE; + } + /* Disallow linking different float ABIs. */ if ((old_flags ^ new_flags) & EF_RISCV_FLOAT_ABI) { -- 2.21.0 ++++++ rx-gas-padding-pr24464.patch ++++++ >From 5ce032bdfc60a8f44f6307b2297384c852100f95 Mon Sep 17 00:00:00 2001 From: Nick Clifton <ni...@redhat.com> Date: Fri, 19 Apr 2019 10:39:47 +0100 Subject: [PATCH] RX Assembler: Ensure that the internal limit on the number of relaxation iterations is not larger that the external limit. PR 24464 * config/tc-rx.h (md_relax_frag): Pass the max_iterations variable to the relaxation function. * config/tc-rx.c (rx_relax_frag): Add new parameter - the maximum number of iterations. Make sure that our internal iteration limit does not exceed this external iteration limit. --- gas/ChangeLog | 9 +++++++++ gas/config/tc-rx.c | 19 +++++++++++++------ gas/config/tc-rx.h | 11 +++++++++-- 3 files changed, 31 insertions(+), 8 deletions(-) diff --git a/gas/config/tc-rx.c b/gas/config/tc-rx.c index 8688837b31..6b19f2f397 100644 --- a/gas/config/tc-rx.c +++ b/gas/config/tc-rx.c @@ -740,8 +740,8 @@ typedef struct rx_bytesT int n_relax; int link_relax; fixS *link_relax_fixP; - char times_grown; - char times_shrank; + unsigned long times_grown; + unsigned long times_shrank; } rx_bytesT; static rx_bytesT rx_bytes; @@ -1558,7 +1558,7 @@ rx_next_opcode (fragS *fragP) fr_subtype to calculate the difference. */ int -rx_relax_frag (segT segment ATTRIBUTE_UNUSED, fragS * fragP, long stretch) +rx_relax_frag (segT segment ATTRIBUTE_UNUSED, fragS * fragP, long stretch, unsigned long max_iterations) { addressT addr0, sym_addr; addressT mypc; @@ -1755,9 +1755,16 @@ rx_relax_frag (segT segment ATTRIBUTE_UNUSED, fragS * fragP, long stretch) /* This prevents infinite loops in align-heavy sources. */ if (newsize < oldsize) { - if (fragP->tc_frag_data->times_shrank > 10 - && fragP->tc_frag_data->times_grown > 10) - newsize = oldsize; + /* Make sure that our iteration limit is no bigger than the one being + used inside write.c:relax_segment(). Otherwise we can end up + iterating for too long, and triggering a fatal error there. See + PR 24464 for more details. */ + unsigned long limit = max_iterations > 10 ? 10 : max_iterations; + + if (fragP->tc_frag_data->times_shrank > limit + && fragP->tc_frag_data->times_grown > limit) + newsize = oldsize; + if (fragP->tc_frag_data->times_shrank < 20) fragP->tc_frag_data->times_shrank ++; } diff --git a/gas/config/tc-rx.h b/gas/config/tc-rx.h index 09c50f9471..69302e565b 100644 --- a/gas/config/tc-rx.h +++ b/gas/config/tc-rx.h @@ -54,8 +54,15 @@ #define md_end rx_md_end extern void rx_md_end (void); -#define md_relax_frag rx_relax_frag -extern int rx_relax_frag (segT, fragS *, long); +/* Note - the definition of MD_RELAX_FRAG here includes a reference to the + MAX_ITERATIONS variable which is defined locally in write.c:relax_segment() + but which is not normally passed to target specific relaxing code. This + reference is needed however as the number of iterations of the RX relaxing + code needs to be constrained by the maximum number of iterations allowed + by relax_segment(). See PR 24464 for more details. */ +#define md_relax_frag(SEG, FRAGP, STRETCH) \ + rx_relax_frag ((SEG), (FRAGP), (STRETCH), max_iterations) +extern int rx_relax_frag (segT, fragS *, long, unsigned long); #define TC_FRAG_TYPE struct rx_bytesT * #define TC_FRAG_INIT rx_frag_init -- 2.21.0