diff options
| author | Peter LaFosse <peter@vector35.com> | 2018-07-11 20:46:46 -0400 |
|---|---|---|
| committer | Peter LaFosse <peter@vector35.com> | 2018-07-11 20:46:46 -0400 |
| commit | c6662cbce926c304eef3e4c80429fb66e38ca252 (patch) | |
| tree | 5abd9f9c20aebe125fd432a90db13b6afa5383c1 /binaryview.cpp | |
| parent | b35c7de12f675237655565e26a25c290e04e7dab (diff) | |
Add APIs for getting the underlying symbol from a relocation
Diffstat (limited to 'binaryview.cpp')
| -rw-r--r-- | binaryview.cpp | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/binaryview.cpp b/binaryview.cpp index 7aa2118f..6e5c3b14 100644 --- a/binaryview.cpp +++ b/binaryview.cpp @@ -2230,6 +2230,15 @@ uint64_t Relocation::GetReloc() const } +Ref<Symbol> Relocation::GetSymbol() const +{ + BNSymbol* sym = BNRelocationGetSymbol(m_object); + if (!sym) + return nullptr; + return new Symbol(sym); +} + + BinaryData::BinaryData(FileMetadata* file): BinaryView(BNCreateBinaryDataView(file->GetObject())) { } |
