From 2f9d3aae792b44b3cf4e444da3752c49690b4c27 Mon Sep 17 00:00:00 2001 From: Peter LaFosse Date: Fri, 17 Sep 2021 11:46:10 -0400 Subject: Raise an exception when attempting to write to memory which has a relocation --- binaryninjacore.h | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) (limited to 'binaryninjacore.h') diff --git a/binaryninjacore.h b/binaryninjacore.h index 68b2e2ee..2b24423f 100644 --- a/binaryninjacore.h +++ b/binaryninjacore.h @@ -2974,8 +2974,9 @@ __attribute__ ((format (printf, 1, 2))) uint64_t target, uint64_t reloc); BINARYNINJACOREAPI void BNDefineSymbolRelocation(BNBinaryView* view, BNArchitecture* arch, BNRelocationInfo* info, BNSymbol* target, uint64_t reloc); - BINARYNINJACOREAPI BNRange* BNGetRelocationRanges(BNBinaryView* segment, size_t* count); - BINARYNINJACOREAPI BNRange* BNGetRelocationRangesAtAddress(BNBinaryView* segment, uint64_t addr, size_t* count); + BINARYNINJACOREAPI BNRange* BNGetRelocationRanges(BNBinaryView* view, size_t* count); + BINARYNINJACOREAPI BNRange* BNGetRelocationRangesAtAddress(BNBinaryView* view, uint64_t addr, size_t* count); + BINARYNINJACOREAPI bool BNRangeContainsRelocation(BNBinaryView* view, uint64_t addr, size_t size); BINARYNINJACOREAPI void BNRegisterDataNotification(BNBinaryView* view, BNBinaryDataNotification* notify); BINARYNINJACOREAPI void BNUnregisterDataNotification(BNBinaryView* view, BNBinaryDataNotification* notify); @@ -5459,6 +5460,7 @@ __attribute__ ((format (printf, 1, 2))) BINARYNINJACOREAPI BNRange* BNSegmentGetRelocationRanges(BNSegment* segment, size_t* count); BINARYNINJACOREAPI uint64_t BNSegmentGetRelocationsCount(BNSegment* segment); BINARYNINJACOREAPI BNRange* BNSegmentGetRelocationRangesAtAddress(BNSegment* segment, uint64_t addr, size_t* count); + BINARYNINJACOREAPI bool BNSegmentRangeContainsRelocation(BNSegment* segment, uint64_t addr, size_t size); BINARYNINJACOREAPI void BNFreeRelocationRanges(BNRange* ranges); BINARYNINJACOREAPI uint64_t BNSegmentGetStart(BNSegment* segment); BINARYNINJACOREAPI uint64_t BNSegmentGetLength(BNSegment* segment); -- cgit v1.3.1