Commit Graph

314 Commits

Author SHA1 Message Date
Deepesh Varatharajan
9786fca4f6 binutils: Fix CVE-2025-1178
Prevent an abort in the bfd linker when attempting to
generate dynamic relocs for a corrupt input file.

PR 32638

Backport a patch from upstream to fix CVE-2025-1178
Upstream-Status: Backport from [https://sourceware.org/git/?p=binutils-gdb.git;a=patch;h=75086e9de1707281172cc77f178e7949a4414ed0]

(From OE-Core rev: f58f174daa7e30baa18abe4db9eda9c1b1c425cc)

Signed-off-by: Deepesh Varatharajan <Deepesh.Varatharajan@windriver.com>
Signed-off-by: Mathieu Dubois-Briand <mathieu.dubois-briand@bootlin.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2025-05-22 14:36:49 +01:00
Peter Marko
ebf9d387cc binutils: mark CVE-2025-1153 as fixed
We had this CVE patched but the patch was removed with last 2.44 branch
updates as it is now included.
Since there is no new version which could be set in NVD DB, this needs
to be explicitly handled.

(From OE-Core rev: 32f18145dee54f61203506daef339cd132908287)

Signed-off-by: Peter Marko <peter.marko@siemens.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2025-05-05 17:22:11 +01:00
Peter Marko
1b5d6bb30d binutils: drop obsolete CVE_STATUS
NVD has CVE-2023-25584 listed as < 2.40, so we don't need to ignore it
for version 2.44 anymore.

(From OE-Core rev: eaf80096f96e5bebed53076c1dfe7e35e539f383)

Signed-off-by: Peter Marko <peter.marko@siemens.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2025-05-05 17:22:11 +01:00
Khem Raj
15e88b968e binutils: Specify sysroot for libtool during build
libbfd is enabled and it invokes libtool relink step to get rid of
rpaths during install step. libtool 2.4 patches rightly prepend
lt_sysroot to target libdir which relink step would use, such a patch
is also upstreamed into libtool [1]

However, when we do not specify --with-libtool-sysroot, lt_sysoot prefix
turns out to be empty and relink step adds -L/usr/lib to linker command
line. it cause all sort of problems e.g. when the build host has zlib
installed then libbfd tries to link with /usr/lib/libz.so instead of the
one in target sysroot, fortunately OE linker reports host path contamination
and fails the build. Second problem seen when building target binutils on
musl, it links with libc.so correctly but libtool relink step resolves
libc.so in /usr/lib due to this path and expands it into libc.so.6 and
ld-linux-x86-64.so.2 ( glibc host's libc.so is a linker stub ) in
DT_NEEDED ELF section which does not work with
musl linker and build QA detects this anamoly as well.

ERROR: binutils-2.44-r0 do_package_qa: QA Issue: /usr/lib/libbfd-2.44.so contained in package libbfd requires libc.so.6(GLIBC_2.34)(64bit), but no providers found in RDEPENDS:libbfd? [file-rdeps]

This inconsistency may cause produced binaries mistakenly linked against
libraries from the host distro.

Add libtool sysroot to point libtool to correct sysroot location during
build.

[1] https://git.savannah.gnu.org/cgit/libtool.git/commit/?id=3221f9f0fb98d5740ab5d0e8db6a731302520644

(From OE-Core rev: 89e984bd7edb9a2013b65d0215fd6af9aadd59e8)

Signed-off-by: Khem Raj <raj.khem@gmail.com>
Signed-off-by: Mathieu Dubois-Briand <mathieu.dubois-briand@bootlin.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2025-05-01 14:22:54 +01:00
Deepesh Varatharajan
0ee82d7740 binutils: stable 2.44 branch updates
Below commits on binutils-2.44 stable branch are updated.

fe459e33c67 PR 32603, revert message changes in 0b7f992b78fe and 31e9e2e8d109
37d12dd25d8 gdb/compile: add missing entry in bfd_link_callbacks array
31e9e2e8d10 PR 32603, more ld -w misbehaviour
0b7f992b78f PR 32603, ld -w misbehaviour
8cb98edf123 s390: Add support for z17 as CPU name
ed70d86b491 x86: Remove AVX10.2 256 bit rounding support
e1af7e590a5 elf: Clear the SEC_ALLOC bit for NOLOAD note sections
35db8c6dd2f ld: Pass -Wl,-z,lazy to compiler for i386 lazy binding tests
cc7ec316a45 Updated translations for bfd and gold
bf088ee09a7 PR 32731 ub sanitizer accessing filenames_reversed
78082591ec7 score-elf gas SEGV
d4c7ee9fbc1 gas: fix rs_fill_nop listing
a68d096a0ab Open the 2.44 branch for further development

Dropped: 0015-CVE-2025-1153.patch

Testing was done and there were no regressions found

(From OE-Core rev: 749bdd5bda6f9b5af8d63794858bbb9834294fcb)

Signed-off-by: Deepesh Varatharajan <Deepesh.Varatharajan@windriver.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2025-05-01 14:22:53 +01:00
Peter Marko
5f26d71861 binutils: patch CVE-2025-1153
Pick patch [1] mentioned in NVD report [2]

[1] https://sourceware.org/git/gitweb.cgi?p=binutils-gdb.git;h=8d97c1a53f3dc9fd8e1ccdb039b8a33d50133150
[2] https://nvd.nist.gov/vuln/detail/CVE-2025-1153

(From OE-Core rev: bc3c169d78dac9d2e83c533056b8bec8dbdab3f7)

Signed-off-by: Peter Marko <peter.marko@siemens.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2025-03-17 17:09:22 +00:00
Richard Purdie
89ce67d8e4 recipes: Drop ld-is-gold support
Gold hasn't seen development in some time and is being dropped from binutils
releases. Drop the small number of special cases for it we were carrying.

This patch also turns off gold in the binutils recipe.

(From OE-Core rev: a4addb9ab63011e7c604fc5daff95559e7d214e7)

Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2025-02-10 13:03:57 +00:00
Khem Raj
7c65f1da17 binutils: Upgrade to 2.44 release
* Drop the CVE-2024-53589 patch, its included in 2.44
* Package newly rename gp-* to gprofng-* binaries and remove old gp-*
  symlinks

* Gold linker is now deprecated and will be removed in future release
  its already deleted in tarball releases

* Support for the Nios II target has been removed.

* Assembler:
    - Support for new architecture extensions for AArch64, Risc-V and
      x86.

* Linker:
      The default maximum page size was changed from 16KiB to 64KiB for
      LoongArch.

      This now supports mixed LTO and non-LTO object files in
      relocatable output.

      The ELF forms of the linker support a --image-base=<ADDR> option
      for compatibility with LLD.

      The --build-id= option now accepts an argument of "xx" which
      enables the use of the xxhash library.  This produces a 128-bit
      hash and is 2-4x faster than md5 or sha1.

      The ELF linker option --package-metadata supports percent-encoded
      and %[string] encoded JSON payloads.

* Disassembler:
      The RISC-V disassembler now supports -M,max option like QEMU to
      dump instruction without checking architecture support as usual.

* GprofNG:
      Support added for hardware event counters for Neoverse-N1,
      Ampere-1, and Appliedmicro processors.

Detailed release notes [1]

[1] https://lists.gnu.org/archive/html/info-gnu/2025-02/msg00001.html

(From OE-Core rev: df3c43e69542939a4bec3893f1e927edf2ad7179)

Signed-off-by: Khem Raj <raj.khem@gmail.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2025-02-05 12:49:56 +00:00
Richard Purdie
c2da016918 meta/meta-selftest: Fix variable assignment whitespace
Recipes are much more readable with whitespace around the assignment operators.
Fix various assignments in OE-Core to show this is definitely the preferred
formatting.

(From OE-Core rev: 30ea609d3357fb3de911f2f6a5e6856c151b976a)

Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2025-02-01 13:42:34 +00:00
Richard Purdie
6b1e65b7d6 base: Switch virtual/cross-XXX to be under recipe specific providers
Currently, providers are set on a global config basis. This change allows
for a select set of providers to be configured using BB_RECIPE_VIRTUAL_PROVIDERS
on a per recipe basis. This would allow for the selection of virtual/cross-cc
as gcc or clang for example.

The PROVIDERS are removed from the recipes so that if a version of the
dependency accidentally slips through, the build will fail and the user
can correct the issue.

(From OE-Core rev: 6eeab1a5d7f23917b94c130e417d59afb757b546)

Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2025-01-21 23:09:34 +00:00
Richard Purdie
90e0a0f7f4 classes/recipes: Switch virtual/XXX-gcc to virtual/cross-cc (and c++/binutils)
The idea of the base class dependency is to say "yes, I need a C cross compiler"
and this was never meant to be gcc specific. Looking at the codebase, whilst we
code triplets into this, it does overcomplicate things as there are only ever
limited, "target", "sdk" and the class extended versions like mutlilib.

After much thought, we can simplify this to virtual/cross-cc and virtual/nativesdk-cross-cc.

This lets us remove the "gcc" specific element as well as removing the over
complicated triplet usage.

At the same time, change the much less widely used "g++" variant to "c++" for
similar reasons and remove the triplet from virtual/XXX-binutils too.

Backwards compatibility mappings could be left but are just going to confuse
things in future so we'll just require users to update.

This simplification, whilst disruptive for any toolchain focused layers, will
make improved toolchain selection in the future much easier.

Since we no longer have overlapping variables, some code for that can just
be removed. The class extension code does need to start remapping some variables
but not the crosssdk target recipe names.

This patch is in two pieces, this one handles the renaming with the functional
changes separate in a second for easier review even if this breaks bisection.

(From OE-Core rev: 4ccc3bc8266c327bcc18c9a3faf7536210dfb9f0)

Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2025-01-21 23:09:33 +00:00
Yash Shinde
dd6c679a16 binutils: Fix CVE-2024-53589
A buffer overflow vulnerability exists in GNU Binutils’ objdump utility
when processing tekhex format files. The vulnerability occurs in the
Binary File Descriptor (BFD) library’s tekhex parser during format identification.
Specifically, the issue manifests when attempting to read 8 bytes at an address
that precedes the global variable ‘_bfd_std_section’, resulting in an out-of-bounds read.

Backport a patch from upstream to fix CVE-2024-53589.
Upstream-Status: Backport [https://sourceware.org/git/?p=binutils-gdb.git;a=commitdiff;h=e0323071916878e0634a6e24d8250e4faff67e88]

(From OE-Core rev: 7c9a9020d1e9204ba875ac10b20ab7ccabce82bc)

Signed-off-by: Yash Shinde <Yash.Shinde@windriver.com>
Signed-off-by: Mathieu Dubois-Briand <mathieu.dubois-briand@bootlin.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2024-12-13 12:26:01 +00:00
Deepthi Hemraj
9d739fd042 binutils: stable 2.43.1 branch update
Below commit on binutils-2.43.1 stable branch are updated.
b82e2250574 Automatic date update in version.in
280374309b1 PR32300, --dependency-file: link dependencies are not all collected
263e116833e s390: Add arch15 instructions
645da6d426e s390: Relax risbg[n]z, risb{h|l}gz, {rns|ros|rxs}bgt operand constraints
7f7047a9c6c s390: Simplify (dis)assembly of insn operands with const bits
e7592364504 s390: Align opcodes to lower-case
d6ab1d2efdc s390: Document syntax to omit base register operand
c40337b1784 LoongArch: Add elfNN_loongarch_mkobject to initialize LoongArch tdata
95ed7cf1be2 segv in bfd_elf_get_str_section
0a71d78f6a6 ld: Don't explicitly add .note.gnu.build-id in elf.sc
ad2ce1e6457 x86: Turn PLT32 to PC32 only for PC-relative relocations
238493e7f09 x86-64: Disable PIE on PR gas/32189 test
68d5dbd315d x86-64: Never make R_X86_64_GOT64 section relative
d77d08180d1 x86/APX: Don't promote AVX/AVX2 instructions out of APX spec
f307db3d8b7 bfd: Pass true to ld_plugin_object_p
cd3e2b58f2c PR32109, aborting at bfd/bfd.c:1236 in int _bfd_doprnt
2d37b890e56 lto: Add a test for PR ld/32083
d16a1893c44 ld: Add an LTO test for common symbol override
e4cfe6dab3e Re-enable development changes on the 2_43 branch

Testing was done and there were no regressions found

(From OE-Core rev: 4950a2d67a85b3f4a643a46fdc54d348abce5ed6)

Signed-off-by: Deepthi Hemraj <Deepthi.Hemraj@windriver.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2024-11-14 11:56:53 +00:00
Richard Purdie
33191e29f0 binutils: Fix binutils mingw packaging
Use SOLIBSDEV in FILES to fix nativesdk-binutils packaging on mingw
builds.

(From OE-Core rev: cba58ab2f380252f231fc78944499ade65e32223)

Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2024-09-20 15:59:03 +01:00
Harish Sadineni
a827c8133b binutils: Add missing perl modules to RDEPENDS for nativsdk variant
In SDK, missing perl modules causes 'x86_64-pokysdk-linux-gp-display-html --help' to abort with below errors..
  - Can't locate bignum.pm in @INC (you may need to install the feature module).
  - Can't locate Math/BigInt.pm in @INC (you may need to install the Math::BigInt module)

By adding the following perl modules to RDEPENDS fixes the above errors:
  nativesdk-perl-module-bignum
  nativesdk-perl-module-bigint
  nativesdk-perl-module-math-bigint

(From OE-Core rev: 05f1099acbbb10b6ce33ea117d313749f7dc4a47)

Signed-off-by: Harish Sadineni <Harish.Sadineni@windriver.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2024-09-20 15:59:03 +01:00
Wang Mingyu
0a1aaa0744 binutils: upgrade 2.43 -> 2.43.1
(From OE-Core rev: e6de2ce7a2e5e0b28288a17282268c9c896f64ba)

Signed-off-by: Wang Mingyu <wangmy@fujitsu.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2024-08-21 21:51:49 +01:00
Khem Raj
d7a38848f0 binutils: Fix comment about major version
Reword so that it does not have to be updated with
every new major release of binutils

(From OE-Core rev: 679a12c21407ce32d0835e0fec6e5099f227b30b)

Signed-off-by: Khem Raj <raj.khem@gmail.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2024-08-06 11:27:25 +01:00
Khem Raj
b35f220988 binutils: Upgrade to 2.43 release
Detailed changelog [1]

[1] https://sourceware.org/pipermail/binutils/2024-January/132213.html

(From OE-Core rev: 7e7afecc532a451b0ca9f34195a287c6472063c0)

Signed-off-by: Khem Raj <raj.khem@gmail.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2024-08-06 11:27:25 +01:00
Deepthi Hemraj
1824704054 binutils: stable 2.42 branch updates
Below commits on binutils-2.42 stable branch are updated.
29ae8b8ea71 x86-64: Skip -z mark-plt tests on MUSL
92cc764e58f hppa: Fix handling of relocations that apply to data
c439c1e1f56 elf: Add glibc version dependency only if needed
68ae8e2a849 ld: pass -g for ld-elf tests
a1e3cb45c67 aarch64: Enable +cssc for armv8.9-a

(From OE-Core rev: f857a88f7b3c3e50d0c3135bc461beae8ebf5e5c)

Signed-off-by: Deepthi Hemraj <Deepthi.Hemraj@windriver.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2024-07-23 11:17:11 +01:00
Joshua Watt
d077134b0a binutils-cross-testsuite: Rename to binutils-testsuite
This recipe needs to be renamed because the "-cross-" substring in the
name triggers the cross architecture detection in sstate, but this
recipe is not actually a cross recipe.

(From OE-Core rev: 812c114a8a872ad59b19c7ffb8c1f230fc64c823)

Signed-off-by: Joshua Watt <JPEWhacker@gmail.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2024-06-27 13:03:34 +01:00
Sundeep KOKKONDA
d4d0720233 binutils: stable 2.42 branch updates
Below commits on binutils-2.42 stable branch are updated.

6c360d37662 PR31898 bug in processing DW_RLE_startx_endx
bfda03eed33 aarch64: Remove asserts from operand qualifier decoders

Dropped: 0016-aarch64-Remove-asserts-from-operand-qualifier-decode.patch

(From OE-Core rev: e48310aa787f7b710da31023c18c116e5432e378)

Signed-off-by: Sundeep KOKKONDA <sundeep.kokkonda@windriver.com>
Signed-off-by: Alexandre Belloni <alexandre.belloni@bootlin.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2024-06-25 11:50:58 +01:00
Mark Hatle
293cb9b25b binutils: Fix aarch64 disassembly abort
Code backported from binutils development tree.

  aarch64: Remove asserts from operand qualifier decoders [PR31595]

  Given that the disassembler should never abort when decoding
  (potentially random) data, assertion statements in the
  `get_*reg_qualifier_from_value' function family prove problematic.

  ...

(From OE-Core rev: 00f3d8495a1d8fe44336b53c5a9d9a5f8a8d5664)

Signed-off-by: Mark Hatle <mark.hatle@amd.com>
Signed-off-by: Alexandre Belloni <alexandre.belloni@bootlin.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2024-05-30 09:04:14 +01:00
Sundeep KOKKONDA
e3dfeabee3 binutils: stable 2.42 branch updates.
Below commits on binutils-2.42 stable branch are updated.
6224493e457 Re: PR26978, Inconsistency for strong foo@v1 and weak foo@@v1
d125f967537 hppa: Implement PA 2.0 symbolic relocations for long displacements
884fb5373a1 x86/APX: Remove KEYLOCKER and SHA promotions from EVEX MAP4
d816fda3cbd aarch64: Remove B16B16, SVE2p1 and SME2p1
cb11047e34a Re: Move bfd_init to bfd.c
818bcf40efb print cached error messages using _bfd_error_handler
831be495ef1 aarch64: Fix the 2nd operand in gcsstr and gcssttr instructions.

(From OE-Core rev: 09ffa1dc5311e4d8a6765f50045999e34131ca9f)

Signed-off-by: Sundeep KOKKONDA <sundeep.kokkonda@windriver.com>
Signed-off-by: Alexandre Belloni <alexandre.belloni@bootlin.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2024-05-28 09:38:23 +01:00
Ola x Nilsson
25adb31d37 binutils: Remove conflict markers from 0008-Use-libtool-2.4.patch
The diff hunks were not doing anything important, just remove them.

(From OE-Core rev: 06003911df37d41b6d04946571a9c1fbe41a6414)

Signed-off-by: Ola x Nilsson <olani@axis.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2024-04-25 10:06:03 +01:00
Harish Sadineni
5a433a80f3 binutils: gprofng - change use of bignum to use of bignint
In SDK, The "x86_64-pokysdk-linux-gp-display-html" fails with below error while genearting profiling html reports from test experiment file (eg., test.1.er)
Error: Undefined subroutine &bigint::hex called at .../sysroots/x86_64-pokysdk-linux/usr/bin/x86_64-pokysdk-linux-gp-display-html line 4059, <MAP_XML> line 1.

Upstream-Status: Backport [https://sourceware.org/git/?p=binutils-gdb.git;a=commit;h=3243d790ee32aa8eda69226d81b1e79dbd1dcd87]

(From OE-Core rev: b1f08a3d6a5e91619fb448e067a3d542eb130fcc)

Signed-off-by: Harish Sadineni <Harish.Sadineni@windriver.com>
Signed-off-by: Alexandre Belloni <alexandre.belloni@bootlin.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2024-04-04 14:05:03 +01:00
Simone Weiß
2bcd651a08 meta: Update CVE_STATUS for incorrect cpes
Set CVE_STATUS as none of the issues apply against the versions
used in the recipes.

(From OE-Core rev: cea8c8bf73e84133f566d1c2ca0637494f2d7afe)

Signed-off-by: Simone Weiß <simone.p.weiss@posteo.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2024-02-24 16:10:23 +00:00
Khem Raj
53dd45d573 binutils: Update to tip of 2.42 release branch
Brings following fixes.

* 553c7f61b74 x86: Display -msse-check= default as none
* 4f7d1d2d5ec PowerPC: Add support for Power11 options
* 3c1f1c35784 x86-64: Add R_X86_64_CODE_6_GOTTPOFF
* c426c8e307a x86/APX: VROUND{P,S}{S,D} encodings require AVX512{F,VL}
* 78f9e9faaa4 PR31208, strip can break ELF alignment requirements
* e19278f72bd PR 31283 windmc: Parse input correctly on big endian hosts
* b76b8983116 Link x86-64 mark-plt-1.so with --no-as-needed
* e92e2d654bf LoongArch: gas: Fix the types of symbols referred with %le_*_r in the symtab

(From OE-Core rev: 1e24197070abbeabfca1883975b9996f29898745)

Signed-off-by: Khem Raj <raj.khem@gmail.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2024-02-17 18:19:19 +00:00
Khem Raj
b0e5542e7a binutils: Upgrade to binutils 2.42
Release Notes are here [1]

[1] https://sourceware.org/pipermail/binutils/2024-January/132213.html

(From OE-Core rev: 795af50ed4005c097069a65f67eb604da9f41b92)

Signed-off-by: Khem Raj <raj.khem@gmail.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2024-02-05 14:06:10 +00:00
Sundeep KOKKONDA
a4ddc1415b binutils: stable 2.41 branch updates
Below commits on binutils-2.41 stable branch are updated.
eb49941e7e1 Gold/MIPS: Add targ_extra_size=64 for mips32 triples
c27eff41737 Gold/MIPS: Use EM_MIPS instead of EM_MIPS_RS3_LE for little endian
7fe76f02413 x86-64: fix suffix-less PUSH of symbol address

(From OE-Core rev: 580119844fd93eb7bbc778722a6117a31b7c1591)

Signed-off-by: Sundeep KOKKONDA <sundeep.kokkonda@windriver.com>
Signed-off-by: Alexandre Belloni <alexandre.belloni@bootlin.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2023-11-30 08:43:04 +00:00
Richard Purdie
1872cc9d50 Revert "binutils: Fix CVE-2022-47007"
This reverts commit 3f335913bbbabf48db1749d197c3bfaac9fb7236.

This CVE shouldn't affect master, it is for binutils versions 2.34
thru 2.38, while master is 2.41

See: https://nvd.nist.gov/vuln/detail/CVE-2022-47007

Later in commit:

https://sourceware.org/git/?p=binutils-gdb.git;a=commitdiff;h=19cacf672930cee20feaf1f3468e3d5ac3099ffd

elements of the CVE fix are reverted deliberately so match upstream for this
and drop this 'fix'.

Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2023-11-23 14:59:06 +00:00
Deepthi Hemraj
b7f0164393 binutils: Fix CVE-2022-47007
(From OE-Core rev: 3f335913bbbabf48db1749d197c3bfaac9fb7236)

Signed-off-by: Deepthi Hemraj <Deepthi.Hemraj@windriver.com>
Signed-off-by: Alexandre Belloni <alexandre.belloni@bootlin.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2023-11-23 12:46:42 +00:00
Deepthi Hemraj
dc25b151ab binutils: stable 2.41 branch updates.
Below commits on binutils-2.41 stable branch are updated.
cb4c3555ac4 (HEAD -> binutils-2_41-branch, origin/binutils-2_41-branch) Automatic date update in version.in
6ffa5a420a0 aarch64: Remove unused function
b6f6a3ecd15 x86: restrict prefix use with .insn VEX/XOP/EVEX
60834ae1eb7 PR30794, PowerPC gold: internal error in add_output_section_to_load
951a6945b44 Updated Russian translation for the bfd directory
226f2e6b924 PR30724, cygwin ld performance regression since 014a602b86
8c05bf16a51 PR30697, ppc32 mix of local-dynamic and global-dynamic TLS
31b78cc9917 gas: rework timestamp preservation on doc/asconfig.texi

(From OE-Core rev: 0472fbbe24a3260399acc57cfae1f6d3e69ab756)

Signed-off-by: Deepthi Hemraj <Deepthi.Hemraj@windriver.com>
Signed-off-by: Alexandre Belloni <alexandre.belloni@bootlin.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2023-09-28 12:37:47 +01:00
Richard Purdie
33fec625ad binutils: Add missing DEPENDS on pod2man
Otherwise this can be used from the host leading to output determinism issues
where the output may have zero length files for man pages without it.

Limit it to target only since we don't need this for native/cross.

(From OE-Core rev: 77f615fd49efe4b38db030c602eff709e3bc0f14)

Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2023-08-22 15:13:54 +01:00
Richard Purdie
8fff33d541 binutils-cross-testsuite: Pass TUNE_LDARGS to tests
In some cases we need to pass the linker arguments to the linker, particularly when
the default in LD differs to that which gcc and our compiler flags are using (mips
defaults to 32 bit). Ensure these are passed in.

(From OE-Core rev: 0243af31f404f0b9187cebef192e626e290ead49)

Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2023-08-15 08:15:25 +01:00
Khem Raj
b5840b5636 binutils: Upgrade to 2.41 release
Fix build on 32bit arches with 64bit off_t defaults

Detailed changes [1]

[1] https://sourceware.org/pipermail/binutils/2023-July/128719.html

(From OE-Core rev: c19fd803220f5b701dee077f7e7bfbb5ba2f22e3)

Signed-off-by: Khem Raj <raj.khem@gmail.com>
Signed-off-by: Alexandre Belloni <alexandre.belloni@bootlin.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2023-08-04 11:44:28 +01:00
Denys Dmytriyenko
eee8bb497f binutils: move packaging of gprofng static lib into common .inc
Commit f72fd51e0d (binutils: package static libs from gprofng) added
corresponding FILES:${PN}-staticdev entry to the main .bb recipe.
But binutils-cross-canadian fails with exactly the same QA issue,
hence move FILES:${PN}-staticdev to the common shared .inc file.

(From OE-Core rev: 75beddd33e132333c36ad067e2cf90edffeb5bf5)

Signed-off-by: Denys Dmytriyenko <denys@konsulko.com>
Signed-off-by: Denys Dmytriyenko <denis@denix.org>
Signed-off-by: Alexandre Belloni <alexandre.belloni@bootlin.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2023-06-13 22:10:32 +01:00
Ross Burton
5131819228 binutils: fix CVE-2023-1972
Backport a patch from upstream to fix CVE-2023-1972.

(From OE-Core rev: 10d63933e3a30bfac2f6cec896460c22e04baadd)

Signed-off-by: Ross Burton <ross.burton@arm.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2023-06-06 07:41:42 +01:00
Martin Jansa
541754ae37 binutils: package static libs from gprofng
* fixes:
  ERROR: binutils-2.40-r0 do_package: QA Issue: binutils: Files/directories were installed but not shipped in any package:
    /usr/lib/gprofng/libgp-collectorAPI.a
  Please set FILES such that these items are packaged. Alternatively if they are unneeded, avoid installing them or delete them within do_install.
  binutils: 1 installed and not shipped files. [installed-vs-shipped]

(From OE-Core rev: ab6ae4b715143364288ba164f8ab5c3cd7f486ae)

(From OE-Core rev: f72fd51e0da100e7ed90992225688bf43e2a69b6)

Signed-off-by: Martin Jansa <Martin.Jansa@gmail.com>
Signed-off-by: Khem Raj <raj.khem@gmail.com>
Signed-off-by: Alexandre Belloni <alexandre.belloni@bootlin.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2023-05-25 10:29:08 +01:00
Deepthi Hemraj
d880b69f02 binutils: stable 2.40 branch updates
- Rebase existing patches
- Drop 0014-configure-remove-dependencies-on-gmp-and-mpfr-when-g.patch
  which is already in
- Correct packaging path to libgprofng.so
- Below commits on binutils-2.40 stable branch are updated.

4671be001eb Updated Hungarian translation for the gprof directory
ded035f913e lto: Don't add indirect symbols for versioned aliases in IR
74cb2ddeabc gas: arm: Change warning message to not reference specific A-class architecture revision
570b9c09bbf gas: arm: Fix a further IT-predicated vcvt issue in the presense of MVE vcvtn
bddd62e188c libctf: get the offsets of fields of unnamed structs/unions right
7aa47eafcce libctf: fix assertion failure with no system qsort_r
165accf0752 coff_get_normalized_symtab bfd_release
af35798e957 PR30217, dynamic relocations using local dynamic symbols
18bb604f1e1 PR30198, Assertion and segfault when linking x86_64 elf and coff
34a2b4a0e21 PR30155, ld segfault in _bfd_nearby_section
3d0046f39aa PR30046, power cmpi leads to unknown architecture
5c87fb1d59b ppc32 and "LOAD segment with RWX permissions"
11f5c1ebf14 Updated Serbian translations for gold, gprof and opcodes sub-directories
38e455b1d9a Updated translations for the bfd and gprof directories.
b2bc62b7b4e gas: correct symbol name comparison in .startof./.sizeof. handling
17294931e3e configure: remove dependencies on gmp and mpfr when gdb is disabled
1fc096a4c59 Regen config files
e1815414077 Pass $JANSSON_LIBS and $ZSTD_LIBS to ld-bootstrap/bootrap.exp
3e888977f16 bpf: fix error conversion from long unsigned int to unsigned int [-Werror=overflow]
65dbb942145 Updated Swedish translation for the binutils sub-directory
27f59ec47a1 RISC-V: make C-extension JAL available again for (32-bit) assembly
edd36b26f35 gprofng: PR30043 libgprofng.so.* are installed to a wrong location
c6e269febbc gprofng: PR29521 [docs] man pages are not in the release tarball
bcea253f5fa toplevel: Makefile.def: add install-strip dependency on libsframe

(From OE-Core rev: 5d7389770af6613af4ca8a2d30cc79d494a91075)

(From OE-Core rev: dcaf5192599b9474901ab73b66c330a401623fc1)

Signed-off-by: Deepthi Hemraj <Deepthi.Hemraj@windriver.com>
Signed-off-by: Khem Raj <raj.khem@gmail.com>
Signed-off-by: Alexandre Belloni <alexandre.belloni@bootlin.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2023-05-25 10:29:08 +01:00
Alexander Kanavin
c88ce1ff0e binutils: backport a patch to address failures when time64.inc is in use
(From OE-Core rev: e80a836be72d304aa2f47421882390263623b6fc)

Signed-off-by: Alexander Kanavin <alex@linutronix.de>
Signed-off-by: Alexandre Belloni <alexandre.belloni@bootlin.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2023-05-05 11:07:26 +01:00
Richard Purdie
1285f78ce8 recipes: Default to https git protocol where possible
The recommendation from server maintainers is that the https protocol
is both faster and more reliable than the dedicated git protocol at this point.
Switch to it where possible.

(From OE-Core rev: 139102a73d4151f4748b4a861bd4ab28dda7dab7)

Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2023-05-05 11:07:25 +01:00
Richard Purdie
768c89e306 gcc/go: Drop crosssdk suffix from virtual provides to improve dependency handling
There is little point in having "crosssdk" suffex added to the virtual provider within
gcc/go since the TARGET_PREFIX or SDK_PREFIX already encapsulates this. Remove it
allowing some of the special case overriding to be removed.

This also allows removal of some of the MLPREFIX usage since again, the triplet
also covers this.

(From OE-Core rev: fe0206ba482d209b24e636d578aa68ba5e67ba1b)

Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2023-05-02 10:24:50 +01:00
Richard Purdie
9a20fbe23f binutils: Drop crosssdk suffix from virtual provides to improve dependency handling
There is little point in having "crosssdk" suffex added to the virtual provider within
binutils since the TARGET_PREFIX or SDK_PREFIX already encapsulates this. Remove it
allowing some of the special case overriding to be removed.

(From OE-Core rev: 6856fc5c848cc2564bebe03a007ef109f46d0adb)

Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2023-05-02 10:24:50 +01:00
Yash Shinde
dc2ac3ca4f binutils: Fix CVE-2023-25586
Upstream-Status: Backport [https://sourceware.org/git/?p=binutils-gdb.git;h=5830876a0cca17bef3b2d54908928e72cca53502]

(From OE-Core rev: c8b9196d8ae2452c36bc8c2863a3cca740b4999e)

Signed-off-by: Yash Shinde <Yash.Shinde@windriver.com>
Signed-off-by: Alexandre Belloni <alexandre.belloni@bootlin.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2023-03-17 17:17:42 +00:00
Khem Raj
ce71bb3d08 binutils: Enable --enable-new-dtags
Use DT_RUNPATH over DT_RPATH. If DT_RUNPATH is present, LD_LIBRARY_PATH is searched before
DT_RUNPATH, Search order is DT_RPATH then LD_LIBRARY_PATH then
DT_RUNPATH, this order ensures that injecting
malicious shared objects is way harder with DT_RUNPATH.

This is now default on major linux distributions already

(From OE-Core rev: 66f8a745668a067d8d763fa2af3e65f26c9c1ebe)

Signed-off-by: Khem Raj <raj.khem@gmail.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2023-03-09 21:04:06 +00:00
Richard Purdie
c7b6eb9e8e binutils: Fix nativesdk ld.so search
Currently binutils in buildtools is searching for /etc/etc/ld.so.conf
which makes no sense. ld_sysconfdir already contains /etc so we need to
drop the /etc from the fixed string.

(From OE-Core rev: ccd28c418ab8390118d738fbe914395b5c2a1f75)

Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2023-02-24 11:04:27 +00:00
Xiaotian Wu
2f26104ebc binutils: disable gold on loongarch64
(From OE-Core rev: ea2c3952e28b191459ff6020ba0c6104ab33ee1c)

Signed-off-by: Xiaotian Wu <wuxiaotian@loongson.cn>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2023-02-04 17:02:10 +00:00
Khem Raj
ba31e10df4 binutils: Package libsframe
libsframe is newly added in binutils 2.40

(From OE-Core rev: 7b93d5ae806b680dd53dee68616ae5971b1fa054)

Signed-off-by: Khem Raj <raj.khem@gmail.com>
Signed-off-by: Alexandre Belloni <alexandre.belloni@bootlin.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2023-01-26 21:06:57 +00:00
Khem Raj
918ba17f58 binutils: Upgrade to 2.40 release
(From OE-Core rev: ae2b71ca2c73111a21845c2e1329ff973558991a)

Signed-off-by: Khem Raj <raj.khem@gmail.com>
Signed-off-by: Alexandre Belloni <alexandre.belloni@bootlin.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2023-01-26 21:06:57 +00:00
pgowda
696b799922 binutils: Add patch to fix CVE-2022-4285
Backport a patch from upstream to address CVE-2022-4285
[https://sourceware.org/git/gitweb.cgi?p=binutils-gdb.git;h=5c831a3c7f3ca98d6aba1200353311e1a1f84c70]

(From OE-Core rev: b6b750f8e41a392ff92d9118ef7530ada20d06fe)

Signed-off-by: pgowda <pgowda.cve@gmail.com>
Signed-off-by: Alexandre Belloni <alexandre.belloni@bootlin.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2022-12-21 10:16:31 +00:00