From c9dbb48365bf1a0c5c06daa2234e21e64d9bc2f7 Mon Sep 17 00:00:00 2001 From: Mark Rowe Date: Fri, 13 Feb 2026 18:33:54 -0800 Subject: [DSC] Correctly mark symbols as having local, global, or weak binding --- view/sharedcache/api/sharedcachecore.h | 20 +++++++++++++++----- 1 file changed, 15 insertions(+), 5 deletions(-) (limited to 'view/sharedcache/api/sharedcachecore.h') 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; -- cgit v1.3.1