diff options
| author | Peter LaFosse <peter@vector35.com> | 2018-05-11 13:37:48 -0400 |
|---|---|---|
| committer | Peter LaFosse <peter@vector35.com> | 2018-05-11 13:37:48 -0400 |
| commit | a7524ae957f62fded3991152a360c553c99639b6 (patch) | |
| tree | 1a6370a9ac9430286929d5dd13e5c387a31599d8 /binaryninjacore.h | |
| parent | 40930128dc95f6cb8a9f2c1a4ce098fd15ae02ef (diff) | |
Simplify relocation handlers
Diffstat (limited to 'binaryninjacore.h')
| -rw-r--r-- | binaryninjacore.h | 17 |
1 files changed, 4 insertions, 13 deletions
diff --git a/binaryninjacore.h b/binaryninjacore.h index 202684a8..f3b34a1d 100644 --- a/binaryninjacore.h +++ b/binaryninjacore.h @@ -1052,10 +1052,7 @@ extern "C" bool (*isRelocatable)(void* ctxt); size_t (*getAddressSize)(void* ctxt); bool (*save)(void* ctxt, BNFileAccessor* accessor); - void (*defineRelocation) (void* ctxt, BNArchitecture* arch, BNRelocationInfo* info, BNSymbol* sym, - uint64_t symOffset, BNSegment* seg, uint64_t segOffset); - void (*defineSectionRelocation) (void* ctxt, BNArchitecture* arch, BNRelocationInfo* info, BNSection* sec, - uint64_t secOffset, BNSegment* seg, uint64_t segOffset); + void (*defineRelocation) (void* ctxt, BNArchitecture* arch, BNRelocationInfo* info, uint64_t target, uint64_t reloc); }; struct BNCustomBinaryViewType @@ -1995,9 +1992,7 @@ extern "C" BINARYNINJACOREAPI bool BNSaveToFile(BNBinaryView* view, BNFileAccessor* file); BINARYNINJACOREAPI bool BNSaveToFilename(BNBinaryView* view, const char* filename); BINARYNINJACOREAPI void BNDefineRelocation(BNBinaryView* view, BNArchitecture* arch, BNRelocationInfo* info, - BNSymbol* sym, uint64_t symOffset, BNSegment* seg, uint64_t segOffset); - BINARYNINJACOREAPI void BNDefineSectionRelocation(BNBinaryView* view, BNArchitecture* arch, BNRelocationInfo* info, - BNSection* sec, uint64_t secOffset, BNSegment* seg, uint64_t segOffset); + uint64_t target, uint64_t reloc); BINARYNINJACOREAPI void BNRegisterDataNotification(BNBinaryView* view, BNBinaryDataNotification* notify); BINARYNINJACOREAPI void BNUnregisterDataNotification(BNBinaryView* view, BNBinaryDataNotification* notify); @@ -3516,12 +3511,8 @@ extern "C" BINARYNINJACOREAPI void BNFreeRelocation(BNRelocation* reloc); BINARYNINJACOREAPI BNRelocationInfo BNRelocationGetInfo(BNRelocation* reloc); BINARYNINJACOREAPI BNArchitecture* BNRelocationGetArchitecture(BNRelocation* reloc); - BINARYNINJACOREAPI BNSymbol* BNRelocationGetSymbol(BNRelocation* reloc); - BINARYNINJACOREAPI uint64_t BNRelocationGetSymbolOffset(BNRelocation* reloc); - BINARYNINJACOREAPI uint64_t BNRelocationGetTargetAddress(BNRelocation* reloc); - BINARYNINJACOREAPI BNSegment* BNRelocationGetSegment(BNRelocation* reloc); - BINARYNINJACOREAPI uint64_t BNRelocationGetSegmentOffset(BNRelocation* reloc); - BINARYNINJACOREAPI uint64_t BNRelocationGetDestAddress(BNRelocation* reloc); + BINARYNINJACOREAPI uint64_t BNRelocationGetTarget(BNRelocation* reloc); + BINARYNINJACOREAPI uint64_t BNRelocationGetReloc(BNRelocation* reloc); // Segment object methods BINARYNINJACOREAPI BNSegment* BNCreateSegment(uint64_t start, uint64_t length, uint64_t dataOffset, uint64_t dataLength, uint32_t flags, |
