From 43c3301e82574ca0b42be6961ffb5b260cfe49af Mon Sep 17 00:00:00 2001 From: Stan Cox Date: Jan 10 2022 19:15:28 +0000 Subject: Update to 12.0.1 --- diff --git a/.gitignore b/.gitignore index cbed005..b5ef857 100644 --- a/.gitignore +++ b/.gitignore @@ -27,3 +27,5 @@ /testsuite-11.0.0.tar.gz /dyninst-11.0.1.tar.gz /testsuite-11.0.1.tar.gz +/dyninst-12.0.1.tar.gz +/testsuite-12.0.0.tar.gz diff --git a/dyninst-11.0.1-aarch64.patch b/dyninst-11.0.1-aarch64.patch deleted file mode 100644 index 7e88331..0000000 --- a/dyninst-11.0.1-aarch64.patch +++ /dev/null @@ -1,63 +0,0 @@ -commit 874a73ea4 (HEAD -> master, upstream/master) -Author: Stan Cox -Date: Mon Nov 1 14:24:07 2021 -0400 - - Don't overflow aarch64 float register vector when setting used regs. (#1127) - - Do not include the subtype when setting a float register as a used register if the registerSlot vector would be exceeded, e.g. for a value like 0x400 (Q_REG/register 0). - ---- dyninst-11.0.1/dyninstAPI/src/inst-aarch64.C.orig -+++ dyninst-11.0.1/dyninstAPI/src/inst-aarch64.C -@@ -551,8 +551,13 @@ bool EmitterAARCH64::clobberAllFuncCall(registerSpace *rs, - rs->GPRs()[*itr]->beenUsed = true; - - std::set *fpRegs = callee->ifunc()->usedFPRs(); -- for(std::set::iterator itr = fpRegs->begin(); itr != fpRegs->end(); itr++) -- rs->FPRs()[*itr]->beenUsed = true; -+ for(std::set::iterator itr = fpRegs->begin(); itr != fpRegs->end(); itr++) { -+ if (*itr <= rs->FPRs().size()) -+ rs->FPRs()[*itr]->beenUsed = true; -+ else -+ // parse_func::calcUsedRegs includes the subtype; we only want the regno -+ rs->FPRs()[*itr & 0xff]->beenUsed = true; -+ } - } else { - for(int idx = 0; idx < rs->numGPRs(); idx++) - rs->GPRs()[idx]->beenUsed = true; -commit b2c892f55 -Author: Stan Cox -Date: Tue Oct 26 17:43:14 2021 -0400 - - Load callee's address when the callee and caller are in the same module (#1056) - - If the callee and caller are in the same module and pic is not - required then the callee's address can be loaded directly without - using a relocation. - ---- dyninst-11.0.0/dyninstAPI/src/inst-aarch64.C.orig -+++ dyninst-11.0.0/dyninstAPI/src/inst-aarch64.C -@@ -651,12 +651,14 @@ Register EmitterAARCH64::emitCall(opCode op, - - assert(gen.rs()); - -- //Address of function to call in scratch register -+ // Address of function to call in scratch register - Register scratch = gen.rs()->getScratchRegister(gen); - assert(scratch != REG_NULL && "cannot get a scratch register"); - gen.markRegDefined(scratch); - -- if (gen.addrSpace()->edit() != NULL) { -+ if (gen.addrSpace()->edit() != NULL -+ && (gen.func()->obj() != callee->obj() -+ || gen.addrSpace()->needsPIC())) { - // gen.as.edit() checks if we are in rewriter mode - Address dest = getInterModuleFuncAddr(callee, gen); - -@@ -666,7 +668,6 @@ Register EmitterAARCH64::emitCall(opCode op, - instruction insn; - insn.clear(); - INSN_SET(insn, 31, 31, 0); -- //INSN_SET(insn, 29, 30, disp & 0x3); - INSN_SET(insn, 28, 28, 1); - INSN_SET(insn, 5, 23, disp >> 2); - INSN_SET(insn, 0, 4, scratch); diff --git a/dyninst-11.0.1-dwarf.patch b/dyninst-11.0.1-dwarf.patch deleted file mode 100644 index f4b5f70..0000000 --- a/dyninst-11.0.1-dwarf.patch +++ /dev/null @@ -1,11 +0,0 @@ -Remove extraneous error messages of the form: - err message: .debug_loclists section missing - err message: invalid DWARF -which are repeated in some circumstances without adding useful context - ---- dyninst-11.0.1/symtabAPI/src/dwarfWalker.C.orig 2021-04-08 16:48:12.000000000 -0400 -+++ dyninst-11.0.1/symtabAPI/src/dwarfWalker.C 2021-04-27 12:48:55.643978425 -0400 -@@ -1858,1 +1858,1 @@ -- cerr << "err message: " << dwarf_errmsg(dwarf_errno()) << endl; -+ dwarf_printf("(0x%lx) Error while decoding location: %s\n", id(), dwarf_errmsg(dwarf_errno())); - diff --git a/dyninst-11.0.1-rosebc.patch b/dyninst-11.0.1-rosebc.patch deleted file mode 100644 index 989f4e7..0000000 --- a/dyninst-11.0.1-rosebc.patch +++ /dev/null @@ -1,11 +0,0 @@ -rhbz1973038 - ---- dyninst-11.0.1/dataflowAPI/src/RoseInsnFactory.C.orig 2021-06-09 15:54:21.753883619 -0400 -+++ dyninst-11.0.1/dataflowAPI/src/RoseInsnFactory.C 2021-06-23 14:17:37.854933719 -0400 -@@ -317,5 +317,5 @@ - // It looks like the ROSE semantics code will infer the target from - // the bo field. So, what is passed in as the third operands does not matter -- if(branch_target) { -+ if(branch_target || iapi_opcode == power_op_bc) { - rose_operands->append_operand(new SgAsmDoubleWordValueExpression(branch_target)); - } else if(power_op_bcctr == iapi_opcode) { diff --git a/dyninst.spec b/dyninst.spec index 24a3c0d..109acd4 100644 --- a/dyninst.spec +++ b/dyninst.spec @@ -2,21 +2,19 @@ Summary: An API for Run-time Code Generation License: LGPLv2+ Name: dyninst Group: Development/Libraries -Release: 4%{?dist} +Release: 1%{?dist} URL: http://www.dyninst.org -Version: 11.0.1 +Version: 12.0.1 ExclusiveArch: %{ix86} x86_64 ppc64le aarch64 +%define __testsuite_version 12.0.0 Source0: https://github.com/dyninst/dyninst/archive/v%{version}/dyninst-%{version}.tar.gz -Source1: https://github.com/dyninst/testsuite/archive/%{version}/testsuite-%{version}.tar.gz +Source1: https://github.com/dyninst/testsuite/archive/%{__testsuite_version}/testsuite-%{__testsuite_version}.tar.gz -Patch1: dyninst-11.0.1-dwarf.patch -Patch2: dyninst-11.0.1-rosebc.patch -Patch3: dyninst-11.0.1-aarch64.patch -Patch4: testsuite-11.0.1-386.patch +Patch1: rhbz2034662.patch %global dyninst_base dyninst-%{version} -%global testsuite_base testsuite-%{version} +%global testsuite_base testsuite-%{__testsuite_version} BuildRequires: gcc-c++ BuildRequires: elfutils-devel @@ -82,13 +80,10 @@ making sure that dyninst works properly. %setup -q -T -D -a 1 pushd %{dyninst_base} -%patch1 -p1 -b .386 -%patch2 -p1 -b .rose -%patch3 -p1 -b .aarch64 +%patch1 -p1 -b .2034662 popd pushd %{testsuite_base} -%patch4 -p1 -b .dwarf popd # cotire seems to cause non-deterministic gcc errors @@ -197,6 +192,9 @@ find %{buildroot}%{_libdir}/dyninst/testsuite/ \ %attr(644,root,root) %{_libdir}/dyninst/testsuite/*.a %changelog +* Mon Jan 10 2022 Stan Cox - 12.0.1-1 +- Update to 12.0.1 + * Tue Nov 09 2021 Stan Cox - 11.0.1-4 - Do not create reloc for aarch64 static calls diff --git a/rhbz2034662.patch b/rhbz2034662.patch new file mode 100644 index 0000000..7e9d6b5 --- /dev/null +++ b/rhbz2034662.patch @@ -0,0 +1,15 @@ +Remove interposed definition of _r_debug + +Previously there was a dynamic relocation against _r_debug in the loader which picked up the interposed definition, +but glibc now uses a direct internal hidden symbol reference and thus no longer updates the interposed object. + +--- dyninst-12.0.0/dyninstAPI_RT/src/RTlinux.c ++++ dyninst-12.0.0/dyninstAPI_RT/src/RTlinux.c +@@ -404,7 +404,6 @@ void dyninstTrapHandler(int sig, siginfo_t *sg, ucontext_t *context) + #if defined(cap_binary_rewriter) + + extern struct r_debug _r_debug; +-DLLEXPORT struct r_debug _r_debug __attribute__ ((weak)); + + /* Verify that the r_debug variable is visible */ + void r_debugCheck() { assert(_r_debug.r_map); } diff --git a/sources b/sources index a8d66c9..33751cd 100644 --- a/sources +++ b/sources @@ -1,2 +1,2 @@ -SHA512 (dyninst-11.0.1.tar.gz) = 9c439be0252edae0ed3fcfa05b38595b614a91b6627afa85db126df32d5c5de5dc9413a70caf52bee7ac2349d24947626f6370f0dbf19413916c39e01679444f -SHA512 (testsuite-11.0.1.tar.gz) = 3c671adb9fd7e1b7cc6374c45b3fe2325b725f9a2add300ae46d95f3169b75719fb912c536a609631ca3eaf1c632e3d32b93a3d8e5ae26f03f0611bc9226723a +SHA512 (dyninst-12.0.1.tar.gz) = 7827d4fa84ed15773e191b36612a3eab4e4b5451b1c645d0899056b831d7fdaa5b2ee439287ef0755d68f7d3a7882139f7d79b4a318700a676c3f0fc687482ad +SHA512 (testsuite-12.0.0.tar.gz) = 7e39b0e1f1a7687abebcf44c59124855d4128ce8820b6a31efa987441c1d94b19a315b208a7ef56c57e5ca91e12d5388f2cd8298791500a98ffa4d3790507f27 diff --git a/testsuite-11.0.1-386.patch b/testsuite-11.0.1-386.patch deleted file mode 100644 index 1a2467f..0000000 --- a/testsuite-11.0.1-386.patch +++ /dev/null @@ -1,15 +0,0 @@ ---- testsuite-11.0.1/CMakeLists.txt -+++ testsuite-11.0.1/CMakeLists.txt -@@ -111,7 +111,8 @@ - if(UNIX) - enable_language(ASM-ATT) -- if("${DYNINST_PLATFORM}" MATCHES "i386") -- enable_language(ASM_NASM) -- endif() -+# nasm/yasm are deprecated -+# if("${DYNINST_PLATFORM}" MATCHES "i386") -+# enable_language(ASM_NASM) -+# endif() - elseif(WIN32) - enable_language(ASM_MASM) -