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 <vt@altlinux.org>
This commit is contained in:
Виталий Чикунов 2023-12-08 06:01:37 +03:00
parent 9dbb075285
commit 2230d27006
2 changed files with 2 additions and 7 deletions

View File

@ -34,9 +34,6 @@ while read -r f; do
else else
Warning "Expected $f not found." Warning "Expected $f not found."
fi fi
if [ -L ".$f.debug" ] && [ -e ".$f.debug" ]; then
printf '%s\n' "$f.debug" >> .tmp/links
fi
fi fi
fbin=$f # Actual binary for linking fbin=$f # Actual binary for linking

View File

@ -20,7 +20,7 @@ rezip=
elfcompress= elfcompress=
strip_rel= strip_rel=
strip_btf='--keep-section=.BTF' strip_btf='--keep-section=.BTF'
debuglink= strip='--strip-all'
if [ -z "${f#./lib/modules/*.ko}" ]; then if [ -z "${f#./lib/modules/*.ko}" ]; then
elfcompress=yes elfcompress=yes
@ -57,7 +57,7 @@ elif [ -z "${f##./boot/vmlinuz-*}" ]; then
if [ -f "$vmlinuxs" ]; then if [ -f "$vmlinuxs" ]; then
install -pD -m644 "$vmlinuxs" "$vmlinuxd" install -pD -m644 "$vmlinuxs" "$vmlinuxd"
f=$vmlinuxd f=$vmlinuxd
debuglink="$vmlinuxd.debug" strip=
else else
Warning "vmlinux not found in $RPM_BUILD_DIR for -debuginfo" Warning "vmlinux not found in $RPM_BUILD_DIR for -debuginfo"
exit exit
@ -68,7 +68,6 @@ else
fi fi
debugf=./usr/lib/debug${f#.}.debug debugf=./usr/lib/debug${f#.}.debug
strip='--strip-all'
for pat in ${RPM_BRP_STRIP_DEBUG-}; do for pat in ${RPM_BRP_STRIP_DEBUG-}; do
if [ -z "${f##.$pat}" ]; then if [ -z "${f##.$pat}" ]; then
strip='--strip-debug' strip='--strip-debug'
@ -106,7 +105,6 @@ fi
if [ -n "$strip" ]; then if [ -n "$strip" ]; then
mkdir -p "${debugf%/*}" mkdir -p "${debugf%/*}"
LD_ORIGIN_PATH=/usr/bin eu-strip $strip $strip_rel $strip_btf --remove-comment -f "$debugf" "$f" 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 if [ -n "$elfcompress" ] && [ -x /usr/bin/eu-elfcompress ]; then
LD_ORIGIN_PATH=/usr/bin eu-elfcompress --quiet "$debugf" LD_ORIGIN_PATH=/usr/bin eu-elfcompress --quiet "$debugf"