diff options
| author | Peter LaFosse <peter@vector35.com> | 2018-08-26 15:31:12 -0400 |
|---|---|---|
| committer | Peter LaFosse <peter@vector35.com> | 2018-08-26 15:31:12 -0400 |
| commit | fe925b01df7934785aa5dc67d23c577f13ad42e6 (patch) | |
| tree | 8a2e05c645c6be7dbc12897cb1a696f16066b8af /binaryninjaapi.h | |
| parent | 4fdd54f690e538ddb4e38248144ef3d3e0f817da (diff) | |
Add support for new constant type EXTERN_PTR
Diffstat (limited to 'binaryninjaapi.h')
| -rw-r--r-- | binaryninjaapi.h | 11 |
1 files changed, 8 insertions, 3 deletions
diff --git a/binaryninjaapi.h b/binaryninjaapi.h index 7b1e31ff..b6d41825 100644 --- a/binaryninjaapi.h +++ b/binaryninjaapi.h @@ -2417,6 +2417,7 @@ namespace BinaryNinja { BNRegisterValueType state; int64_t value; + int64_t offset; RegisterValue(); static RegisterValue FromAPIObject(const BNRegisterValue& value); @@ -2427,6 +2428,7 @@ namespace BinaryNinja { BNRegisterValueType state; int64_t value; + int64_t offset; std::vector<BNValueRange> ranges; std::set<int64_t> valueSet; std::vector<LookupTableEntry> table; @@ -3421,27 +3423,30 @@ namespace BinaryNinja BNRelocationInfo* result, size_t resultCount); static bool ApplyRelocationCallback(void* ctxt, BNBinaryView* view, BNArchitecture* arch, BNRelocation* reloc, uint8_t* dest, size_t len); - + static size_t GetOperandForExternalRelocationCallback(void* ctxt, const uint8_t* data, uint64_t addr, + size_t length, BNLowLevelILFunction* il, BNRelocation* relocation); protected: RelocationHandler(); RelocationHandler(BNRelocationHandler* handler); static void FreeCallback(void* ctxt); public: - virtual bool GetRelocationInfo(Ref<BinaryView> view, Ref<Architecture> arch, std::vector<BNRelocationInfo>& result); virtual bool ApplyRelocation(Ref<BinaryView> view, Ref<Architecture> arch, Ref<Relocation> reloc, uint8_t* dest, size_t len); + virtual size_t GetOperandForExternalRelocation(const uint8_t* data, uint64_t addr, size_t length, + Ref<LowLevelILFunction> il, Ref<Relocation> relocation); }; class CoreRelocationHandler: public RelocationHandler { public: CoreRelocationHandler(BNRelocationHandler* handler); - virtual bool GetRelocationInfo(Ref<BinaryView> view, Ref<Architecture> arch, std::vector<BNRelocationInfo>& result) override; virtual bool ApplyRelocation(Ref<BinaryView> view, Ref<Architecture> arch, Ref<Relocation> reloc, uint8_t* dest, size_t len) override; + virtual size_t GetOperandForExternalRelocation(const uint8_t* data, uint64_t addr, size_t length, + Ref<LowLevelILFunction> il, Ref<Relocation> relocation) override; }; class UpdateException: public std::exception |
