| 35 | return true; |
| 36 | } |
| 37 | static bool isTarget(const uint8_t *targets, size_t size, intptr_t offset) |
| 38 | { |
| 39 | if (offset < (intptr_t)sizeof(Elf64_Ehdr) || (size_t)offset >= size) |
| 40 | return false; |
| 41 | size_t i = (size_t)offset / 8; |
| 42 | size_t j = (size_t)offset % 8; |
| 43 | return ((targets[i] & (1 << j)) != 0); |
| 44 | } |
| 45 | |
| 46 | /* |
| 47 | * Get the bounds of a buffer assuming T-aligment. |