From e176b8ec198ef34ae70a1f46b7b7fe998aa0c475 Mon Sep 17 00:00:00 2001 From: Eli Schwartz Date: Wed, 19 May 2021 03:23:51 -0400 Subject: makepkg: squelch readelf warnings from debug stripping readelf --debug-dump sometimes reports inscrutable warnings which don't actually affect our extraction of source filenames. For example: readelf: Warning: There is a hole [0xd3d - 0xd89] in .debug_loc section. Now gcc 11 seems to have dramatically increased the number of warnings: readelf: Warning: Corrupt offset (0x0000008e) in range entry 9 [...] readelf: Warning: Corrupt offset (0x000010f0) in range entry 250 The resulting debuginfo created by the very same toolchain works fine, as does the list of source filenames. But the warnings are quite noisy... send them to /dev/null since they are not actionable in the context of getting source files Signed-off-by: Eli Schwartz Signed-off-by: Allan McRae --- scripts/libmakepkg/tidy/strip.sh.in | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/scripts/libmakepkg/tidy/strip.sh.in b/scripts/libmakepkg/tidy/strip.sh.in index 737c5115..5d03b28f 100644 --- a/scripts/libmakepkg/tidy/strip.sh.in +++ b/scripts/libmakepkg/tidy/strip.sh.in @@ -36,7 +36,7 @@ build_id() { } source_files() { - LANG=C readelf "$1" --debug-dump | \ + LANG=C readelf "$1" --debug-dump 2>/dev/null | \ awk '/DW_AT_name +:/{name=$NF}/DW_AT_comp_dir +:/{{if (name == "") next}{if (name !~ /^[<\/]/) {printf "%s/", $NF}}{print name}}' } -- cgit v1.2.3-24-g4f1b