File tree Expand file tree Collapse file tree 1 file changed +1
-9
lines changed
Expand file tree Collapse file tree 1 file changed +1
-9
lines changed Original file line number Diff line number Diff line change 77#include < omath/utility/pe_pattern_scan.hpp>
88#include < yail/yail.hpp>
99#include < fstream>
10- #define RELOC_FLAG32 (RelInfo ) ((RelInfo >> 0x0C ) == IMAGE_REL_BASED_HIGHLOW)
11- #define RELOC_FLAG64 (RelInfo ) ((RelInfo >> 0x0C ) == IMAGE_REL_BASED_DIR64)
12-
13- #ifdef _WIN64
14- #define RELOC_FLAG RELOC_FLAG64
15- #else
16- #define RELOC_FLAG RELOC_FLAG32
17- #endif
1810namespace
1911{
2012 // Resolve MSVC incremental-link jump stubs (ILT): E9 xx xx xx xx → target
@@ -233,7 +225,7 @@ namespace
233225 auto * info = reinterpret_cast <uint16_t *>(block + 1 );
234226 for (size_t i = 0 ; i < count; i++, info++)
235227 {
236- if (! RELOC_FLAG (*info))
228+ if ((*info >> 0x0C ) != IMAGE_REL_BASED_DIR64 ))
237229 continue ;
238230 auto * patch = reinterpret_cast <uintptr_t *>(local_image + block->VirtualAddress + (*info & 0xFFF ));
239231 *patch += delta;
You can’t perform that action at this time.
0 commit comments