| 52 | |
| 53 | |
| 54 | bool RelocationHandler::GetRelocationInfoCallback( |
| 55 | void* ctxt, BNBinaryView* view, BNArchitecture* arch, BNRelocationInfo* result, size_t resultCount) |
| 56 | { |
| 57 | CallbackRef<RelocationHandler> handler(ctxt); |
| 58 | Ref<BinaryView> viewObj = new BinaryView(BNNewViewReference(view)); |
| 59 | Ref<Architecture> archObj = new CoreArchitecture(arch); |
| 60 | if (!result) |
| 61 | return false; |
| 62 | vector<BNRelocationInfo> resultVector(&result[0], &result[resultCount]); |
| 63 | bool success = handler->GetRelocationInfo(viewObj, archObj, resultVector); |
| 64 | for (size_t i = 0; i < resultCount; i++) |
| 65 | result[i] = resultVector[i]; |
| 66 | return success; |
| 67 | } |
| 68 | |
| 69 | |
| 70 | bool RelocationHandler::ApplyRelocationCallback( |
nothing calls this directly
no test coverage detected