[DynInst_API:] [dyninst/dyninst] 63b06a: Add basic relocation functionality


Date: Mon, 30 Oct 2017 16:43:59 -0700
From: "Sasha @leela" <sasha@xxxxxxxxxxx>
Subject: [DynInst_API:] [dyninst/dyninst] 63b06a: Add basic relocation functionality
  Branch: refs/heads/arm64/feature/relocation
  Home:   https://github.com/dyninst/dyninst
  Commit: 63b06a62caec6eeff6f47a73e6826ff2b979b4ff
      https://github.com/dyninst/dyninst/commit/63b06a62caec6eeff6f47a73e6826ff2b979b4ff
  Author: Sunny Shah <shah28@xxxxxxxx>
  Date:   2017-08-31 (Thu, 31 Aug 2017)

  Changed paths:
    M dyninstAPI/src/Relocation/Transformers/Movement-adhoc.C
    M dyninstAPI/src/Relocation/Widgets/CFWidget-aarch64.C
    M dyninstAPI/src/codegen-aarch64.C
    M dyninstAPI/src/stackwalk-aarch64.C

  Log Message:
  -----------
  Add basic relocation functionality

The control flow widget for ARM64 contains a generic implementation to support
relocation: the implementation mostly mimics that for Power, differing
at the places where the "call" bit for a branch instruction needs to be
set/unset. The createStackwalkerSteppers() implementation in the stackwalking code
also mimics than on Power.

This commit does not touch all changes required to support relocation
but only a subset.


  Commit: 1933230b9002127f8e6630e9b6fb9f724243acd7
      https://github.com/dyninst/dyninst/commit/1933230b9002127f8e6630e9b6fb9f724243acd7
  Author: Sunny Shah <shah28@xxxxxxxx>
  Date:   2017-08-31 (Thu, 31 Aug 2017)

  Changed paths:
    M common/src/arch-aarch64.h
    M dyninstAPI/src/codegen-aarch64.C
    M dyninstAPI/src/codegen-aarch64.h

  Log Message:
  -----------
  Implemented generateBranch, generateCall and generateBranchViaTrap.
Also added stub for generateAddReg.


  Commit: 54f1973f3ce8619714cb4a6968a2ad129228a38d
      https://github.com/dyninst/dyninst/commit/54f1973f3ce8619714cb4a6968a2ad129228a38d
  Author: Sunny Shah <shah28@xxxxxxxx>
  Date:   2017-08-31 (Thu, 31 Aug 2017)

  Changed paths:
    M dyninstAPI/src/codegen-aarch64.C
    M dyninstAPI/src/codegen-aarch64.h
    M dyninstAPI/src/codegen-power.C
    M dyninstAPI/src/codegen-power.h
    M dyninstAPI/src/codegen-x86.h

  Log Message:
  -----------
  Removed definitions and declarations of
insnCodeGen::generateInterFunctionBranch for all architectures.

Reason: dead code.


  Commit: 7ff51c4291e0fd87a8a3fb3c439dc511808bae58
      https://github.com/dyninst/dyninst/commit/7ff51c4291e0fd87a8a3fb3c439dc511808bae58
  Author: Sunny Shah <shah28@xxxxxxxx>
  Date:   2017-08-31 (Thu, 31 Aug 2017)

  Changed paths:
    M common/src/arch-aarch64.h
    M dyninstAPI/src/Relocation/Widgets/CFWidget-aarch64.C
    M dyninstAPI/src/codegen-aarch64.C

  Log Message:
  -----------
  Codegen function changes to support the ARM CF Widget. These changes
involve the insnCodeGen::modify* calls.

Also added FIXME notes to the PPC CF widget for potential code areas
that may be deprecated and thus could be considered for update/removal.


  Commit: 3548b29e3cb2e61d066fd37cdb9118739424529f
      https://github.com/dyninst/dyninst/commit/3548b29e3cb2e61d066fd37cdb9118739424529f
  Author: Sunny Shah <shah28@xxxxxxxx>
  Date:   2017-08-31 (Thu, 31 Aug 2017)

  Changed paths:
    M common/src/arch-aarch64.h
    M dyninstAPI/src/codegen-aarch64.C
    M dyninstAPI/src/codegen-aarch64.h
    M dyninstAPI/src/codegen-power.C

  Log Message:
  -----------
  Completed implementation of modify*() functions for ARM codegen and
removed functions not currently required for the platform.


  Commit: 7ba4a02473107167be92f648d39b19f0da031cc4
      https://github.com/dyninst/dyninst/commit/7ba4a02473107167be92f648d39b19f0da031cc4
  Author: Sunny Shah <shah28@xxxxxxxx>
  Date:   2017-08-31 (Thu, 31 Aug 2017)

  Changed paths:
    M dyninstAPI/src/Relocation/Widgets/CFWidget-aarch64.C
    M dyninstAPI/src/codegen-aarch64.C
    M dyninstAPI/src/codegen-aarch64.h

  Log Message:
  -----------
  Adding back functions removed in last commit

The removal of the functions in the last commit caused several build
failures that will need the functions to be present. Keeping them in the
file while I resolve any dependencies and implement the required ones as
necessary.


  Commit: dbe89ba17d1c17f9bf66ab5136c1f791e4cd3b32
      https://github.com/dyninst/dyninst/commit/dbe89ba17d1c17f9bf66ab5136c1f791e4cd3b32
  Author: Sunny Shah <shah28@xxxxxxxx>
  Date:   2017-08-31 (Thu, 31 Aug 2017)

  Changed paths:
    M common/src/arch-aarch64.h
    M dyninstAPI/src/codegen-aarch64.C
    M dyninstAPI/src/codegen-aarch64.h
    M dyninstAPI/src/inst-aarch64.C

  Log Message:
  -----------
  Implemented generation of long branches for ARM64.

Long branch generation relies on loading an immediate into a 64-bit
register. This loading is peformed by a newly added function
insnCodeGen::generateMove() which generates one of the 3 move
instructions - MOVZ, MOVK and MOVN - based on the input arguments.

This commit also provides an implementation of the getEmitter() function
for ARM64, although the implementation of emitter methods for both the stat
and dyn versions of the emitter remains pending.


  Commit: 567308121ec40232a3bc825ac029b372332e31f5
      https://github.com/dyninst/dyninst/commit/567308121ec40232a3bc825ac029b372332e31f5
  Author: Sunny Shah <shah28@xxxxxxxx>
  Date:   2017-08-31 (Thu, 31 Aug 2017)

  Changed paths:
    M dyninstAPI/src/inst-aarch64.C
    M dyninstAPI/src/inst-aarch64.h
    M dyninstAPI/src/registerSpace.h

  Log Message:
  -----------
  Implemented initialization of register space for ARM64.

Initializes the GPRs, SPRs and FPRs, marking the appropriate ones as
off-limits.


  Commit: 965b58f079087637ea740d3d8a656221a0b5ba6e
      https://github.com/dyninst/dyninst/commit/965b58f079087637ea740d3d8a656221a0b5ba6e
  Author: Sunny Shah <shah28@xxxxxxxx>
  Date:   2017-08-31 (Thu, 31 Aug 2017)

  Changed paths:
    M dyninstAPI/src/inst-aarch64.h

  Log Message:
  -----------
  Update instrumentation/emitter macro definitions for ARM.


  Commit: 1993fb5e95c9709ea5209833c52b0fee83b4e83e
      https://github.com/dyninst/dyninst/commit/1993fb5e95c9709ea5209833c52b0fee83b4e83e
  Author: Itaru Kitayama <itaru.kitayama@xxxxxxxx>
  Date:   2017-08-31 (Thu, 31 Aug 2017)

  Changed paths:
    M common/src/arch-aarch64.h

  Log Message:
  -----------
  Fix build warning


  Commit: 1072ef1a9223f3fb092ac0f98ab0235c51ba92e8
      https://github.com/dyninst/dyninst/commit/1072ef1a9223f3fb092ac0f98ab0235c51ba92e8
  Author: Sunny Shah <shah28@xxxxxxxx>
  Date:   2017-08-31 (Thu, 31 Aug 2017)

  Changed paths:
    M common/src/arch-aarch64.h
    M dyninstAPI/src/codegen-aarch64.C
    M dyninstAPI/src/codegen-aarch64.h
    M dyninstAPI/src/inst-aarch64.C
    M dyninstAPI/src/inst-aarch64.h

  Log Message:
  -----------
  Implemented 32/64 bit memory access (store) instruction generation.

insnCodeGen::generateMemAccess32or64() for ARM generates a STR
instruction for storing/loading a single 32- or 64-bit value.

This function will also eventually generate the equivalent load (LDR)
    instruction.


  Commit: 290f09a9bec0e1431a5880d6b088865b770951c2
      https://github.com/dyninst/dyninst/commit/290f09a9bec0e1431a5880d6b088865b770951c2
  Author: Sunny Shah <shah28@xxxxxxxx>
  Date:   2017-08-31 (Thu, 31 Aug 2017)

  Changed paths:
    M dyninstAPI/src/codegen-aarch64.h

  Log Message:
  -----------
  The last commit, for whatever reason, did not add one header even though
it was given as an argument to git add. Adding it now.


  Commit: e18a865b6c82db2d5d653d91c55ca3fef0971cc9
      https://github.com/dyninst/dyninst/commit/e18a865b6c82db2d5d653d91c55ca3fef0971cc9
  Author: Sunny Shah <shah28@xxxxxxxx>
  Date:   2017-08-31 (Thu, 31 Aug 2017)

  Changed paths:
    M dyninstAPI/src/codegen-aarch64.C

  Log Message:
  -----------
  Add check for opcode of LDR-immediate (unsigned offset) variant in
insnCodeGen::generateMemAccess32or64().


  Commit: 6ae8ca466a0f274ed254f08f69e07dfaf81e73ca
      https://github.com/dyninst/dyninst/commit/6ae8ca466a0f274ed254f08f69e07dfaf81e73ca
  Author: Sunny Shah <shah28@xxxxxxxx>
  Date:   2017-08-31 (Thu, 31 Aug 2017)

  Changed paths:
    M common/src/arch-aarch64.h
    M dyninstAPI/src/inst-aarch64.C
    M dyninstAPI/src/inst-aarch64.h

  Log Message:
  -----------
  Implemented saveSPR() ans restoreSPR() for ARM and updated
special-purpose register stack-offset macros.


  Commit: 08f5eaaca07e1ac20a1dd99d3e02300e6830f63d
      https://github.com/dyninst/dyninst/commit/08f5eaaca07e1ac20a1dd99d3e02300e6830f63d
  Author: Sunny Shah <shah28@xxxxxxxx>
  Date:   2017-08-31 (Thu, 31 Aug 2017)

  Changed paths:
    M dyninstAPI/src/inst-aarch64.C
    M dyninstAPI/src/inst-aarch64.h

  Log Message:
  -----------
  Removed unneeded/redundant code for saving/restoring registers.


  Commit: e6f73ed8aeaa59048be1bcb0f5a3877deae074bd
      https://github.com/dyninst/dyninst/commit/e6f73ed8aeaa59048be1bcb0f5a3877deae074bd
  Author: Sunny Shah <shah28@xxxxxxxx>
  Date:   2017-08-31 (Thu, 31 Aug 2017)

  Changed paths:
    M common/src/arch-aarch64.h
    M dyninstAPI/src/emit-aarch64.h
    M dyninstAPI/src/inst-aarch64.C
    M dyninstAPI/src/inst-aarch64.h

  Log Message:
  -----------
  Moved all register saving/restoring functions to one of two new classes
and removed the definitions from the inst-aarch64 header.

This commit moves all functions that handle register saving/restoring
for the base tramp to one of two new classes: EmitterAARCH64SaveRegs and
EmitterAARCH64RestoreRegs. The class definitions go in the emit-aarch64
file with their implementation in the inst-aarch64 file.

baseTramp::generateSaves/generateRestores will have an instance of one
of these classes as appropriate and call only the public methods of the
class. None of the methods for saving/restoring individual regs are now
public: the only public methods are those that save/restore ALL
GPRs/FPRs/SPRs.


  Commit: 15178299db357ce8562360631007d5e525b56d7e
      https://github.com/dyninst/dyninst/commit/15178299db357ce8562360631007d5e525b56d7e
  Author: Sunny Shah <shah28@xxxxxxxx>
  Date:   2017-08-31 (Thu, 31 Aug 2017)

  Changed paths:
    M common/src/arch-aarch64.h
    M dyninstAPI/src/codegen-aarch64.C
    M dyninstAPI/src/codegen-aarch64.h

  Log Message:
  -----------
  Perform only post-indexed memory operations in
insnCodeGen::generateMemAccess32or64.


  Commit: 1a10490115a25be4ba0921e9879c2f7007a5d676
      https://github.com/dyninst/dyninst/commit/1a10490115a25be4ba0921e9879c2f7007a5d676
  Author: Sunny Shah <shah28@xxxxxxxx>
  Date:   2017-08-31 (Thu, 31 Aug 2017)

  Changed paths:
    M dyninstAPI/src/inst-aarch64.C
    M dyninstAPI/src/inst-aarch64.h

  Log Message:
  -----------
  Use enums added in codegen to specify type of memory operation
(load/store).


  Commit: 70dd3942c8f366e487f5051abd5ff0893e52059b
      https://github.com/dyninst/dyninst/commit/70dd3942c8f366e487f5051abd5ff0893e52059b
  Author: Sunny Shah <shah28@xxxxxxxx>
  Date:   2017-08-31 (Thu, 31 Aug 2017)

  Changed paths:
    M dyninstAPI/src/emit-aarch64.h
    M dyninstAPI/src/inst-aarch64.C

  Log Message:
  -----------
  Implemented baseTramp::generateSaves and baseTramp::generateRestores().

The logic for these methods is derived from our current logic on both
x86 and Power. Both of the above call the appropriate methods in
EmitterAARCH64SaveRegs/EmitterAARCH64RestoreRegs.


  Commit: 09d45b22a994ebd40289d46dc6eeb2ccb025b5ad
      https://github.com/dyninst/dyninst/commit/09d45b22a994ebd40289d46dc6eeb2ccb025b5ad
  Author: Sunny Shah <shah28@xxxxxxxx>
  Date:   2017-08-31 (Thu, 31 Aug 2017)

  Changed paths:
    M common/src/arch-aarch64.h
    M dyninstAPI/src/codegen-aarch64.C
    M dyninstAPI/src/codegen-aarch64.h

  Log Message:
  -----------
  Added method to generate an instruction to move a register to/from the
stack pointer.

This method uses the MOV(to/from SP) variant of the move instruction.


  Commit: 0bae3d08180a4147f4ba9702134dd7f01442cd1e
      https://github.com/dyninst/dyninst/commit/0bae3d08180a4147f4ba9702134dd7f01442cd1e
  Author: Sunny Shah <shah28@xxxxxxxx>
  Date:   2017-08-31 (Thu, 31 Aug 2017)

  Changed paths:
    M dyninstAPI/src/emit-aarch64.h
    M dyninstAPI/src/inst-aarch64.C

  Log Message:
  -----------
  Implemented stack frame creation and tear down functions.

This commit implements EmitterAARCH64SaveRegs::createFrame and
EmitterAARCH64RestoreRegs::tearFrame, mimicking the stack frame creation
and tear down functionality followed by ARM64 binaries. The check for
the link register in saveSPR/restoreSPR is also removed since the link
register will no longer be handled as a SPR.


  Commit: 3ca071fca9255ee5e37081cf177ef34b322c4103
      https://github.com/dyninst/dyninst/commit/3ca071fca9255ee5e37081cf177ef34b322c4103
  Author: Sunny Shah <shah28@xxxxxxxx>
  Date:   2017-08-31 (Thu, 31 Aug 2017)

  Changed paths:
    M dyninstAPI/src/emit-aarch64.h
    M dyninstAPI/src/inst-aarch64.C

  Log Message:
  -----------
  Implemented saveGPRegister(), saveFPRegisters() and saveFPRegisters() in
EmitterAARCH64SaveRegs.


  Commit: 4fefeac54690397faae65a495c3271bdc68c1e6b
      https://github.com/dyninst/dyninst/commit/4fefeac54690397faae65a495c3271bdc68c1e6b
  Author: Sunny Shah <shah28@xxxxxxxx>
  Date:   2017-08-31 (Thu, 31 Aug 2017)

  Changed paths:
    M common/src/arch-aarch64.h
    M dyninstAPI/src/codegen-aarch64.C
    M dyninstAPI/src/codegen-aarch64.h
    M dyninstAPI/src/emit-aarch64.h
    M dyninstAPI/src/inst-aarch64.C

  Log Message:
  -----------
  Added implementation for saveRegister() ans saveFPRegister() in
EmitterAARCH64SaveRegs.

This commit also adds a new method in codegen for ARM64 -
generateMemAccessFP() to store/load FP registers.


  Commit: 139425ffcae0f4b1c198009a1b7194e35d2e03ac
      https://github.com/dyninst/dyninst/commit/139425ffcae0f4b1c198009a1b7194e35d2e03ac
  Author: Itaru Kitayama <itaru.kitayama@xxxxxxxx>
  Date:   2017-08-31 (Thu, 31 Aug 2017)

  Changed paths:
    M common/src/arch-aarch64.h

  Log Message:
  -----------
  Add a macro MSROp


  Commit: 09e94983859d426cad0f790e1ac1b65436ad9322
      https://github.com/dyninst/dyninst/commit/09e94983859d426cad0f790e1ac1b65436ad9322
  Author: Sunny Shah <shah28@xxxxxxxx>
  Date:   2017-08-31 (Thu, 31 Aug 2017)

  Changed paths:
    M dyninstAPI/src/codegen-aarch64.h
    M dyninstAPI/src/emit-aarch64.h
    M dyninstAPI/src/inst-aarch64.C

  Log Message:
  -----------
  Fixed build errors.


  Commit: 5bc7df2e17721b66977cd083e032c43eff8271ae
      https://github.com/dyninst/dyninst/commit/5bc7df2e17721b66977cd083e032c43eff8271ae
  Author: Sunny Shah <shah28@xxxxxxxx>
  Date:   2017-08-31 (Thu, 31 Aug 2017)

  Changed paths:
    M common/src/arch-aarch64.h
    M dyninstAPI/src/codegen-aarch64.C
    M dyninstAPI/src/emit-aarch64.h
    M dyninstAPI/src/inst-aarch64.C
    M dyninstAPI/src/inst-aarch64.h

  Log Message:
  -----------
  More build fixes.

This commit fixes all pending, miscellaneous build errors on ARM.


  Commit: 357f5dfac7dad06d4175fa9953fbe76165403e83
      https://github.com/dyninst/dyninst/commit/357f5dfac7dad06d4175fa9953fbe76165403e83
  Author: Sunny Shah <shah28@xxxxxxxx>
  Date:   2017-08-31 (Thu, 31 Aug 2017)

  Changed paths:
    M dyninstAPI/src/inst-aarch64.C

  Log Message:
  -----------
  Implemented restoreRegister() and restoreFPRegister() in
EmitterAARCH64SaveRegs.


  Commit: ad0951222b114fb95444483554ad66eb53591bdd
      https://github.com/dyninst/dyninst/commit/ad0951222b114fb95444483554ad66eb53591bdd
  Author: Itaru Kitayama <itaru.kitayama@xxxxxxxx>
  Date:   2017-08-31 (Thu, 31 Aug 2017)

  Changed paths:
    M dyninstAPI/src/baseTramp.C

  Log Message:
  -----------
  Init bit array before it gets used


  Commit: 4e2a65c5cdf82da74696f299eda8e8a8d1860f62
      https://github.com/dyninst/dyninst/commit/4e2a65c5cdf82da74696f299eda8e8a8d1860f62
  Author: Itaru Kitayama <itaru.kitayama@xxxxxxxx>
  Date:   2017-08-31 (Thu, 31 Aug 2017)

  Changed paths:
    M dyninstAPI_RT/src/RTcommon.c

  Log Message:
  -----------
  Remove !arch_aarch64 guard in init function


  Commit: ebda5cd1e7840f8292f2d8916be6a58dc33ae8db
      https://github.com/dyninst/dyninst/commit/ebda5cd1e7840f8292f2d8916be6a58dc33ae8db
  Author: Itaru Kitayama <itaru.kitayama@xxxxxxxx>
  Date:   2017-08-31 (Thu, 31 Aug 2017)

  Changed paths:
    M dyninstAPI/src/inst-aarch64.C

  Log Message:
  -----------
  Fix run-time error


  Commit: 9ed19c796e102aeedc3af5d8ec81fa75ff63549f
      https://github.com/dyninst/dyninst/commit/9ed19c796e102aeedc3af5d8ec81fa75ff63549f
  Author: Itaru Kitayama <itaru.kitayama@xxxxxxxx>
  Date:   2017-08-31 (Thu, 31 Aug 2017)

  Changed paths:
    M common/src/arch-aarch64.h

  Log Message:
  -----------
  In ARMv8.2 or later extensions, address space can be configured
up to 52 bits. Add new defines, MAX_IMM52 and MIN_IMM52.


  Commit: e2f9d4cef90120d7fa9c5c17fce89b1645e71afc
      https://github.com/dyninst/dyninst/commit/e2f9d4cef90120d7fa9c5c17fce89b1645e71afc
  Author: Sunny Shah <shah28@xxxxxxxx>
  Date:   2017-08-31 (Thu, 31 Aug 2017)

  Changed paths:
    M dyninstAPI/src/Relocation/Widgets/RelDataWidget.C

  Log Message:
  -----------
  Added line to relocation log to indicate a failed application of rel
data patch.


  Commit: 05b5dd7b70a00b01e846298b3942c8a3b8802e6f
      https://github.com/dyninst/dyninst/commit/05b5dd7b70a00b01e846298b3942c8a3b8802e6f
  Author: Itaru Kitayama <itaru.kitayama@xxxxxxxx>
  Date:   2017-08-31 (Thu, 31 Aug 2017)

  Changed paths:
    M common/src/arch-aarch64.h
    M dyninstAPI/src/codegen-aarch64.C

  Log Message:
  -----------
  Use abs() instead of ABS macro


  Commit: eab7109b6c7d3be14164e5ee4dfd0eea89c77705
      https://github.com/dyninst/dyninst/commit/eab7109b6c7d3be14164e5ee4dfd0eea89c77705
  Author: Sunny Shah <shah28@xxxxxxxx>
  Date:   2017-08-31 (Thu, 31 Aug 2017)

  Changed paths:
    M dyninstAPI/src/inst-aarch64.C

  Log Message:
  -----------
  Implemented clobberAllFuncCall for ARM64.

The implementation follows the general pattern for other architectures: mark only definitely used registers as used if leaf function, else mark all as used.


  Commit: 63b55cba04442b67cb0e6930c7e9ac5639bedc56
      https://github.com/dyninst/dyninst/commit/63b55cba04442b67cb0e6930c7e9ac5639bedc56
  Author: Sunny Shah <shah28@xxxxxxxx>
  Date:   2017-08-31 (Thu, 31 Aug 2017)

  Changed paths:
    M common/src/arch-aarch64.h
    M dyninstAPI/src/codegen-aarch64.C
    M dyninstAPI/src/codegen-aarch64.h

  Log Message:
  -----------
  Codegen functions for ADD variants

Added two new codegen functions for the ADD (immediate) and ADD (shifted
register) variants of the ADD instruction for ARM64.


  Commit: 20a737aff91d188cff28721eda0db03ced241447
      https://github.com/dyninst/dyninst/commit/20a737aff91d188cff28721eda0db03ced241447
  Author: Sunny Shah <shah28@xxxxxxxx>
  Date:   2017-08-31 (Thu, 31 Aug 2017)

  Changed paths:
    M common/src/arch-aarch64.h
    M dyninstAPI/src/codegen-aarch64.C
    M dyninstAPI/src/codegen-aarch64.h
    M dyninstAPI/src/inst-aarch64.C

  Log Message:
  -----------
  Implemented plus, minus and times operation in emitImm for ARM64.

The plusOp, minusOp and timesOp cases for emitImm are implemented with
this commit. This also introduces three new methods in the codegen file:
* generateAddSubShifted - ADD/SUB (shifted variant)
* generateAddSubImmediate - ADD/SUB (immediate variant)
* generateMul - MUL


  Commit: 84682129169915934a23d031de07b1797b612118
      https://github.com/dyninst/dyninst/commit/84682129169915934a23d031de07b1797b612118
  Author: Sunny Shah <shah28@xxxxxxxx>
  Date:   2017-08-31 (Thu, 31 Aug 2017)

  Changed paths:
    M common/src/arch-aarch64.h
    M dyninstAPI/src/codegen-aarch64.C
    M dyninstAPI/src/codegen-aarch64.h
    M dyninstAPI/src/inst-aarch64.C

  Log Message:
  -----------
  Implemented or and and operations in emitImm for ARM64.

This commit implements the orOp and andOp cases for emitImm. Also
introduced a new function in codegen - generateBitwiseOpShifted - for
generating code for the shifted variants of the bitwise instructions AND, ORR and EOR.


  Commit: d406159544335a99de55b1825bf3424e5a884309
      https://github.com/dyninst/dyninst/commit/d406159544335a99de55b1825bf3424e5a884309
  Author: Sunny Shah <shah28@xxxxxxxx>
  Date:   2017-08-31 (Thu, 31 Aug 2017)

  Changed paths:
    M dyninstAPI/src/codegen-aarch64.C

  Log Message:
  -----------
  Added implementation for modifyData() in codegen.

modifyData for ARM deals with ADR/ADRP instructions which need to be
patched to a modified ADR/ADRP or to a bunch of move instructions.


  Commit: cf2f3349b7d94ef09b11fc9bd52a827aad47ea4b
      https://github.com/dyninst/dyninst/commit/cf2f3349b7d94ef09b11fc9bd52a827aad47ea4b
  Author: Sunny Shah <shah28@xxxxxxxx>
  Date:   2017-08-31 (Thu, 31 Aug 2017)

  Changed paths:
    M dyninstAPI/src/codegen-aarch64.C

  Log Message:
  -----------
  Differentiate modifyData() processing for ADR/ADRP variants and LDR/LDRSW variants.


  Commit: e9b9b4afad65e2a2d995e5aa5286364524a32196
      https://github.com/dyninst/dyninst/commit/e9b9b4afad65e2a2d995e5aa5286364524a32196
  Author: Sunny Shah <shah28@xxxxxxxx>
  Date:   2017-08-31 (Thu, 31 Aug 2017)

  Changed paths:
    M common/src/arch-aarch64.h
    M dyninstAPI/src/codegen-aarch64.C
    M dyninstAPI/src/codegen-aarch64.h
    M dyninstAPI/src/inst-aarch64.C

  Log Message:
  -----------
  Fixed modifyData logic for offset values beyond +/- 1 MB.

When the offset is <-1MB/>+1MB, the appropriate sequence of instructions
needs to be generated to keep the PC-relative data access intact. The
previous logic was using the incorrect values for loading into the
temporary registers before using those registers as indirect pointers
(in the LDR/LDRSW case). This is now fixed.


  Commit: 24e518485414dc77c899003357decdf65a7d6e68
      https://github.com/dyninst/dyninst/commit/24e518485414dc77c899003357decdf65a7d6e68
  Author: Sunny Shah <shah28@xxxxxxxx>
  Date:   2017-08-31 (Thu, 31 Aug 2017)

  Changed paths:
    M dyninstAPI/src/codegen-aarch64.C
    M instructionAPI/src/InstructionDecoder-aarch64.C

  Log Message:
  -----------
  Fixed offset calculation in modifyData for the ADRP instruction.


  Commit: a1fb3cc2f1dbb6f7122bc542510c49633226e24c
      https://github.com/dyninst/dyninst/commit/a1fb3cc2f1dbb6f7122bc542510c49633226e24c
  Author: Sunny Shah <shah28@xxxxxxxx>
  Date:   2017-08-31 (Thu, 31 Aug 2017)

  Changed paths:
    M dyninstAPI/src/codegen-aarch64.C

  Log Message:
  -----------
  Fixed conditional branch instruction generation for short displacements

For displacements that are in range in the modifyJCC function, only bits
5-23  of the instruction need to be modified to set the new
displacement. That way, all conditional instructions (B.cond, CBZ, CBNZ,
TBZ, TBNZ) are taken into account.


  Commit: 20c70b0fc5651c3890ba7bb97253854c11c87445
      https://github.com/dyninst/dyninst/commit/20c70b0fc5651c3890ba7bb97253854c11c87445
  Author: Sunny Shah <shah28@xxxxxxxx>
  Date:   2017-08-31 (Thu, 31 Aug 2017)

  Changed paths:
    M dyninstAPI/src/codegen-aarch64.C
    M dyninstAPI/src/inst-aarch64.C

  Log Message:
  -----------
  Fixes for runtime errors

Inlcudes fixes for two seg faults observed while testing relocation:
* createRegisterSpace needs to be called in initialize64.
* modifyData should also handle the literal variant of LDR in the SIMd set.


  Commit: c2c1beeac643196dd23f4e062808be21860320df
      https://github.com/dyninst/dyninst/commit/c2c1beeac643196dd23f4e062808be21860320df
  Author: Sunny Shah <shah28@xxxxxxxx>
  Date:   2017-08-31 (Thu, 31 Aug 2017)

  Changed paths:
    M dataflowAPI/src/ABI.C
    M dataflowAPI/src/RegisterMap.C
    M dataflowAPI/src/RegisterMap.h

  Log Message:
  -----------
  Implemented ABI initialization for ARM

intialize32 for ARM returns directly without doing anything. intialize64
contains the actual logic.


  Commit: 5724845c383877623af37af5556db17954caaa78
      https://github.com/dyninst/dyninst/commit/5724845c383877623af37af5556db17954caaa78
  Author: Sunny Shah <shah28@xxxxxxxx>
  Date:   2017-08-31 (Thu, 31 Aug 2017)

  Changed paths:
    M dataflowAPI/src/ABI.C

  Log Message:
  -----------
  Fixed ABI array intialization for ARM


  Commit: 3d8f78fcb29edff4e573d08e05e2f8db7c46c603
      https://github.com/dyninst/dyninst/commit/3d8f78fcb29edff4e573d08e05e2f8db7c46c603
  Author: Sunny Shah <shah28@xxxxxxxx>
  Date:   2017-08-31 (Thu, 31 Aug 2017)

  Changed paths:
    M dyninstAPI/src/Relocation/Widgets/PCWidget.C
    M dyninstAPI/src/codegen-aarch64.C
    M dyninstAPI/src/codegen-aarch64.h
    M dyninstAPI/src/inst-aarch64.C

  Log Message:
  -----------
  Implemented IP patch application for ARM.

Updated IPPatch::apply for ARM. Most of the complexity required on Power is avoided here since we have an instruction available (ADR) to get the current PC.
Also updated moveValueToReg in insnCodeGen to accept a vector of registers to be excluded when getting a scratch register.


  Commit: 61069b848092dac5d85618cf79bd6d552a4a1ed1
      https://github.com/dyninst/dyninst/commit/61069b848092dac5d85618cf79bd6d552a4a1ed1
  Author: Sunny Shah <shah28@xxxxxxxx>
  Date:   2017-08-31 (Thu, 31 Aug 2017)

  Changed paths:
    M dataflowAPI/src/ABI.C
    M dyninstAPI/src/Relocation/Widgets/RelDataWidget.C
    M dyninstAPI/src/Relocation/Widgets/RelDataWidget.h

  Log Message:
  -----------
  Set register space in RelDataPatch

The register space for the codeGen object used in RelDataPatch needs to be set before it is passed to insnCodeGen, since the latter uses it when getting a scratch register.

If the codeGen point in RelDataPatch is null, a new point needs to be generated referencing the previous instruction. This requires pointers to the function and block instances. To store these pointe
ers from RelDataWidget, two new fields (and their setters) are added to RelDataPatch.


  Commit: 468ea91b3f565dee2135822ea69d7eff61c35d36
      https://github.com/dyninst/dyninst/commit/468ea91b3f565dee2135822ea69d7eff61c35d36
  Author: Sunny Shah <shah28@xxxxxxxx>
  Date:   2017-08-31 (Thu, 31 Aug 2017)

  Changed paths:
    M dyninstAPI/src/linux.C

  Log Message:
  -----------
  Call the right region_* methods for ARM.


  Commit: 14476a81c14d112bb670a7c9ad0eb3064df9f9cb
      https://github.com/dyninst/dyninst/commit/14476a81c14d112bb670a7c9ad0eb3064df9f9cb
  Author: Sunny Shah <shah28@xxxxxxxx>
  Date:   2017-08-31 (Thu, 31 Aug 2017)

  Changed paths:
    M dyninstAPI/src/codegen-aarch64.C

  Log Message:
  -----------
  Updated comment for modifyJcc


  Commit: 25028b791270f2f7a55b07aed564060063829fc8
      https://github.com/dyninst/dyninst/commit/25028b791270f2f7a55b07aed564060063829fc8
  Author: Sasha @leela <sasha@xxxxxxxxxxx>
  Date:   2017-10-30 (Mon, 30 Oct 2017)

  Changed paths:
    M dyninstAPI/src/ast.C
    M parseAPI/src/SymtabCodeSource.C
    M symtabAPI/h/Symtab.h
    M symtabAPI/src/Object-elf.C
    M symtabAPI/src/emitElfStatic.C
    M symtabAPI/src/relocationEntry-elf-aarch64.C
    M symtabAPI/src/relocationEntry-elf-x86.C

  Log Message:
  -----------
  Fixing some relocation issues: object-elf relocation type of sections and AARCH64 relocation entry category.


Compare: https://github.com/dyninst/dyninst/compare/878864514426...25028b791270
[← Prev in Thread] Current Thread [Next in Thread→]
  • [DynInst_API:] [dyninst/dyninst] 63b06a: Add basic relocation functionality, Sasha @leela <=