summaryrefslogtreecommitdiffstats
path: root/scripts/lib/build_perf
diff options
context:
space:
mode:
authorNathan Rossi <nathan.rossi@digi.com>2022-11-14 08:17:18 +0000
committerRichard Purdie <richard.purdie@linuxfoundation.org>2022-11-24 15:30:00 +0000
commit896727f943e7b1fcdd0ef56fb1e66f1b34046316 (patch)
tree094ffdb1e026f238b7c08578fc8ca5b323c8fd35 /scripts/lib/build_perf
parent2f1ac269b118d88811e3bf7d0b591a293c96bef6 (diff)
downloadpoky-896727f943e7b1fcdd0ef56fb1e66f1b34046316.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: 9485559d269ed11bfcc90399c9282549ced35ce0) Signed-off-by: Nathan Rossi <nathan.rossi@digi.com> Signed-off-by: Alexandre Belloni <alexandre.belloni@bootlin.com> (cherry picked from commit 2084cfcb3d15db3e02637f1cd63ab9c997f38a65) Signed-off-by: Steve Sakoman <steve@sakoman.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Diffstat (limited to 'scripts/lib/build_perf')
0 files changed, 0 insertions, 0 deletions