commit
a2a38cdb7e
@ -1,30 +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)
|
||||
|
||||
@ -1,13 +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;
|
||||
|
||||
Binary file not shown.
@ -1,15 +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;
|
||||
|
||||
@ -1,24 +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));}
|
||||
|
||||
49
dyninst.spec
49
dyninst.spec
@ -1,28 +1,22 @@
|
||||
Name: dyninst
|
||||
License: LGPLv2+
|
||||
Release: 13
|
||||
Version: 9.3.2
|
||||
Release: 1
|
||||
Version: 10.1.0
|
||||
Summary: An API for Run-time Code Generation
|
||||
ExclusiveArch: x86_64
|
||||
|
||||
%global dyninst_base dyninst-%{version}
|
||||
%global testsuite_base testsuite-9.3.0
|
||||
%global testsuite_base testsuite-%{version}
|
||||
|
||||
URL: http://www.dyninst.org
|
||||
Source0: https://github.com/dyninst/dyninst/archive/v%{version}/dyninst-%{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
|
||||
Patch2: addrtranslate-sysv.patch
|
||||
Patch3: Object-elf.patch
|
||||
Patch4: dyninst-9.3.2-gcc8.patch
|
||||
Patch5: dyninst-9.3.2-glibc-rpc.patch
|
||||
Source1: https://github.com/dyninst/testsuite/archive/v%{version}/testsuite-%{version}.tar.gz
|
||||
|
||||
BuildRequires: cmake gcc-c++
|
||||
BuildRequires: binutils-devel boost-devel
|
||||
BuildRequires: elfutils-libelf-devel
|
||||
BuildRequires: libdwarf-devel >= 20111030
|
||||
BuildRequires: libtirpc-devel
|
||||
BuildRequires: elfutils-devel libxml2-devel
|
||||
BuildRequires: libtirpc-devel tbb tbb-devel
|
||||
|
||||
BuildRequires: gcc-gfortran glibc-static libstdc++-static nasm
|
||||
|
||||
@ -38,6 +32,7 @@ an executable file or library, known as static instrumentation.
|
||||
Summary: Header files, libraries and testsuite
|
||||
Requires: boost-devel glibc-static
|
||||
Requires: dyninst = %{version}-%{release}
|
||||
Requires: tbb-devel
|
||||
|
||||
%description devel
|
||||
dyninst-devel includes the C header files and libraries.
|
||||
@ -52,37 +47,39 @@ dyninst-doc contains API documentation for the Dyninst libraries.
|
||||
%setup -q -n %{name}-%{version} -c
|
||||
%setup -q -T -D -a 1
|
||||
|
||||
%patch1 -p0 -b.nullptr
|
||||
%patch2 -p0 -b.addrtrans
|
||||
%patch3 -p0 -b.objelf
|
||||
%patch4 -p1 -b.gcc8
|
||||
%patch5 -p1 -b.glibc-rpc
|
||||
|
||||
sed -i.cotire -e 's/USE_COTIRE true/USE_COTIRE false/' \
|
||||
%{dyninst_base}/cmake/shared.cmake
|
||||
|
||||
%build
|
||||
cd %{dyninst_base}
|
||||
|
||||
CFLAGS="$CFLAGS $RPM_OPT_FLAGS"
|
||||
LDFLAGS="$LDFLAGS $RPM_LD_FLAGS"
|
||||
CXXFLAGS="$CFLAGS"
|
||||
export CFLAGS CXXFLAGS LDFLAGS
|
||||
|
||||
%cmake \
|
||||
-DENABLE_STATIC_LIBS=1 \
|
||||
-DINSTALL_LIB_DIR:PATH=%{_libdir}/dyninst \
|
||||
-DINSTALL_INCLUDE_DIR:PATH=%{_includedir}/dyninst \
|
||||
-DINSTALL_CMAKE_DIR:PATH=%{_libdir}/cmake/Dyninst \
|
||||
-DCMAKE_BUILD_TYPE=None \
|
||||
-DCMAKE_SKIP_RPATH:BOOL=YES
|
||||
-DCMAKE_SKIP_RPATH:BOOL=YES \
|
||||
.
|
||||
%make_build
|
||||
|
||||
make DESTDIR=../install install
|
||||
find ../install -name '*.cmake' -execdir \
|
||||
sed -i -e 's!%{_prefix}!../install&!' '{}' '+'
|
||||
sed -i '/libtbb.so/ s/".*usr/"\/usr/' $PWD/../install%{_libdir}/cmake/Dyninst/commonTargets.cmake
|
||||
|
||||
cd ../%{testsuite_base}
|
||||
%cmake \
|
||||
-DDyninst_DIR:PATH=$PWD/../install%{_libdir}/cmake/Dyninst \
|
||||
-DINSTALL_DIR:PATH=%{_libdir}/dyninst/testsuite \
|
||||
-DCMAKE_BUILD_TYPE:STRING=Debug \
|
||||
-DCMAKE_SKIP_RPATH:BOOL=YES
|
||||
-DCMAKE_SKIP_RPATH:BOOL=YES \
|
||||
.
|
||||
%make_build
|
||||
|
||||
%install
|
||||
@ -104,6 +101,7 @@ find %{buildroot}%{_libdir}/dyninst/testsuite/ \
|
||||
%files
|
||||
%dir %{_libdir}/dyninst
|
||||
%{_libdir}/dyninst/*.so.*
|
||||
%{_libdir}/dyninst/libdyninstAPI_RT.so
|
||||
%config(noreplace) /etc/ld.so.conf.d/*
|
||||
|
||||
%files devel
|
||||
@ -115,10 +113,16 @@ find %{buildroot}%{_libdir}/dyninst/testsuite/ \
|
||||
%dir %{_libdir}/dyninst/testsuite/
|
||||
%attr(755,root,root) %{_libdir}/dyninst/testsuite/*[!a]
|
||||
%attr(644,root,root) %{_libdir}/dyninst/testsuite/*.a
|
||||
%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
|
||||
|
||||
%files help
|
||||
%doc %{dyninst_base}/COPYRIGHT
|
||||
%doc %{dyninst_base}/LGPL
|
||||
%doc %{dyninst_base}/LICENSE.md
|
||||
%doc %{dyninst_base}/dataflowAPI/doc/dataflowAPI.pdf
|
||||
%doc %{dyninst_base}/dynC_API/doc/dynC_API.pdf
|
||||
%doc %{dyninst_base}/dyninstAPI/doc/dyninstAPI.pdf
|
||||
@ -130,5 +134,8 @@ find %{buildroot}%{_libdir}/dyninst/testsuite/ \
|
||||
%doc %{dyninst_base}/symtabAPI/doc/symtabAPI.pdf
|
||||
|
||||
%changelog
|
||||
* Thu Jul 23 2020 jinzhimin <jinzhimin2@huawei.com> - 10.1.0-1
|
||||
- update to 10.1.0
|
||||
|
||||
* Mon Feb 24 2020 openEuler Buildteam <buildteam@openeuler.org> - 9.3.2-13
|
||||
- Package init
|
||||
|
||||
BIN
testsuite-10.1.0.tar.gz
Normal file
BIN
testsuite-10.1.0.tar.gz
Normal file
Binary file not shown.
@ -1,12 +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());
|
||||
|
||||
Binary file not shown.
Loading…
x
Reference in New Issue
Block a user