0.178-6 - Add elfutils-0.178-compressed-vmlinuz.patch
This commit is contained in:
parent
2162703997
commit
83259ef8d8
62
elfutils-0.178-compressed-vmlinuz.patch
Normal file
62
elfutils-0.178-compressed-vmlinuz.patch
Normal file
@ -0,0 +1,62 @@
|
|||||||
|
commit 4a90cb11140a6bb3712228861a32e4035013ad85
|
||||||
|
Author: Mark Wielaard <mark@klomp.org>
|
||||||
|
Date: Thu Dec 5 15:03:54 2019 +0100
|
||||||
|
|
||||||
|
libdwfl: Find and handle compressed vmlinuz image.
|
||||||
|
|
||||||
|
Both the dwfl_linux_kernel_find_elf callback and the
|
||||||
|
dwfl_linux_kernel_report_offline reporting function only handled
|
||||||
|
vmlinix images possibly compressed with .gz, .bz2 or .xz extension.
|
||||||
|
They did not find or handle the much more common vmlinuz compressed
|
||||||
|
images.
|
||||||
|
|
||||||
|
It is not completely clear why we didn't up to now. Support for
|
||||||
|
compressed ELF files was added in 2009 and the code was updated to
|
||||||
|
to try to find the .gz, .bz2 or .xz extension variants in 2011.
|
||||||
|
But not the vmlinuz named variant.
|
||||||
|
|
||||||
|
Reported-by: Aaron Merey <amerey@redhat.com>
|
||||||
|
Tested-by: Frank Ch. Eigler <fche@redhat.com>
|
||||||
|
Signed-off-by: Mark Wielaard <mark@klomp.org>
|
||||||
|
|
||||||
|
diff --git a/libdwfl/linux-kernel-modules.c b/libdwfl/linux-kernel-modules.c
|
||||||
|
index d46ab5aa..48fb1ff0 100644
|
||||||
|
--- a/libdwfl/linux-kernel-modules.c
|
||||||
|
+++ b/libdwfl/linux-kernel-modules.c
|
||||||
|
@@ -174,6 +174,8 @@ kernel_release (void)
|
||||||
|
static int
|
||||||
|
find_kernel_elf (Dwfl *dwfl, const char *release, char **fname)
|
||||||
|
{
|
||||||
|
+ /* First try to find an uncompressed vmlinux image. Possibly
|
||||||
|
+ including debuginfo. */
|
||||||
|
if ((release[0] == '/'
|
||||||
|
? asprintf (fname, "%s/vmlinux", release)
|
||||||
|
: asprintf (fname, "/boot/vmlinux-%s", release)) < 0)
|
||||||
|
@@ -188,6 +190,27 @@ find_kernel_elf (Dwfl *dwfl, const char *release, char **fname)
|
||||||
|
fd = try_kernel_name (dwfl, fname, true);
|
||||||
|
}
|
||||||
|
|
||||||
|
+ /* There might be a compressed vmlinuz image. Probably without
|
||||||
|
+ debuginfo, but try to find it under the debug path also, just in
|
||||||
|
+ case. */
|
||||||
|
+ if (fd < 0)
|
||||||
|
+ {
|
||||||
|
+ free (*fname);
|
||||||
|
+ if ((release[0] == '/'
|
||||||
|
+ ? asprintf (fname, "%s/vmlinuz", release)
|
||||||
|
+ : asprintf (fname, "/boot/vmlinuz-%s", release)) < 0)
|
||||||
|
+ return -1;
|
||||||
|
+
|
||||||
|
+ fd = try_kernel_name (dwfl, fname, true);
|
||||||
|
+ if (fd < 0 && release[0] != '/')
|
||||||
|
+ {
|
||||||
|
+ free (*fname);
|
||||||
|
+ if (asprintf (fname, MODULEDIRFMT "/vmlinuz", release) < 0)
|
||||||
|
+ return -1;
|
||||||
|
+ fd = try_kernel_name (dwfl, fname, true);
|
||||||
|
+ }
|
||||||
|
+ }
|
||||||
|
+
|
||||||
|
return fd;
|
||||||
|
}
|
||||||
|
|
@ -1,6 +1,6 @@
|
|||||||
Name: elfutils
|
Name: elfutils
|
||||||
Version: 0.178
|
Version: 0.178
|
||||||
%global baserelease 5
|
%global baserelease 6
|
||||||
Release: %{baserelease}%{?dist}
|
Release: %{baserelease}%{?dist}
|
||||||
URL: http://elfutils.org/
|
URL: http://elfutils.org/
|
||||||
%global source_url ftp://sourceware.org/pub/elfutils/%{version}/
|
%global source_url ftp://sourceware.org/pub/elfutils/%{version}/
|
||||||
@ -57,6 +57,7 @@ BuildRequires: curl
|
|||||||
Patch1: elfutils-0.178-pt-gnu-prop.patch
|
Patch1: elfutils-0.178-pt-gnu-prop.patch
|
||||||
Patch2: elfutils-0.178-debuginfod-no-cache.patch
|
Patch2: elfutils-0.178-debuginfod-no-cache.patch
|
||||||
Patch3: elfutils-0.178-curl-code-gcc-10.patch
|
Patch3: elfutils-0.178-curl-code-gcc-10.patch
|
||||||
|
Patch4: elfutils-0.178-compressed-vmlinuz.patch
|
||||||
|
|
||||||
%description
|
%description
|
||||||
Elfutils is a collection of utilities, including stack (to show
|
Elfutils is a collection of utilities, including stack (to show
|
||||||
@ -251,6 +252,7 @@ such servers to download those files on demand.
|
|||||||
%patch1 -p1 -b .pt-gnu-prop
|
%patch1 -p1 -b .pt-gnu-prop
|
||||||
%patch2 -p1 -b .debuginfod-client-cache
|
%patch2 -p1 -b .debuginfod-client-cache
|
||||||
%patch3 -p1 -b .curl-gcc-10
|
%patch3 -p1 -b .curl-gcc-10
|
||||||
|
%patch4 -p1 -b .vmlinuz
|
||||||
|
|
||||||
# In case the above patches added any new test scripts, make sure they
|
# In case the above patches added any new test scripts, make sure they
|
||||||
# are executable.
|
# are executable.
|
||||||
@ -428,8 +430,9 @@ exit 0
|
|||||||
%systemd_postun_with_restart debuginfod.service
|
%systemd_postun_with_restart debuginfod.service
|
||||||
|
|
||||||
%changelog
|
%changelog
|
||||||
* Wed Dec 11 2019 Mark Wielaard <mjw@fedoraproject.org>
|
* Wed Dec 11 2019 Mark Wielaard <mjw@fedoraproject.org> - 0.178-6
|
||||||
- Add elfutils-0.178-curl-code-gcc-10.patch
|
- Add elfutils-0.178-curl-code-gcc-10.patch
|
||||||
|
- Add elfutils-0.178-compressed-vmlinuz.patch
|
||||||
|
|
||||||
* Mon Dec 9 2019 Mark Wielaard <mjw@fedoraproject.org> - 0.178-5
|
* Mon Dec 9 2019 Mark Wielaard <mjw@fedoraproject.org> - 0.178-5
|
||||||
- Add elfutils-0.178-debuginfod-no-cache.patch.
|
- Add elfutils-0.178-debuginfod-no-cache.patch.
|
||||||
|
Loading…
Reference in New Issue
Block a user