import dyninst-10.1.0-2.el8

This commit is contained in:
CentOS Sources 2019-11-05 14:43:08 -05:00 committed by Andrew Lukoshko
parent a7dfbd857d
commit 54c922c897
11 changed files with 109 additions and 127 deletions

View File

@ -1,2 +1,2 @@
dbaf68ab57ab99d878cd87da3b5c7295e54d4c3f SOURCES/dyninst-9.3.2.tar.gz 02029d0224460f866f92ef54221efa37ee1ba164 SOURCES/dyninst-10.1.0.tar.gz
5463fcfe1a374b41c5b829d9eefbf0c050fdb63d SOURCES/testsuite-9.3.0.tar.gz cbafd2da77de24180cb9c2fb5b600fd8d2cb2fa1 SOURCES/testsuite-10.1.0.tar.gz

4
.gitignore vendored
View File

@ -1,2 +1,2 @@
SOURCES/dyninst-9.3.2.tar.gz SOURCES/dyninst-10.1.0.tar.gz
SOURCES/testsuite-9.3.0.tar.gz SOURCES/testsuite-10.1.0.tar.gz

View File

@ -1,29 +0,0 @@
# 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<Symbol *> funcs;
+ dyn_hash_map<std::string, std::vector<Symbol *> >::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)

View File

@ -1,12 +0,0 @@
# 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;

View File

@ -0,0 +1,28 @@
--- dyninst-10.1.0/dyninst-10.1.0/instructionAPI/h/Result.h.sv 2018-11-09 11:48:08.000000000 -0500
+++ dyninst-10.1.0/dyninst-10.1.0/instructionAPI/h/Result.h 2018-12-04 22:12:47.369579566 -0500
@@ -449,10 +449,10 @@
snprintf(hex, 20, "%x", val.s32val);
break;
case u64:
- snprintf(hex, 20, "%lx", val.u64val);
+ snprintf(hex, 20, "%" PRIx64, val.u64val);
break;
case s64:
- snprintf(hex, 20, "%lx", val.s64val);
+ snprintf(hex, 20, "%" PRIx64, val.s64val);
break;
case sp_float:
snprintf(hex, 20, "%f", val.floatval);
@@ -464,10 +464,10 @@
snprintf(hex, 20, "%x", val.bitval);
break;
case u48:
- snprintf(hex, 20, "%lx", val.s48val);
+ snprintf(hex, 20, "%" PRIx64, val.s48val);
break;
case s48:
- snprintf(hex, 20, "%lx", val.s48val);
+ snprintf(hex, 20, "%" PRIx64, val.s48val);
break;
case m512:
snprintf(hex, 20, "%p", val.m512val);

View File

@ -0,0 +1,11 @@
--- dyninst-10.1.0/dyninst-10.1.0/cmake/ThreadingBuildingBlocks.cmake.orig 2019-05-16 14:40:05.000000000 -0400
+++ dyninst-10.1.0/dyninst-10.1.0/cmake/ThreadingBuildingBlocks.cmake 2019-05-30 10:45:15.128872098 -0400
@@ -43,7 +43,7 @@
set(TBB_USE_DEBUG_BUILD OFF CACHE BOOL "Use debug versions of TBB libraries")
# Minimum version of TBB (assumes a dotted-decimal format: YYYY.XX)
-set(_tbb_min_version 2018.6)
+set(_tbb_min_version 2018.0)
set(TBB_MIN_VERSION ${_tbb_min_version} CACHE STRING "Minimum version of TBB (assumes a dotted-decimal format: YYYY.XX)")
if(${TBB_MIN_VERSION} VERSION_LESS ${_tbb_min_version})

View File

@ -1,14 +0,0 @@
diff -up dyninst-9.3.2/dyninst-9.3.2/symtabAPI/src/emitElf.C.me dyninst-9.3.2/dyninst-9.3.2/symtabAPI/src/emitElf.C
--- dyninst-9.3.2/dyninst-9.3.2/symtabAPI/src/emitElf.C.me 2018-02-07 15:50:36.706363500 +0100
+++ dyninst-9.3.2/dyninst-9.3.2/symtabAPI/src/emitElf.C 2018-02-07 16:30:28.173906877 +0100
@@ -2512,8 +2512,8 @@ void emitElf<ElfTypes>::createDynamicSec
if (!object->hasReldyn() && !object->hasReladyn()) {
if (object->getRelType() == Region::RT_REL) {
- new_dynamic_entries.push_back(make_pair(DT_REL, 0));
- new_dynamic_entries.push_back(make_pair(DT_RELSZ, 0));
+ new_dynamic_entries.push_back(std::pair<long, long>(DT_REL, 0));
+ new_dynamic_entries.push_back(std::pair<long, long>(DT_RELSZ, 0));
dynamicSecData[DT_REL].push_back(dynsecData + curpos);
dynsecData[curpos].d_tag = DT_NULL;

View File

@ -1,23 +0,0 @@
diff -up dyninst-9.3.2/dyninst-9.3.2/CMakeLists.txt.me dyninst-9.3.2/dyninst-9.3.2/CMakeLists.txt
--- dyninst-9.3.2/dyninst-9.3.2/CMakeLists.txt.me 2018-02-07 15:25:38.925763122 +0100
+++ dyninst-9.3.2/dyninst-9.3.2/CMakeLists.txt 2018-02-07 15:30:42.242099198 +0100
@@ -19,6 +19,7 @@ include (${DYNINST_ROOT}/cmake/shared.cm
configure_file(cmake/version.h.in common/h/version.h)
include_directories(${PROJECT_BINARY_DIR})
include_directories(${PROJECT_BINARY_DIR}/common/h)
+include_directories("/usr/include/tirpc/")
set (HEADER_DIRS common
dataflowAPI
dyninstAPI
diff -up dyninst-9.3.2/dyninst-9.3.2/common/src/linuxHeaders.h.me dyninst-9.3.2/dyninst-9.3.2/common/src/linuxHeaders.h
--- dyninst-9.3.2/dyninst-9.3.2/common/src/linuxHeaders.h.me 2018-02-07 15:06:45.961780668 +0100
+++ dyninst-9.3.2/dyninst-9.3.2/common/src/linuxHeaders.h 2018-02-07 15:38:56.832278338 +0100
@@ -281,7 +281,7 @@ inline bool_t P_xdr_string(XDR *x, char
inline void P_xdrrec_create(XDR *x, const u_int send_sz, const u_int rec_sz,
const caddr_t handle,
xdr_rd_func read_r, xdr_wr_func write_f) {
- xdrrec_create(x, send_sz, rec_sz, handle, (int(*)(char*, char*, int))read_r, (int(*)(char*, char*, int))write_f);}
+ xdrrec_create(x, send_sz, rec_sz, handle, (int(*)(void*, void*, int))read_r, (int(*)(void*, void*, int))write_f);}
inline bool_t P_xdrrec_endofrecord(XDR *x, int now) {
return (xdrrec_endofrecord(x, now));}
inline bool_t P_xdrrec_skiprecord(XDR *x) { return (xdrrec_skiprecord(x));}

View File

@ -0,0 +1,29 @@
--- dyninst-10.1.0/testsuite-10.1.0/src/instruction/test_instruction_farcall.C
+++ dyninst-10.1.0/testsuite-10.1.0/src/instruction/test_instruction_farcall.C
@@ -96,21 +96,21 @@ test_results_t test_instruction_farcall_Mutator::executeTest()
if(decodedInsns.size() != expectedInsns) // six valid, one invalid
{
logerror("FAILED: Expected %d instructions, decoded %d\n", expectedInsns, decodedInsns.size());
- for(std::vector<Instruction::Ptr>::iterator curInsn = decodedInsns.begin();
+ for(std::vector<Instruction>::iterator curInsn = decodedInsns.begin();
curInsn != decodedInsns.end();
++curInsn)
{
- logerror("\t%s\t", (*curInsn)->format().c_str());
- for(unsigned j = 0; j < (*curInsn)->size(); ++j)
+ logerror("\t%s\t", (*curInsn).format().c_str());
+ for(unsigned j = 0; j < (*curInsn).size(); ++j)
{
- logerror("%x ", (*curInsn)->rawByte(j));
+ logerror("%x ", (*curInsn).rawByte(j));
}
logerror("\n");
}
return FAILED;
}
- if(decodedInsns.back() && decodedInsns.back()->isValid())
+ if(decodedInsns.size() > 0 && decodedInsns.back().isValid())
{
logerror("FAILED: Expected instructions to end with an invalid instruction, but they didn't");
return FAILED;

View File

@ -1,11 +0,0 @@
--- testsuite-9.3.0/src/JUnitOutputDriver.cpp.nullptr 2016-12-19 14:55:38.000000000 -0800
+++ testsuite-9.3.0/src/JUnitOutputDriver.cpp 2017-02-15 11:19:22.628056889 -0800
@@ -35,7 +35,7 @@ void JUnitOutputDriver::startNewTest(std
{
std::stringstream suitename;
suitename << last_group->modname;
- if(last_group->mutatee != '\0') suitename << "." << last_group->mutatee;
+ if(last_group->mutatee != nullptr) suitename << "." << last_group->mutatee;
log(HUMAN, "<testsuite name=\"%s\" errors=\"%d\" skipped=\"%d\" tests=\"%d\" failures=\"%d\">\n",
suitename.str().c_str(), group_errors, group_skips, group_tests, group_failures);
log(HUMAN, group_output.str().c_str());

View File

@ -2,38 +2,32 @@ Summary: An API for Run-time Code Generation
License: LGPLv2+ License: LGPLv2+
Name: dyninst Name: dyninst
Group: Development/Libraries Group: Development/Libraries
Release: 12%{?dist} Release: 2%{?dist}
URL: http://www.dyninst.org URL: http://www.dyninst.org
Version: 9.3.2 Version: 10.1.0
# Dyninst only has full support for a few architectures. ExclusiveArch: %{ix86} x86_64 ppc64le aarch64
# It has some preliminary support for aarch64 and ppc64le,
# but we're waiting for those to be feature-complete.
ExclusiveArch: %{ix86} x86_64 ppc ppc64
Source0: https://github.com/dyninst/dyninst/archive/v%{version}/dyninst-%{version}.tar.gz Source0: https://github.com/dyninst/dyninst/archive/v%{version}/dyninst-%{version}.tar.gz
# Explicit version since it does not match the source version Source1: https://github.com/dyninst/testsuite/archive/v%{version}/testsuite-%{version}.tar.gz
Source1: https://github.com/dyninst/testsuite/archive/v9.3.0/testsuite-9.3.0.tar.gz
Patch1: testsuite-9.3.0-junit-nullptr.patch Patch1: dyninst-10.1.0-tbb.patch
Patch2: addrtranslate-sysv.patch Patch2: dyninst-10.1.0-result.patch
Patch3: Object-elf.patch Patch3: testsuite-10.1.0-386.patch
Patch4: dyninst-9.3.2-gcc8.patch
Patch5: dyninst-9.3.2-glibc-rpc.patch
%global dyninst_base dyninst-%{version} %global dyninst_base dyninst-%{version}
# Explicit version since it does not match the source version %global testsuite_base testsuite-%{version}
%global testsuite_base testsuite-9.3.0
BuildRequires: gcc-c++ BuildRequires: gcc-c++
BuildRequires: libdwarf-devel >= 20111030 BuildRequires: elfutils-devel
BuildRequires: elfutils-libelf-devel BuildRequires: elfutils-libelf-devel
BuildRequires: boost-devel BuildRequires: boost-devel
BuildRequires: binutils-devel BuildRequires: binutils-devel
BuildRequires: cmake BuildRequires: cmake
BuildRequires: libtirpc-devel BuildRequires: libtirpc-devel
BuildRequires: tbb tbb-devel
# Extra requires just for the testsuite # Extra requires just for the testsuite
BuildRequires: gcc-gfortran glibc-static libstdc++-static nasm BuildRequires: gcc-gfortran glibc-static libstdc++-static nasm libxml2-devel
# Testsuite files should not provide/require anything # Testsuite files should not provide/require anything
%{?filter_setup: %{?filter_setup:
@ -59,10 +53,11 @@ Group: Documentation
dyninst-doc contains API documentation for the Dyninst libraries. dyninst-doc contains API documentation for the Dyninst libraries.
%package devel %package devel
Summary: Header files for the compiling programs with Dyninst Summary: Header files for compiling programs with Dyninst
Group: Development/System Group: Development/System
Requires: dyninst = %{version}-%{release} Requires: dyninst = %{version}-%{release}
Requires: boost-devel Requires: boost-devel
Requires: tbb-devel
%description devel %description devel
dyninst-devel includes the C header files that specify the Dyninst user-space dyninst-devel includes the C header files that specify the Dyninst user-space
@ -92,11 +87,9 @@ making sure that dyninst works properly.
%setup -q -n %{name}-%{version} -c %setup -q -n %{name}-%{version} -c
%setup -q -T -D -a 1 %setup -q -T -D -a 1
%patch1 -p0 -b.nullptr %patch1 -p1 -b.tbb
%patch2 -p0 -b.addrtrans %patch2 -p1 -b.result
%patch3 -p0 -b.objelf %patch3 -p1 -b.386
%patch4 -p1 -b.gcc8
%patch5 -p1 -b.glibc-rpc
# cotire seems to cause non-deterministic gcc errors # cotire seems to cause non-deterministic gcc errors
# https://bugzilla.redhat.com/show_bug.cgi?id=1420551 # https://bugzilla.redhat.com/show_bug.cgi?id=1420551
@ -113,20 +106,24 @@ cd %{dyninst_base}
-DINSTALL_INCLUDE_DIR:PATH=%{_includedir}/dyninst \ -DINSTALL_INCLUDE_DIR:PATH=%{_includedir}/dyninst \
-DINSTALL_CMAKE_DIR:PATH=%{_libdir}/cmake/Dyninst \ -DINSTALL_CMAKE_DIR:PATH=%{_libdir}/cmake/Dyninst \
-DCMAKE_BUILD_TYPE=None \ -DCMAKE_BUILD_TYPE=None \
-DCMAKE_SKIP_RPATH:BOOL=YES -DCMAKE_SKIP_RPATH:BOOL=YES \
.
%make_build %make_build
# Hack to install dyninst nearby, so the testsuite can use it # Hack to install dyninst nearby, so the testsuite can use it
make DESTDIR=../install install make DESTDIR=../install install
find ../install -name '*.cmake' -execdir \ find ../install -name '*.cmake' -execdir \
sed -i -e 's!%{_prefix}!../install&!' '{}' '+' sed -i -e 's!%{_prefix}!../install&!' '{}' '+'
# cmake mistakenly looks for libtbb.so in the dyninst install dir
sed -i '/libtbb.so/ s/".*usr/"\/usr/' $PWD/../install%{_libdir}/cmake/Dyninst/commonTargets.cmake
cd ../%{testsuite_base} cd ../%{testsuite_base}
%cmake \ %cmake \
-DDyninst_DIR:PATH=$PWD/../install%{_libdir}/cmake/Dyninst \ -DDyninst_DIR:PATH=$PWD/../install%{_libdir}/cmake/Dyninst \
-DINSTALL_DIR:PATH=%{_libdir}/dyninst/testsuite \ -DINSTALL_DIR:PATH=%{_libdir}/dyninst/testsuite \
-DCMAKE_BUILD_TYPE:STRING=Debug \ -DCMAKE_BUILD_TYPE:STRING=Debug \
-DCMAKE_SKIP_RPATH:BOOL=YES -DCMAKE_SKIP_RPATH:BOOL=YES \
.
%make_build %make_build
%install %install
@ -144,22 +141,17 @@ cd ../%{testsuite_base}
mkdir -p %{buildroot}/etc/ld.so.conf.d mkdir -p %{buildroot}/etc/ld.so.conf.d
echo "%{_libdir}/dyninst" > %{buildroot}/etc/ld.so.conf.d/%{name}-%{_arch}.conf echo "%{_libdir}/dyninst" > %{buildroot}/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
# extraction is still nice for the main libraries, so we don't want to disable
# it package-wide. The permissions are restored by attr(755,-,-) in files.
find %{buildroot}%{_libdir}/dyninst/testsuite/ \
-type f '!' -name '*.a' -execdir chmod 644 '{}' '+'
%post -p /sbin/ldconfig %post -p /sbin/ldconfig
%postun -p /sbin/ldconfig %postun -p /sbin/ldconfig
%files %files
%dir %{_libdir}/dyninst %dir %{_libdir}/dyninst
%{_libdir}/dyninst/*.so.* %{_libdir}/dyninst/*.so.*
# dyninst mutators dlopen the runtime library
%{_libdir}/dyninst/libdyninstAPI_RT.so
%doc %{dyninst_base}/COPYRIGHT %doc %{dyninst_base}/COPYRIGHT
%doc %{dyninst_base}/LGPL %doc %{dyninst_base}/LICENSE.md
%config(noreplace) /etc/ld.so.conf.d/* %config(noreplace) /etc/ld.so.conf.d/*
@ -184,12 +176,23 @@ find %{buildroot}%{_libdir}/dyninst/testsuite/ \
%files testsuite %files testsuite
%{_bindir}/parseThat %{_bindir}/parseThat
%exclude %{_bindir}/cfg_to_dot
%exclude /usr/bin/codeCoverage
%exclude /usr/bin/unstrip
%exclude /usr/bin/ddb.db
%exclude /usr/bin/params.db
%exclude /usr/bin/unistd.db
%dir %{_libdir}/dyninst/testsuite/ %dir %{_libdir}/dyninst/testsuite/
# Restore the permissions that were hacked out above, during install.
%attr(755,root,root) %{_libdir}/dyninst/testsuite/*[!a] %attr(755,root,root) %{_libdir}/dyninst/testsuite/*[!a]
%attr(644,root,root) %{_libdir}/dyninst/testsuite/*.a %attr(644,root,root) %{_libdir}/dyninst/testsuite/*.a
%changelog %changelog
* Tue Jun 04 2019 Stan Cox <scox@redhat.com> - 10.1.0-2
- Use PRIx64 to fix i386 build
* Wed May 29 2019 Stan Cox <scox@redhat.com> - 10.1.0-1
- Update to 10.1.0
* Wed May 16 2018 Frank Ch. Eigler <fche@redhat.com> - 9.3.2-12 * Wed May 16 2018 Frank Ch. Eigler <fche@redhat.com> - 9.3.2-12
- Rebuild with newer boost. - Rebuild with newer boost.