summaryrefslogtreecommitdiff
path: root/binaryninjaapi.h
diff options
context:
space:
mode:
authorRusty Wagner <rusty@vector35.com>2017-08-17 22:05:32 -0400
committerRusty Wagner <rusty@vector35.com>2017-08-17 22:31:55 -0400
commit78d90c30df96364cdc8dde1954be7341531cfe07 (patch)
treec854bc915a27485b9e8650f3916757f98f7ba00e /binaryninjaapi.h
parent5e25409d02479285d1f16d6cc55df1b267e9ba06 (diff)
Adding section semantics to deal with semantically read-only sections inside of writable areas
Diffstat (limited to 'binaryninjaapi.h')
-rw-r--r--binaryninjaapi.h9
1 files changed, 7 insertions, 2 deletions
diff --git a/binaryninjaapi.h b/binaryninjaapi.h
index 8213675d..8a09529e 100644
--- a/binaryninjaapi.h
+++ b/binaryninjaapi.h
@@ -1030,6 +1030,7 @@ namespace BinaryNinja
std::string linkedSection, infoSection;
uint64_t infoData;
uint64_t align, entrySize;
+ BNSectionSemantics semantics;
};
struct QualifiedNameAndType;
@@ -1159,6 +1160,8 @@ namespace BinaryNinja
bool IsOffsetWritable(uint64_t offset) const;
bool IsOffsetExecutable(uint64_t offset) const;
bool IsOffsetBackedByFile(uint64_t offset) const;
+ bool IsOffsetCodeSemantics(uint64_t offset) const;
+ bool IsOffsetWritableSemantics(uint64_t offset) const;
uint64_t GetNextValidOffset(uint64_t offset) const;
uint64_t GetStart() const;
@@ -1299,11 +1302,13 @@ namespace BinaryNinja
bool GetSegmentAt(uint64_t addr, Segment& result);
bool GetAddressForDataOffset(uint64_t offset, uint64_t& addr);
- void AddAutoSection(const std::string& name, uint64_t start, uint64_t length, const std::string& type = "",
+ void AddAutoSection(const std::string& name, uint64_t start, uint64_t length,
+ BNSectionSemantics semantics = DefaultSectionSemantics, const std::string& type = "",
uint64_t align = 1, uint64_t entrySize = 0, const std::string& linkedSection = "",
const std::string& infoSection = "", uint64_t infoData = 0);
void RemoveAutoSection(const std::string& name);
- void AddUserSection(const std::string& name, uint64_t start, uint64_t length, const std::string& type = "",
+ void AddUserSection(const std::string& name, uint64_t start, uint64_t length,
+ BNSectionSemantics semantics = DefaultSectionSemantics, const std::string& type = "",
uint64_t align = 1, uint64_t entrySize = 0, const std::string& linkedSection = "",
const std::string& infoSection = "", uint64_t infoData = 0);
void RemoveUserSection(const std::string& name);