diff -Nru binutils-2.38/debian/changelog binutils-2.38/debian/changelog --- binutils-2.38/debian/changelog 2022-02-18 05:05:30.000000000 +0000 +++ binutils-2.38/debian/changelog 2022-03-12 05:55:17.000000000 +0000 @@ -1,3 +1,18 @@ +binutils (2.38-3ubuntu1) jammy; urgency=medium + + * Merge with Debian; remaining changes: + - Build from upstream sources. + + -- Matthias Klose Sat, 12 Mar 2022 06:55:17 +0100 + +binutils (2.38-3) unstable; urgency=medium + + * Update from the binutils 2.38 branch: + - Revert "Check thin archive element file size against archive header". + - binutils 2.38 vs. ppc32 linux kernel: Weaken .machine again. + + -- Matthias Klose Sat, 12 Mar 2022 06:40:23 +0100 + binutils (2.38-2ubuntu1) jammy; urgency=medium * Merge with Debian; remaining changes: diff -Nru binutils-2.38/debian/patches/branch-updates.diff binutils-2.38/debian/patches/branch-updates.diff --- binutils-2.38/debian/patches/branch-updates.diff 2022-02-18 05:05:30.000000000 +0000 +++ binutils-2.38/debian/patches/branch-updates.diff 2022-03-12 05:55:17.000000000 +0000 @@ -1,6 +1,6 @@ # DP: updates from the binutils-2.38 branch -# git diff 20756b0fbe065a84710aa38f2457563b57546440 481876f834e0a100950dde6b878daa38c896b325 +# git diff 20756b0fbe065a84710aa38f2457563b57546440 080b8ee0adb7393c0598ecf92377d25057b1eadc diff --git a/bfd/ChangeLog b/bfd/ChangeLog index 36cb81dd7f3..4671dc30cf0 100644 @@ -19,6 +19,29 @@ 2022-02-09 Nick Clifton 2.38 release. +diff --git a/bfd/archive.c b/bfd/archive.c +index ffaec7e2231..9ad61adc615 100644 +--- a/bfd/archive.c ++++ b/bfd/archive.c +@@ -717,17 +717,7 @@ _bfd_get_elt_at_filepos (bfd *archive, file_ptr filepos, + open the external file as a bfd. */ + bfd_set_error (bfd_error_no_error); + n_bfd = open_nested_file (filename, archive); +- if (n_bfd != NULL) +- { +- ufile_ptr size = bfd_get_size (n_bfd); +- if (size != 0 && size != new_areldata->parsed_size) +- { +- bfd_set_error (bfd_error_malformed_archive); +- bfd_close (n_bfd); +- n_bfd = NULL; +- } +- } +- else ++ if (n_bfd == NULL) + { + switch (bfd_get_error ()) + { diff --git a/bfd/development.sh b/bfd/development.sh index cd64202661b..6d29dc26161 100644 --- a/bfd/development.sh @@ -8497,7 +8520,7 @@ #~ msgstr "%P: %B: непозната врста премештања „%d“ за „%T“\n" diff --git a/bfd/version.h b/bfd/version.h -index 61221a65c3b..e394595a6f6 100644 +index 61221a65c3b..a78872f6d9a 100644 --- a/bfd/version.h +++ b/bfd/version.h @@ -16,7 +16,7 @@ @@ -8505,7 +8528,7 @@ In releases, the date is not included in either version strings or sonames. */ -#define BFD_VERSION_DATE 20220209 -+#define BFD_VERSION_DATE 20220218 ++#define BFD_VERSION_DATE 20220312 #define BFD_VERSION @bfd_version@ #define BFD_VERSION_STRING @bfd_version_package@ @bfd_version_string@ #define REPORT_BUGS_TO @report_bugs_to@ @@ -8516,6 +8539,42 @@ @@ -1 +1 @@ -m4_define([BFD_VERSION], [2.38]) +m4_define([BFD_VERSION], [2.38.0]) +diff --git a/gas/config/tc-ppc.c b/gas/config/tc-ppc.c +index 054f9c72161..89bc7d3f9b9 100644 +--- a/gas/config/tc-ppc.c ++++ b/gas/config/tc-ppc.c +@@ -5965,7 +5965,30 @@ ppc_machine (int ignore ATTRIBUTE_UNUSED) + options do not count as a new machine, instead they add + to currently selected opcodes. */ + ppc_cpu_t machine_sticky = 0; +- new_cpu = ppc_parse_cpu (ppc_cpu, &machine_sticky, cpu_string); ++ /* Unfortunately, some versions of gcc emit a .machine ++ directive very near the start of the compiler's assembly ++ output file. This is bad because it overrides user -Wa ++ cpu selection. Worse, there are versions of gcc that ++ emit the *wrong* cpu, not even respecting the -mcpu given ++ to gcc. See gcc pr101393. And to compound the problem, ++ as of 20220222 gcc doesn't pass the correct cpu option to ++ gas on the command line. See gcc pr59828. Hack around ++ this by keeping sticky options for an early .machine. */ ++ asection *sec; ++ for (sec = stdoutput->sections; sec != NULL; sec = sec->next) ++ { ++ segment_info_type *info = seg_info (sec); ++ /* Are the frags for this section perturbed from their ++ initial state? Even .align will count here. */ ++ if (info != NULL ++ && (info->frchainP->frch_root != info->frchainP->frch_last ++ || info->frchainP->frch_root->fr_type != rs_fill ++ || info->frchainP->frch_root->fr_fix != 0)) ++ break; ++ } ++ new_cpu = ppc_parse_cpu (ppc_cpu, ++ sec == NULL ? &sticky : &machine_sticky, ++ cpu_string); + if (new_cpu != 0) + ppc_cpu = new_cpu; + else diff --git a/gold/ChangeLog b/gold/ChangeLog index 7edad5d2b97..b16a6c23944 100644 --- a/gold/ChangeLog