summaryrefslogtreecommitdiff
path: root/view/sharedcache/api/sharedcachecore.h
diff options
context:
space:
mode:
authorMark Rowe <mark@vector35.com>2026-02-13 18:33:54 -0800
committerMark Rowe <mark@vector35.com>2026-02-13 19:42:13 -0800
commitc9dbb48365bf1a0c5c06daa2234e21e64d9bc2f7 (patch)
treedd476df611f5d74590d48afb869896670a8f560c /view/sharedcache/api/sharedcachecore.h
parente2feac85c58785640a2760f137a44c08ef953931 (diff)
[DSC] Correctly mark symbols as having local, global, or weak binding
Diffstat (limited to 'view/sharedcache/api/sharedcachecore.h')
-rw-r--r--view/sharedcache/api/sharedcachecore.h20
1 files changed, 15 insertions, 5 deletions
diff --git a/view/sharedcache/api/sharedcachecore.h b/view/sharedcache/api/sharedcachecore.h
index 1324fe16..f8e9c48b 100644
--- a/view/sharedcache/api/sharedcachecore.h
+++ b/view/sharedcache/api/sharedcachecore.h
@@ -27,9 +27,10 @@ extern "C"
{
#endif
- // binaryninjacore.h is not included so we must duplicate enum types here.
+ // binaryninjacore.h is not included so we must duplicate enum types here.
+ // TODO: Why isn't it?!
#ifdef BN_TYPE_PARSER
- typedef enum BNSegmentFlag
+ enum BNSegmentFlag : uint8_t
{
SegmentExecutable = 1,
SegmentWritable = 2,
@@ -38,9 +39,9 @@ extern "C"
SegmentContainsCode = 0x10,
SegmentDenyWrite = 0x20,
SegmentDenyExecute = 0x40
- } BNSegmentFlag;
+ };
- typedef enum BNSymbolType
+ enum BNSymbolType : uint8_t
{
FunctionSymbol = 0,
ImportAddressSymbol = 1,
@@ -51,7 +52,15 @@ extern "C"
LibraryFunctionSymbol = 6,
SymbolicFunctionSymbol = 7,
LocalLabelSymbol = 8,
- } BNSymbolType;
+ };
+
+ enum BNSymbolBinding : uint8_t
+ {
+ NoBinding = 0,
+ LocalBinding = 1,
+ GlobalBinding = 2,
+ WeakBinding = 3,
+ };
#endif
typedef struct BNBinaryView BNBinaryView;
@@ -105,6 +114,7 @@ extern "C"
typedef struct BNSharedCacheSymbol {
BNSymbolType symbolType;
+ BNSymbolBinding symbolBinding;
uint64_t address;
char* name;
} BNSharedCacheSymbol;