summaryrefslogtreecommitdiffstats
path: root/meta/recipes-devtools/binutils/binutils-2.37.inc
diff options
context:
space:
mode:
authorValerii Chernous <vchernou@cisco.com>2021-12-10 19:53:37 +0200
committerRichard Purdie <richard.purdie@linuxfoundation.org>2021-12-12 11:27:24 +0000
commite9558a166edb35b6475c5d760902b3c0cf85b4ce (patch)
tree1be0fac448990ded18629c0ff3c523684441117e /meta/recipes-devtools/binutils/binutils-2.37.inc
parentc9351aee3f9b1016c1697178a53664eebebbcf84 (diff)
downloadpoky-e9558a166edb35b6475c5d760902b3c0cf85b4ce.tar.gz
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>
Diffstat (limited to 'meta/recipes-devtools/binutils/binutils-2.37.inc')
-rw-r--r--meta/recipes-devtools/binutils/binutils-2.37.inc1
1 files changed, 1 insertions, 0 deletions
diff --git a/meta/recipes-devtools/binutils/binutils-2.37.inc b/meta/recipes-devtools/binutils/binutils-2.37.inc
index 5ac17c4a65..fca4a80ad2 100644
--- a/meta/recipes-devtools/binutils/binutils-2.37.inc
+++ b/meta/recipes-devtools/binutils/binutils-2.37.inc
@@ -32,5 +32,6 @@ SRC_URI = "\
32 file://0015-sync-with-OE-libtool-changes.patch \ 32 file://0015-sync-with-OE-libtool-changes.patch \
33 file://0016-Check-for-clang-before-checking-gcc-version.patch \ 33 file://0016-Check-for-clang-before-checking-gcc-version.patch \
34 file://0017-bfd-Close-the-file-descriptor-if-there-is-no-archive.patch \ 34 file://0017-bfd-Close-the-file-descriptor-if-there-is-no-archive.patch \
35 file://0001-elf-Discard-input-.note.gnu.build-id-sections.patch \
35" 36"
36S = "${WORKDIR}/git" 37S = "${WORKDIR}/git"