Fix swbz22248, handle R_*_IRELATIV, swbz22004, ignore linux-vdso64.so.1
This commit is contained in:
parent
b7f87017d7
commit
44469eb607
29
Object-elf.patch
Normal file
29
Object-elf.patch
Normal file
@ -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<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)
|
12
addrtranslate-sysv.patch
Normal file
12
addrtranslate-sysv.patch
Normal file
@ -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;
|
@ -2,7 +2,7 @@ Summary: An API for Run-time Code Generation
|
|||||||
License: LGPLv2+
|
License: LGPLv2+
|
||||||
Name: dyninst
|
Name: dyninst
|
||||||
Group: Development/Libraries
|
Group: Development/Libraries
|
||||||
Release: 6%{?dist}
|
Release: 7%{?dist}
|
||||||
URL: http://www.dyninst.org
|
URL: http://www.dyninst.org
|
||||||
Version: 9.3.2
|
Version: 9.3.2
|
||||||
# Dyninst only has full support for a few architectures.
|
# Dyninst only has full support for a few architectures.
|
||||||
@ -15,6 +15,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
|
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: testsuite-9.3.0-junit-nullptr.patch
|
||||||
|
Patch2: addrtranslate-sysv.patch
|
||||||
|
Patch3: Object-elf.patch
|
||||||
|
|
||||||
%global dyninst_base dyninst-%{version}
|
%global dyninst_base dyninst-%{version}
|
||||||
# Explicit version since it does not match the source version
|
# Explicit version since it does not match the source version
|
||||||
@ -88,6 +90,8 @@ making sure that dyninst works properly.
|
|||||||
%setup -q -T -D -a 1
|
%setup -q -T -D -a 1
|
||||||
|
|
||||||
%patch1 -p0 -b.nullptr
|
%patch1 -p0 -b.nullptr
|
||||||
|
%patch2 -p0 -b.addrtrans
|
||||||
|
%patch3 -p0 -b.objelf
|
||||||
|
|
||||||
# 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
|
||||||
@ -181,6 +185,9 @@ find %{buildroot}%{_libdir}/dyninst/testsuite/ \
|
|||||||
%attr(644,root,root) %{_libdir}/dyninst/testsuite/*.a
|
%attr(644,root,root) %{_libdir}/dyninst/testsuite/*.a
|
||||||
|
|
||||||
%changelog
|
%changelog
|
||||||
|
* Wed Oct 04 2017 Stan Cox <scox@redhat.com> - 9.3.2-7
|
||||||
|
- Fix swbz22248, handle R_*_IRELATIV, swbz22004, ignore linux-vdso64.so.1
|
||||||
|
|
||||||
* Sun Aug 06 2017 Björn Esser <besser82@fedoraproject.org> - 9.3.2-6
|
* Sun Aug 06 2017 Björn Esser <besser82@fedoraproject.org> - 9.3.2-6
|
||||||
- Rebuilt for AutoReq cmake-filesystem
|
- Rebuilt for AutoReq cmake-filesystem
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user