diff --git a/elfutils-0.182-s390-pid_memory_read.patch b/elfutils-0.182-s390-pid_memory_read.patch new file mode 100644 index 0000000..2c056cb --- /dev/null +++ b/elfutils-0.182-s390-pid_memory_read.patch @@ -0,0 +1,39 @@ +commit e4d985a3c1c873f77d20fa0cd421458cc2824996 +Author: Andreas Krebbel +Date: Thu Nov 19 20:32:24 2020 +0100 + + IBM Z: Fix endianess problem in pid_memory_read + + The cached reads lack the big endian adjustments done in the fallback + path. + + Signed-off-by: Andreas Krebbel + +diff --git a/libdwfl/linux-pid-attach.c b/libdwfl/linux-pid-attach.c +index 3a6af997..b23139d9 100644 +--- a/libdwfl/linux-pid-attach.c ++++ b/libdwfl/linux-pid-attach.c +@@ -193,14 +193,22 @@ pid_memory_read (Dwfl *dwfl, Dwarf_Addr addr, Dwarf_Word *result, void *arg) + { + struct __libdwfl_pid_arg *pid_arg = arg; + pid_t tid = pid_arg->tid_attached; ++ Dwfl_Process *process = dwfl->process; + assert (tid > 0); + + #ifdef HAVE_PROCESS_VM_READV + if (read_cached_memory (pid_arg, addr, result)) ++ { ++#if SIZEOF_LONG == 8 ++# if BYTE_ORDER == BIG_ENDIAN ++ if (ebl_get_elfclass (process->ebl) == ELFCLASS32) ++ *result >>= 32; ++# endif ++#endif + return true; ++ } + #endif + +- Dwfl_Process *process = dwfl->process; + if (ebl_get_elfclass (process->ebl) == ELFCLASS64) + { + #if SIZEOF_LONG == 8 diff --git a/elfutils.spec b/elfutils.spec index 6994f29..683592f 100644 --- a/elfutils.spec +++ b/elfutils.spec @@ -1,6 +1,6 @@ Name: elfutils Version: 0.182 -%global baserelease 1 +%global baserelease 2 Release: %{baserelease}%{?dist} URL: http://elfutils.org/ %global source_url ftp://sourceware.org/pub/elfutils/%{version}/ @@ -60,6 +60,7 @@ BuildRequires: autoconf %endif # Patches +Patch1: elfutils-0.182-s390-pid_memory_read.patch %description Elfutils is a collection of utilities, including stack (to show @@ -200,6 +201,7 @@ Requires: elfutils-libs%{depsuffix} = %{version}-%{release} Requires: elfutils-libelf%{depsuffix} = %{version}-%{release} Requires: elfutils-debuginfod-client%{depsuffix} = %{version}-%{release} BuildRequires: systemd +BuildRequires: make Requires(post): systemd Requires(preun): systemd Requires(postun): systemd @@ -228,6 +230,7 @@ such servers to download those files on demand. %setup -q # Apply patches +%patch1 -p1 autoreconf -f -v -i @@ -259,7 +262,6 @@ trap '' EXIT %make_build -s %install -rm -rf ${RPM_BUILD_ROOT} %make_install -s chmod +x ${RPM_BUILD_ROOT}%{_prefix}/%{_lib}/lib*.so* @@ -312,7 +314,6 @@ fi %endif %files -%{!?_licensedir:%global license %%doc} %license COPYING COPYING-GPLV2 COPYING-LGPLV3 doc/COPYING-GFDL %doc README TODO CONTRIBUTING %{_bindir}/eu-addr2line @@ -335,7 +336,6 @@ fi %{_mandir}/man1/eu-*.1* %files libs -%{!?_licensedir:%global license %%doc} %license COPYING-GPLV2 COPYING-LGPLV3 %{_libdir}/libasm-%{version}.so %{_libdir}/libdw-%{version}.so @@ -357,7 +357,6 @@ fi %{_libdir}/pkgconfig/libdw.pc %files -f %{name}.lang libelf -%{!?_licensedir:%global license %%doc} %license COPYING-GPLV2 COPYING-LGPLV3 %{_libdir}/libelf-%{version}.so %{_libdir}/libelf.so.* @@ -376,21 +375,18 @@ fi %endif %files debuginfod-client -%defattr(-,root,root) %{_libdir}/libdebuginfod-%{version}.so %{_libdir}/libdebuginfod.so.* %{_bindir}/debuginfod-find %{_mandir}/man1/debuginfod-find.1* %files debuginfod-client-devel -%defattr(-,root,root) %{_libdir}/pkgconfig/libdebuginfod.pc %{_mandir}/man3/debuginfod_*.3* %{_includedir}/elfutils/debuginfod.h %{_libdir}/libdebuginfod.so %files debuginfod -%defattr(-,root,root) %{_bindir}/debuginfod %config(noreplace) %{_sysconfdir}/sysconfig/debuginfod %{_unitdir}/debuginfod.service @@ -414,6 +410,9 @@ exit 0 %systemd_postun_with_restart debuginfod.service %changelog +* Thu Dec 17 2020 Mark Wielaard - 0.182-2 +- Add elfutils-0.182-s390-pid_memory_read.patch + * Sat Oct 31 2020 Mark Wielaard - 0.182-1 - Upgrade to upstream 0.182 - backends: Support for tilegx has been removed.