diff options
author | Eli Schwartz <eschwartz@archlinux.org> | 2021-05-19 09:23:51 +0200 |
---|---|---|
committer | Allan McRae <allan@archlinux.org> | 2021-05-19 11:05:34 +0200 |
commit | e176b8ec198ef34ae70a1f46b7b7fe998aa0c475 (patch) | |
tree | 90ab7cbb9fdc93fa0d2dd64fa632691a2b4f96aa /scripts/libmakepkg/tidy | |
parent | 0e655dd4923495ffcf478e2e695f402670e5ac7b (diff) | |
download | pacman-e176b8ec198ef34ae70a1f46b7b7fe998aa0c475.tar.gz pacman-e176b8ec198ef34ae70a1f46b7b7fe998aa0c475.tar.xz |
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 <eschwartz@archlinux.org>
Signed-off-by: Allan McRae <allan@archlinux.org>
Diffstat (limited to 'scripts/libmakepkg/tidy')
-rw-r--r-- | scripts/libmakepkg/tidy/strip.sh.in | 2 |
1 files changed, 1 insertions, 1 deletions
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 == "<artificial>") next}{if (name !~ /^[<\/]/) {printf "%s/", $NF}}{print name}}' } |