diff --git a/SOURCES/Object-elf.patch b/SOURCES/Object-elf.patch new file mode 100644 index 0000000..c579ddb --- /dev/null +++ b/SOURCES/Object-elf.patch @@ -0,0 +1,29 @@ +# workaround for https://github.com/dyninst/dyninst/issues/396 + +--- ./dyninst-9.3.2/symtabAPI/src/Object-elf.C.sv 2017-09-27 21:43:18.399429243 -0400 ++++ ./dyninst-9.3.2/symtabAPI/src/Object-elf.C 2017-09-27 21:56:14.485125928 -0400 +@@ -1445,6 +1445,24 @@ + if (fbt_iter == -1) { // Create new relocation entry. + relocationEntry re( next_plt_entry_addr, offset, targ_name, + NULL, type ); ++ if (type == R_X86_64_IRELATIVE) { ++ vector funcs; ++ dyn_hash_map >::iterator iter; ++ // find the resolver function and use that as the ++ // caller function symbol. The resolver has not run ++ // so we don't know the ultimate destination. ++ // Since the funcsByOffset map hasn't been setup yet ++ // we cannot call associated_symtab->findFuncByEntryOffset ++ for (iter = symbols_.begin(); iter != symbols_.end(); ++iter) { ++ std::string name = iter->first; ++ Symbol *sym = iter->second[0]; ++ if (sym->getOffset() == (Offset)addend) { ++ // Use dynsym_list.push_back(sym) instead? ++ re.addDynSym(sym); ++ break; ++ } ++ } ++ } + re.setAddend(addend); + re.setRegionType(rtype); + if (dynsym_list.size() > 0) diff --git a/SOURCES/addrtranslate-sysv.patch b/SOURCES/addrtranslate-sysv.patch new file mode 100644 index 0000000..3de3a53 --- /dev/null +++ b/SOURCES/addrtranslate-sysv.patch @@ -0,0 +1,12 @@ +# workaround for https://github.com/dyninst/dyninst/issues/406 + +--- dyninst-9.3.2/common/src/addrtranslate-sysv.C.sv 2017-10-03 21:32:23.608614189 -0400 ++++ dyninst-9.3.2/common/src/addrtranslate-sysv.C 2017-10-03 21:33:36.538642148 -0400 +@@ -800,6 +800,7 @@ + continue; + } + if (obj_name == "linux-vdso.so.1" || ++ obj_name == "linux-vdso64.so.1" || + obj_name == "linux-gate.so.1") + { + continue; diff --git a/SPECS/dyninst.spec b/SPECS/dyninst.spec index 968ef67..46523df 100644 --- a/SPECS/dyninst.spec +++ b/SPECS/dyninst.spec @@ -4,7 +4,7 @@ Summary: An API for Run-time Code Generation License: LGPLv2+ Name: %{?scl_prefix}dyninst Group: Development/Libraries -Release: 1%{?dist} +Release: 3%{?dist} URL: http://www.dyninst.org Version: 9.3.2 Exclusiveos: linux @@ -18,6 +18,8 @@ Source0: https://github.com/dyninst/dyninst/archive/v%{version}/dyninst-%{versio Source1: https://github.com/dyninst/testsuite/archive/v9.3.0/testsuite-9.3.0.tar.gz Patch1: testsuite-9.3.0-junit-nullptr.patch +Patch2: addrtranslate-sysv.patch +Patch3: Object-elf.patch %global dyninst_base dyninst-%{version} # Explicit version since it does not match the source version @@ -100,6 +102,8 @@ making sure that dyninst works properly. %setup -q -T -D -a 1 %patch1 -p0 -b .template-export +%patch2 -p0 -b .sysv +%patch3 -p0 -b .objelf # XXX: bundled libdwarf %setup -q -T -D -b 3 @@ -158,8 +162,9 @@ rm -v %{buildroot}%{_docdir}/*-%{version}.pdf cd ../%{testsuite_base} make DESTDIR=$RPM_BUILD_ROOT install -mkdir -p $RPM_BUILD_ROOT/etc/ld.so.conf.d -echo "%{_libdir}/dyninst" > $RPM_BUILD_ROOT/etc/ld.so.conf.d/%{name}-%{_arch}.conf +# scl enable devtoolset sets LD_LIBRARY_PATH so this is no longer necessary +# mkdir -p $RPM_BUILD_ROOT/etc/ld.so.conf.d +# echo "%{_libdir}/dyninst" > $RPM_BUILD_ROOT/etc/ld.so.conf.d/%{name}-%{_arch}.conf # Ugly hack to mask testsuite files from debuginfo extraction. Running the # testsuite requires debuginfo, so extraction is useless. However, debuginfo @@ -168,8 +173,8 @@ echo "%{_libdir}/dyninst" > $RPM_BUILD_ROOT/etc/ld.so.conf.d/%{name}-%{_arch}.co find %{buildroot}%{_libdir}/dyninst/testsuite/ \ -type f '!' -name '*.a' -execdir chmod 644 '{}' '+' -%post -p /sbin/ldconfig -%postun -p /sbin/ldconfig +# %post -p /sbin/ldconfig +# %postun -p /sbin/ldconfig %files %defattr(-,root,root,-) @@ -180,7 +185,7 @@ find %{buildroot}%{_libdir}/dyninst/testsuite/ \ %doc %{dyninst_base}/COPYRIGHT %doc %{dyninst_base}/LGPL -%config(noreplace) /etc/ld.so.conf.d/* +# %config(noreplace) /etc/ld.so.conf.d/* %files doc %defattr(-,root,root,-) @@ -214,7 +219,14 @@ find %{buildroot}%{_libdir}/dyninst/testsuite/ \ %attr(644,root,root) %{_libdir}/dyninst/testsuite/*.a %changelog -* Fri Jun 09 2017 Stan Cox - 9.3.2 +* Thu Jan 04 2018 Stan Cox - 9.3.2-3 +- rhbz1503116 possible soname clashes between base rhel- and devtoolset- dyninst +- rhbz1538757 segfault with a glibc built with binutils-2.27: handle R_*_IRELATIVE + +* Thu Jan 04 2018 Stan Cox - 9.3.2-2 +- rhbz1503116 possible soname clashes between base rhel- and devtoolset- dyninst + +* Fri Jun 09 2017 Stan Cox - 9.3.2-1 - Rebase to 9.3.2 * Thu Sep 15 2016 Josh Stone - 9.2.0-4