From 2230d27006d63faedb69e17dfaa37bd1b4c03b18 Mon Sep 17 00:00:00 2001 From: Vitaly Chikunov Date: Fri, 8 Dec 2023 06:01:37 +0300 Subject: [PATCH] process-debuginfo: Do not strip&split debugging vmlinux binary crash is unable to handle vmlinux split into vmlinux.debug because it cannot find `.symtab`[1]. This is not expected to be fixed soon. Really, there is not point to split it because both halves are in the same -debuginfo package and this is only complicates things. This also undoes approach taken in 894f4140c ("process-debuginfo: Add .gnu_debuglink symlink for vmlinux"). Link: https://github.com/crash-utility/crash/issues/160 Signed-off-by: Vitaly Chikunov --- scripts/find-debuginfo-files.in | 3 --- scripts/process-debuginfo.in | 6 ++---- 2 files changed, 2 insertions(+), 7 deletions(-) diff --git a/scripts/find-debuginfo-files.in b/scripts/find-debuginfo-files.in index 6314075..150c1d9 100755 --- a/scripts/find-debuginfo-files.in +++ b/scripts/find-debuginfo-files.in @@ -34,9 +34,6 @@ while read -r f; do else Warning "Expected $f not found." fi - if [ -L ".$f.debug" ] && [ -e ".$f.debug" ]; then - printf '%s\n' "$f.debug" >> .tmp/links - fi fi fbin=$f # Actual binary for linking diff --git a/scripts/process-debuginfo.in b/scripts/process-debuginfo.in index 889c010..007fd03 100755 --- a/scripts/process-debuginfo.in +++ b/scripts/process-debuginfo.in @@ -20,7 +20,7 @@ rezip= elfcompress= strip_rel= strip_btf='--keep-section=.BTF' -debuglink= +strip='--strip-all' if [ -z "${f#./lib/modules/*.ko}" ]; then elfcompress=yes @@ -57,7 +57,7 @@ elif [ -z "${f##./boot/vmlinuz-*}" ]; then if [ -f "$vmlinuxs" ]; then install -pD -m644 "$vmlinuxs" "$vmlinuxd" f=$vmlinuxd - debuglink="$vmlinuxd.debug" + strip= else Warning "vmlinux not found in $RPM_BUILD_DIR for -debuginfo" exit @@ -68,7 +68,6 @@ else fi debugf=./usr/lib/debug${f#.}.debug -strip='--strip-all' for pat in ${RPM_BRP_STRIP_DEBUG-}; do if [ -z "${f##.$pat}" ]; then strip='--strip-debug' @@ -106,7 +105,6 @@ fi if [ -n "$strip" ]; then mkdir -p "${debugf%/*}" LD_ORIGIN_PATH=/usr/bin eu-strip $strip $strip_rel $strip_btf --remove-comment -f "$debugf" "$f" - [ -z "$debuglink" ] || ln -sr "$debugf" "$debuglink" if [ -n "$elfcompress" ] && [ -x /usr/bin/eu-elfcompress ]; then LD_ORIGIN_PATH=/usr/bin eu-elfcompress --quiet "$debugf"