diff options
author | Nathan Rossi <nathan.rossi@digi.com> | 2022-11-03 07:56:06 +0000 |
---|---|---|
committer | Richard Purdie <richard.purdie@linuxfoundation.org> | 2022-11-11 13:43:40 +0000 |
commit | 0f21df06a77c5b3c7fd9ef778188b98bd5b1ad94 (patch) | |
tree | ec37bba247a5e70eb357ae6e338728dc77a31db4 /meta-skeleton/recipes-kernel | |
parent | 60ab170228f05a4c4758c0b9d8e02a9518178af6 (diff) | |
download | poky-0f21df06a77c5b3c7fd9ef778188b98bd5b1ad94.tar.gz |
package: Fix handling of minidebuginfo with newer binutils
Newer versions of binutils (2.38+) have changed how the
"--only-keep-debug" of objcopy behaves when stripping non-debug sections
from an ELF.
https://sourceware.org/git/?p=binutils-gdb.git;a=commit;h=68f543154e92ab0f5d6c569e0fa143f5e8bd2d80
This change causes associated sections to be correctly marked as NOBITS
with the section contents removed from the output. The side effect is
that this causes issues with objcopy's ability to perform symbol and
relocation stripping (-S/--strip-all) on the debug split ELF, such that
with some object files (e.g. kernel modules) objcopy fails to strip
symbols/relocations with an error like the following:
.../.debug/nls_cp950.ko[.rodata]: file truncated
Because of this it is now problematic to generate minidebuginfo for
these types of ELF objects. However it is not typically useful to inject
minidebuginfo into these types of ELFs, and other distributions (e.g.
Fedora, referring to find-debuginfo.sh of debugedit) only insert
minidebuginfo into executables and shared libraries.
This change causes the minidebuginfo injection to only apply to EXEC/DYN
type ELFs, which limits the injection to executables and shared
libraires.
Additionally this change fixes the parsing of the sections from the
"readelf -W -S" output which was not accounting for the section index
column having leading spaces for single digit index values e.g. "[ 1]".
(From OE-Core rev: 2084cfcb3d15db3e02637f1cd63ab9c997f38a65)
Signed-off-by: Nathan Rossi <nathan.rossi@digi.com>
Signed-off-by: Alexandre Belloni <alexandre.belloni@bootlin.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Diffstat (limited to 'meta-skeleton/recipes-kernel')
0 files changed, 0 insertions, 0 deletions