Commit Graph

314 Commits

Author SHA1 Message Date
Kai Kang
b46ab07288 binutils: another way to clear GPROFNG_ALTS for clang and musl
It disables gprofng for toolchain clang and libc musl, so GPROFNG_ALTS
should be cleared for them. But override 'toolchain-clang' is applied
before overrides 'TRANSLATED_TARGET_ARCH' such as x86-64, then
GPROFNG_ALTS is still set and not cleared.

Apply overrides 'toolchain-clang' and 'libc-musl' for GPROFNGS rather
than GPROFNG_ALTS to make it work as expected.

(From OE-Core rev: 30630b0e61835278a2e06262560de67c7a867ff6)

Signed-off-by: Kai Kang <kai.kang@windriver.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2022-09-29 21:15:50 +01:00
Kai Kang
14eea4a995 binutils: handle symlink files for gprofng
It provides gprofng by binutils 2.39 for x86, x86_64 and aarch64
according to configure.ac:

https://sourceware.org/git/?p=binutils-gdb.git;a=blob;f=configure.ac;h=a5555a9c91b42214afc46a0ab8b629e4c6fedcc0;hb=HEAD#l401

Add them to USE_ALTERNATIVES_FOR the same as others to handle symlink
files via update-alternative mechanism. And it disables gprofng for
clang and musl in .bb file, so clear GPROFNG_ALTS for them too.

(From OE-Core rev: 35bec42c4023a00a0a3639935633051ce9c1c0ba)

Signed-off-by: Kai Kang <kai.kang@windriver.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2022-09-22 21:39:21 +01:00
pgowda
72d1415686 binutils : Fix CVE-2022-38128
Upstream-Status: Backport [https://sourceware.org/git/?p=binutils-gdb.git;a=commitdiff;h=f07c08e115e27cddf5a0030dc6332bbee1bd9c6a]
Upstream-Status: Backport [https://sourceware.org/git/?p=binutils-gdb.git;a=commitdiff;h=175b91507b83ad42607d2f6dadaf55b7b511bdbe]
Upstream-Status: Backport [https://sourceware.org/git/?p=binutils-gdb.git;a=patch;h=695c6dfe7e85006b98c8b746f3fd5f913c94ebff]

(From OE-Core rev: b9348a0937185a14dfb5e5be4f4269c965541769)

Signed-off-by: pgowda <pgowda.cve@gmail.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2022-09-22 12:11:49 +01:00
Khem Raj
5b4e7e13d3 binutils: Ignore CVE-2022-38126 CVE-2022-38127
They are already part of backports to 2_36 branch
as noted

(From OE-Core rev: 5789c34b3e77937d034817a0cbd73bc1e4dcf451)

Signed-off-by: Khem Raj <raj.khem@gmail.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2022-09-13 23:03:36 +01:00
Khem Raj
4379c35275 binutils-cross-canadian: Do not package gprofng.rc
This file is already packaged via nativesdk-gprofng and can cause
populate SDK conflicts

Also delete the etc directory if its empty it can still cause packaging
QA errors

(From OE-Core rev: 4c03a7fd1d87ee0e5509ff23b0785e92b7aca324)

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>
2022-09-09 16:19:39 +01:00
pgowda
b3b3137754 binutils : CVE-2022-38533
Upstream-Status: Backport [https://sourceware.org/git/gitweb.cgi?p=binutils-gdb.git;h=ef186fe54aa6d281a3ff8a9528417e5cc614c797]

(From OE-Core rev: a7e44505667b60a160e9f1ad82105a181c747781)

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-09-08 14:59:39 +01:00
Khem Raj
d9c8d84f2b binutils: Upgrade to latest on 2.39 release branch
This brings in few bugfixes which we need e.g. fix elfutils ptests we
need

https://sourceware.org/git/gitweb.cgi?p=binutils-gdb.git;h=e8cf73215187b0c08679d726a5cc7c019fa3ea2e

changsets in this update

* 9e855cffa1f PR29466, APP/NO_APP with .linefile
* e3b5d935247 PR29462, internal error in relocate, at powerpc.cc:10796
* e8cf7321518 gas/Dwarf: properly skip zero-size functions
* 9284b63ea39 ld: fix NEWS typos

(From OE-Core rev: 30e902f42d4a0205d2a75bf9b2a9cc5e8db582be)

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>
2022-08-21 22:51:43 +01:00
Khem Raj
7ab2366d16 binutils: Disable gprofng on musl systems
disable gprofng, as it depends on few glibc apis

| ../../../gprofng/libcollector/../src/collector_module.h:78:13: error: duplicate member 'pwrite'
|    78 |   ssize_t (*pwrite64)();
|       |             ^~~~~~~~
| ../../../gprofng/libcollector/dispatcher.c: In function 'collector_timer_create':
| ../../../gprofng/libcollector/dispatcher.c:578:8: error: 'struct sigevent' has no member named '_sigev_un'
|   578 |   sigev._sigev_un._tid = __collector_gettid ();
|       |        ^

(From OE-Core rev: 41869d81347f43aa0e4d625aec88c551321dcded)

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>
2022-08-21 22:51:41 +01:00
Khem Raj
d745c8b588 binutils-cross-canadian: Package up new gprofng.rc file
(From OE-Core rev: 4482921731db1a4888d06e942eeb54bb20b31b36)

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>
2022-08-21 22:51:41 +01:00
Khem Raj
cf0cd9b219 binutils: Disable gprofng when using clang
It does not yet compile with clang it comes with __ builtin___snprintf_chk Not Supported
formatted output of built-in functions check is failing with clang
somehow it seems to be compiler limitation. Therefore disable building
this component with clang for now

(From OE-Core rev: 5f4b6afb030fe75247cc2da09cdf0ec5259673df)

(From OE-Core rev: 0b3cff906c469bb9d6dfc7fafe385243d00f1c2b)

Signed-off-by: Khem Raj <raj.khem@gmail.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Signed-off-by: Alexandre Belloni <alexandre.belloni@bootlin.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2022-08-21 22:51:41 +01:00
Khem Raj
e5af467dde binutils: Package up gprofng
(From OE-Core rev: 62fad02c368aa912ae97e8dd048bd81e305a5444)

(From OE-Core rev: 59668255730bf8386c4f7d39b6ea638f7e90b42e)

Signed-off-by: Khem Raj <raj.khem@gmail.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Signed-off-by: Alexandre Belloni <alexandre.belloni@bootlin.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2022-08-21 22:51:41 +01:00
Khem Raj
76bd0f00fc binutils-cross: Disable gprofng for when building cross binutils
This does not work in cross settings yet

(From OE-Core rev: c9d484092060f7e8431e31c64d98433b4f85c378)

(From OE-Core rev: c5cf9795cf9d2290bfa39cd7adfbec9a7777fea0)

Signed-off-by: Khem Raj <raj.khem@gmail.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Signed-off-by: Alexandre Belloni <alexandre.belloni@bootlin.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2022-08-21 22:51:41 +01:00
Khem Raj
75720e6af1 binutils: Upgrade to 2.39 release
Details of changes [1]

[1] https://sourceware.org/pipermail/binutils/2022-August/122246.html

(From OE-Core rev: a2458d4011e77868d6384b377a7a4cc1096c4ac3)

(From OE-Core rev: 4fa90ce4f13eb8a854836462b1865fd08f5a68b2)

Signed-off-by: Khem Raj <raj.khem@gmail.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Signed-off-by: Alexandre Belloni <alexandre.belloni@bootlin.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2022-08-21 22:51:41 +01:00
Sundeep KOKKONDA
899adf29ef binutils : stable 2.38 branch updates
Below commits on binutils-2.38 development branch are updated.

e1ea1dafff6 x86: Properly handle IFUNC function pointer reference
ffc7aa903b9 AArch64: Enable FP16 by default for Armv9-A.

(From OE-Core rev: 57ecf323d994453719ec15894173d372b9c80056)

Signed-off-by: Sundeep KOKKONDA <sundeep.kokkonda@windriver.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2022-07-12 23:56:10 +01:00
Pgowda
95f8fe68ee binutils : CVE-2019-1010204
Upstream-Status: Backport [https://sourceware.org/git/gitweb.cgi?p=binutils-gdb.git;h=2a4fc266dbf77ed7ab83da16468e9ba627b8bc2d]

(From OE-Core rev: 0c55355a83130c2c0a59e9fb94f8914499943dd4)

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-06-29 16:16:56 +01:00
Samuli Piippo
bd59737996 binutils: Bump to latest 2.38 release branch
Fixes Qt build with GCC 12.1.

Brings following fixes

 * 3d549e5ccc0 PR29142, segv in ar with empty archive and libdeps specified
 * c473aa1b9d8 M68K: avoid quadratic slowdlow in label alignment check
 * 8d1187516e3 Adjust ld ctf test for 32-bit targets
 * 9c67f6382ac x86: Properly handle function pointer reference
 * 9a01457e02e s390: Add DT_JMPREL pointing to .rela.[i]plt with static-pie
 * 82a5bb730a1 s390: Avoid dynamic TLS relocs in PIE
 * d54081c642a LoongArch: Update ABI eflag in elf header.
 * fb4d148004f IBM zSystems: Add support for z16 as CPU name.
 * 975b5540232 libctf, ld: diagnose corrupted CTF header cth_strlen
 * 99852365513 dlltool: Use the output name as basis for deterministic temp prefixes
 * 210bf1d6225 Updated Serbian (for binutils/) and Russian (for gprof/) translations
 * fcf60fe8482 PR28959, obdump doesn't disassemble mftb instruction
 * e4a35c73196 PowerPC64 DT_RELR relative reloc addresses
 * 7183434818e Work around gcc-4 warnings in elf64-ppc.c

(From OE-Core rev: c007a7251e697836a29bd1aebe49d4f2433a5e6e)

Signed-off-by: Samuli Piippo <samuli.piippo@qt.io>
Signed-off-by: Luca Ceresoli <luca.ceresoli@bootlin.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2022-05-20 09:25:47 +01:00
Khem Raj
80ad825f6a binutils: Bump to latest 2.38 release branch
Fixes building ppc32 kernels

Brings following fixes

* 2d92604cd30 Revert "Check thin archive element file size against archive header"
  * ed9b2e40ebf binutils 2.38 vs. ppc32 linux kernel
  * 40d32f56f63 Updated Serbian translations for the bfd, gold, ld and opcodes directories
  * 6aa1b7df2fc ld: Keep indirect symbol from IR if referenced from shared object
  * ae1cab7d3f3 i386: Update I386_NEED_DYNAMIC_RELOC_TYPE_P for DT_TEXTREL
  * df9071487a8 PR28882, build failure with gcc-4.2 due to use of 0b literals
  * caa6172de4b x86: Disallow invalid relocation against protected symbol

(From OE-Core rev: f5fb73ea3d868997f2fc3744ddb0647ab3284218)

Signed-off-by: Khem Raj <raj.khem@gmail.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2022-03-15 08:40:09 +00:00
Samuli Piippo
4a599c58a8 binutils-cross-canadian: enable gold for mingw
This reverts commit b5a595a4be09756b88e91f3353e3b221b165ab44,
gold linker can now be built correctly for mingw SDKs.

(From OE-Core rev: b2ab9ff4050ebd5efb273f44e62174efb22a214f)

Signed-off-by: Samuli Piippo <samuli.piippo@qt.io>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2022-03-10 13:07:37 +00:00
Pgowda
967ff0e2af binutils: Avoid Race condition in as.info
The race condition in binutils/gas folder was introduced with the
following patch. The patch avoids recursive make into the doc folder.
It would speed up the build process slightly. However, the as.info
is installed twice which resulted in the race condition sometimes.
https://sourceware.org/git/?p=binutils-gdb.git;a=commit;h=bde299e063de090bf36c1fe51874d1e9f4d94c3c

On debugging the code, it was found that the issue was related to
install-data-local. On further analysis, there is already a patch in
binutils that removes install-data-local.
On applying the patch as.info is installed once as expected and there’s
no possibility of any race condition.
https://sourceware.org/git/?p=binutils-gdb.git;a=commitdiff;h=9a84a44d5df4618dd616137fa755bd71b7eacc5f

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

[YOCTO #14725]

(From OE-Core rev: c08a245990eb46906476dc0f6ade0482c7be241d)

Signed-off-by: pgowda <pgowda.cve@gmail.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2022-03-04 17:14:15 +00:00
Richard Purdie
b0130fcf91 meta/meta-selftest/meta-skeleton: Update LICENSE variable to use SPDX license identifiers
An automated conversion using scripts/contrib/convert-spdx-licenses.py to
convert to use the standard SPDX license identifiers. Two recipes in meta-selftest
were not converted as they're that way specifically for testing. A change in
linux-firmware was also skipped and may need a more manual tweak.

(From OE-Core rev: ceda3238cdbf1beb216ae9ddb242470d5dfc25e0)

Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2022-02-20 16:45:25 +00:00
Khem Raj
6957ff06a0 binutils: Upgrade to 2.38 release
Release Notes are here [1]

[1] https://lists.gnu.org/archive/html/info-gnu/2022-02/msg00009.html

(From OE-Core rev: 77a1038828e638518dceda969da0817aa13eb5d3)

Signed-off-by: Khem Raj <raj.khem@gmail.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2022-02-16 09:46:28 +00:00
Richard Purdie
1dfa8537a3 binutils: Add fix for CVE-2021-45078
Backport a fix for CVE-2021-45078.

(From OE-Core rev: f3128fd1b2e5cbf3683dc69eabc56fbc0bd0e7d5)

Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2022-02-07 10:08:59 +00:00
pgowda
3cb504ceba binutils: CVE-2021-42574
Upstream-Status: Backport [https://sourceware.org/git/?p=binutils-gdb.git;a=commit;h=b3aa80b45c4f46029efeb204bb9f2d2c4278a0e5]

[RP: Merge uint -> unsigned int change]
(From OE-Core rev: fa242a41f3436f1d73eabee335573c1801bf7888)

Signed-off-by: pgowda <pgowda.cve@gmail.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2021-12-22 23:11:45 +00:00
Ross Burton
be8fe788e2 binutils: don't expect libtool to be host-prefixed
We update the libtool m4 files in binutils with the latest files from
our patched libtool so that we can use the --with-libtool-sysroot option.

Remove the chunks that are specific to the libtool renaming, which now
doesn't happen.

(From OE-Core rev: 30baaf6c20a2e1619439cf3eb8d9ce7cb877d2fa)

Signed-off-by: Ross Burton <ross.burton@arm.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2021-12-12 18:10:22 +00:00
Valerii Chernous
e9558a166e elf: Discard input .note.gnu.build-id sections
Originally issue:
building of glibc 2.32 or 2.34 with option "-Wl,--build-id"
produce libc.so.6 with section ".note.gnu.build-id" that have
invalid(double, 0x48) section size. It happens because glibc
use sublibraries for linking libc.so.6
ld produce this sublibraries with build-id section and on last
linking stage loads this sections as input for linking.
ld should create new(valid) ".note.gnu.build-id" into function
ldelf_setup_build_id on last linking stage but it skip creating because
build-id section already exists.
As result libc.so.6 contain ".note.gnu.build-id" with build-ids from
sublibraries and without valid build-id

Howto solved:
1. Discard input .note.gnu.build-id sections.
2. Clear the build ID field before writing.
3. Use bfd_make_section_anyway_with_flags to create the output
   .note.gnu.build-id section.

Upstream-Status: Backport

Reference to upstream patch:
[https://sourceware.org/git/?p=binutils-gdb.git;a=commit;h=1f1d0f8888a6c944e612b416a2a6e11abcf5199f]

(From OE-Core rev: 68bbff44a481a036dc7d39e5d5745a01ccffdb95)

Signed-off-by: Valerii Chernous <vchernou@cisco.com>
Signed-off-by: Valery Chernous <valery.chernous@gmail.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2021-12-12 11:27:24 +00:00
Richard Purdie
d4f4ed77b1 binutils: Drop mips XLP support patch
The kernel has dropped this as of 5.16 and we don't want to carry such patches
without active maintainers for such targets.

It isn't clear who would even have such hardware and it isn't something we can
support. It would be best maintained as a separate layer by those who can test
it if needed.

(From OE-Core rev: 5cd5075412639c0be9506cf1101737b12894fc5f)

Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2021-12-12 11:27:23 +00:00
Richard Purdie
f39288eb73 binutils: Drop mips default target patch
Similarly to the recent gcc change, we make gcc default to the 64 bit target
through configuration now so we don't need to patch this.

(From OE-Core rev: 259bcfdac3ad87d269dd18617c784fe14c50b0ad)

Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2021-12-12 11:27:23 +00:00
Richard Purdie
ef2c949827 binutils: Add more detail to the ppc patch
This adds useful detail from the orginal commit.

(From OE-Core rev: 3dea562e9d615384cc5e786eff46ac1f8f41e18e)

Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2021-12-12 11:27:23 +00:00
Richard Purdie
2d5e9a1d30 binutils: Drop mips gold patch
As mentioned in a followup to the patch upstream:

https://sourceware.org/legacy-ml/binutils/2016-08/msg00215.html

"With 2.16.1, --enable-gold is just ignored when building on mips"

so we don't need the patch since 2.16.1.

(From OE-Core rev: 3c230c70f28aef21ae986679d783551832b4e3fa)

Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2021-12-12 11:27:23 +00:00
Khem Raj
6fdfe7bc33 binutils: Drop patch to wider sh regexp
This was needed during uclibc days and remnants have lingered on.
Remove this patch

(From OE-Core rev: ffbde7ed072baf47ddfe89dd9f7630f67a7a8be3)

Signed-off-by: Khem Raj <raj.khem@gmail.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2021-12-08 20:22:11 +00:00
Alexander Kanavin
b3ac015389 patches: correct whitespace/spelling for Upstream-Status tags
(From OE-Core rev: c613ca14c35a5d1782c79a25b83875cbfa2b952b)

Signed-off-by: Alexander Kanavin <alex@linutronix.de>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2021-11-21 11:05:02 +00:00
Richard Purdie
5bf43c8c29 gcc: Dropping mips workaround
I've tested without this and the ptest results for mips are the same with
and without it so the issue this was fixing in gcc 9 was likely resolved
by gcc 11.

(From OE-Core rev: 567e199862acb948cb8b3361010a9ec221147c41)

Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2021-11-16 22:20:33 +00:00
Chanho Park
cb8edc767e binutils: inherit pkgconfig to address libdebuginfod depdency
Since libdebuginfo was default distro feature[1], cross build of binutils
has been broken due to absence of pkg-config. To find the dependency
properly, we should inherit pkgconfig bbclass.

checking for aarch64-poky-linux-pkg-config... no
checking for pkg-config... no
checking whether to use debuginfod... yes
checking for libdebuginfod >= 0.179... no
configure: error: "--with-debuginfod was given, but libdebuginfod is missing or unusable."

[1]: https://lists.openembedded.org/g/openembedded-core/message/150666

(From OE-Core rev: 50154869b496cf63a4fae2c8278350fcf9a2591d)

Signed-off-by: Chanho Park <chanho61.park@samsung.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2021-09-11 22:39:20 +01:00
Alexander Kanavin
bcdaf2486b binutils: drop target flex/bison from build dependencies
This lengthens dependency chains unnecessarily;
also -native versions are already included in DEPENDS via binutils.inc:

DEPENDS = "flex-native bison-native zlib-native gnu-config-native autoconf-native"

I have also checked that nothing in binutils needs anything from target
sysroots of flex/bison:
https://lists.openembedded.org/g/openembedded-core/message/155131

(From OE-Core rev: 8e9d3b5c8c994d307b2cca6a053b29403af9d5ef)

Signed-off-by: Alexander Kanavin <alex.kanavin@gmail.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2021-08-26 08:07:55 +01:00
Andreas Müller
8fe33c7215 binutils: Apply upstream patch to fix 'too many open files' on qtwebengine
Since upgrade of binutils to 2.37 builds of qtwebengine failed to link even
with ulimits -n 1000000 (!!).
Fix that by applying a patch from stable 'binutils-2_37-branch'.

(From OE-Core rev: 9f4660e1c6b251c55f9e7e8072b602edf843b952)

Signed-off-by: Andreas Müller <schnitzeltony@gmail.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2021-08-18 17:01:06 +01:00
Richard Purdie
bb6ddc3691 Convert to new override syntax
This is the result of automated script conversion:

scripts/contrib/convert-overrides.py <oe-core directory>

converting the metadata to use ":" as the override character instead of "_".

(From OE-Core rev: 42344347be29f0997cc2f7636d9603b1fe1875ae)

Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2021-08-02 15:44:10 +01:00
Khem Raj
433d240084 binutils: Upgrade to 2.37 branch
This is next/latest release branch for binutils
Drop backports and CVE fixes which already are applied upstream

bfd_stdint.h has been removed in favor of using stdint.h

(From OE-Core rev: 08cd144fc4b5ac34ff99f71b1d825cbff96b642c)

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>
2021-07-24 16:33:46 +01:00
Martin Jansa
e7ce28c8b0 binutils: backport DWARF-5 support for gold
* DWARF-5 is now used by default with gcc-11, causing
  11.1.0/ld: internal error in format_file_lineno, at ../../gold/dwarf_reader.cc:2278
  collect2: error: ld returned 1 exit status
  in various projects (runc-opencontainers, libhybris, collada-dom)

* https://gcc.gnu.org/gcc-11/changes.html

  For targets that produce DWARF debugging information GCC now defaults to DWARF version 5
  (with the exception of VxWorks and Darwin/Mac OS X which default to version 2 and
  AIX which defaults to version 4). This can produce up to 25% more compact debug
  information compared to earlier versions.

  To take full advantage of DWARF version 5 GCC needs to be build against binutils version 2.35.2 or higher.
  When GCC is build against earlier versions of binutils GCC will still emit DWARF version 5 for
  most debuginfo data, but will generate version 4 debug line tables (even when explicitly given -gdwarf-5).

  The following debug information consumers can process DWARF version 5:

  GDB 8.0, or higher
  valgrind 3.17.0
  elfutils 0.172, or higher (for use with systemtap, dwarves/pahole, perf and libabigail)
  dwz 0.14
  Programs embedding libbacktrace are urged to upgrade to the version shipping with GCC 11.

  To make GCC 11 generate an older DWARF version use -g together with -gdwarf-2, -gdwarf-3 or -gdwarf-4.

(From OE-Core rev: d07d4d739ae17787017f771dd2068fda0e836722)

Signed-off-by: Martin Jansa <Martin.Jansa@gmail.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2021-05-13 11:34:15 +01:00
Vinay Kumar
f628b052f6 binutils: Fix CVE-2021-20197
Source: git://sourceware.org/git/binutils-gdb.git
Tracking -- https://sourceware.org/bugzilla/show_bug.cgi?id=26945

Backported upstream commit d3edaa91d4cf7202ec14342410194841e2f67f12 to
binutils-2.36 source along with commit id dependencies
(8e03235147a9e774d3ba084e93c2da1aa94d1cec and 8b69e61d4be276bb862698aaafddc3e779d23c8f).

(From OE-Core rev: 395812c345cb510471e264c6f5bb83eed61d79df)

Signed-off-by: Vinay Kumar <vinay.m.engg@gmail.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2021-05-06 08:41:26 +01:00
Khem Raj
70a757bbec binutils: Fix linking failures when using dwarf-5
Since GCC 11 will switch to dwarf-5 as default, this patch will be
required soon

(From OE-Core rev: 9dc9bf85f53c6712dd047df5fd718e9895946fd5)

Signed-off-by: Khem Raj <raj.khem@gmail.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2021-04-23 10:12:10 +01:00
Alexander Kanavin
dd35211b69 default-distrovars.inc: add debuginfod to default DISTRO_FEATURES
Obtaining debug information by having it served automatically via http
is far more pleasant than messing about with debugfs and gdbserver or
transferring and installing -dbg packages by hand.

I believe we should follow the desktop distros and have it enabled
out of the box. Please see the following commit for the description
of how it works.

(From OE-Core rev: 024c88c82791a113b614abf61ffd82e097bf21d1)

Signed-off-by: Alexander Kanavin <alex.kanavin@gmail.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2021-04-23 10:12:09 +01:00
Armin Kuster
190a53a942 binutils: rename BRANCH var
If BRANCH is defined in local.conf then that name is used to d/l sources
for binutils. You will get this error:

Fetcher failure for URL: 'git://sourceware.org/git/binutils-gdb.git;branch=hardknott;protocol=git'. Unable to fetch URL from any source.

Rename to SRCBRANCH like glibc has to avoid the more common variable name BRANCH.

(From OE-Core rev: 40d18272cd765420080fffc0e4bde7e3e79982af)

Signed-off-by: Armin Kuster <akuster808@gmail.com>

--
V2]
Remove commented out BINUPV and function

Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2021-04-18 11:37:26 +01:00
Khem Raj
e1d353880c binutils: Fix a missing break in case statement
This was missed during patch forward porting
its only effective when printing options

(From OE-Core rev: 5c6a585347199c099700b93405f511971f5fe26d)

Signed-off-by: Khem Raj <raj.khem@gmail.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2021-04-05 15:29:02 +01:00
Dorinda
5643598a63 binutils: add PACKAGECONFIG for debuginfod
Added PACKAGECONFIG for debuginfod

(From OE-Core rev: 418c3a5c90d5d0bef67e5fba04a19952dbb308b4)

Signed-off-by: Dorinda Bassey <dorindabassey@gmail.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2021-03-02 20:39:35 +00:00
Khem Raj
7bf45fa0ed binutils: Upgrade to 2.36.1 release
(From OE-Core rev: 76e2f0754349703d29e2942e03be3a2c7f0153be)

Signed-off-by: Khem Raj <raj.khem@gmail.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2021-02-26 15:21:20 +00:00
Khem Raj
b9b33e32e6 binutils: Disable parallel install for target/nativesdk binutils
2.36 has a build race between libctf and libbfd

(From OE-Core rev: b1f44d9f1f4090ec2c6fd58aa4321da9a22ba9a0)

Signed-off-by: Khem Raj <raj.khem@gmail.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2021-02-03 21:45:49 +00:00
Khem Raj
42eb97fb13 binutils: Package libdep linker plugins
this is new plugin added in binutils 2.36

(From OE-Core rev: dddd261bab4b371ae97bcf4b954359297d615f83)

Signed-off-by: Khem Raj <raj.khem@gmail.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2021-02-03 21:45:49 +00:00
Khem Raj
b7daba6738 binutils: Upgrade to 2.36 release
Drop backported patches which are already present in 2.36 release

(From OE-Core rev: 897afa95ba340f1124decac5753e1d1e1283b515)

Signed-off-by: Khem Raj <raj.khem@gmail.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2021-02-03 21:45:49 +00:00
Yi Fan Yu
fef6ec93b5 binutils: Fix CVE-2020-35448
Fix related to a buffer overflow in bfd library

CVE Details https://nvd.nist.gov/vuln/detail/CVE-2020-35448

Upstream Tracking https://sourceware.org/bugzilla/show_bug.cgi?id=26574

Patch from Upstream
    https://sourceware.org/git/gitweb.cgi?p=binutils-gdb.git;
    h=8642dafaef21aa6747cec01df1977e9c52eb4679

(From OE-Core rev: cb83312131f6c4f69d89d639085e07ea1f53167e)

Signed-off-by: Yi Fan Yu <yifan.yu@windriver.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2021-01-16 22:39:36 +00:00
Wang Mingyu
21eb51e2a8 binutils: upgrade 2.35 -> 2.35.1
(From OE-Core rev: cff69ee95a6ab49e6c6c1b1b2435e479e526c2c9)

Signed-off-by: Wang Mingyu <wangmy@cn.fujitsu.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2021-01-13 23:13:46 +00:00