| 12 | |
| 13 | |
| 14 | Ref<Symbol> GetRealSymbol(BinaryView *view, uint64_t relocAddr, uint64_t symAddr) |
| 15 | { |
| 16 | if (view->IsOffsetExternSemantics(symAddr)) |
| 17 | { |
| 18 | // Because bases in the extern section are not 8 byte width only they will |
| 19 | // overlap with other externs, until https://github.com/Vector35/binaryninja-api/issues/6387 is fixed. |
| 20 | // Check relocation at objectAddr for symbol |
| 21 | for (const auto& r : view->GetRelocationsAt(relocAddr)) |
| 22 | if (auto relocSym = r->GetSymbol()) |
| 23 | return relocSym; |
| 24 | } |
| 25 | |
| 26 | return view->GetSymbolByAddress(symAddr); |
| 27 | } |
| 28 | |
| 29 | |
| 30 | // Some fields are not always u32, use this if it goes from u32 -> u16 on 32bit |
no test coverage detected