| 1379 | |
| 1380 | |
| 1381 | uint64_t COFFView::RVAToFileOffset(uint64_t offset, bool except) |
| 1382 | { |
| 1383 | for (auto& i : m_sections) |
| 1384 | { |
| 1385 | if ((offset >= i.virtualAddress) && |
| 1386 | (offset < (i.virtualAddress + i.sizeOfRawData)) && (i.virtualSize != 0)) |
| 1387 | { |
| 1388 | uint64_t progOfs = offset - i.virtualAddress; |
| 1389 | return i.pointerToRawData + progOfs; |
| 1390 | } |
| 1391 | } |
| 1392 | |
| 1393 | if (!except) |
| 1394 | return offset; |
| 1395 | |
| 1396 | throw COFFFormatException("encountered invalid offset"); |
| 1397 | } |
| 1398 | |
| 1399 | |
| 1400 | uint32_t COFFView::GetRVACharacteristics(uint64_t offset) |
nothing calls this directly
no test coverage detected