Confirmed - it happens when there's a mix of "IAT"-related externals and "normal" externals ( the AddVectoredExceptionHandler prototype belongs to the latter ones, while the prototypes in WinInc are "IAT"-related ).
There's a simple fix in loadpe.c, function GenPETransferTable():
} else if( LinkState & HAVE_I86_CODE ) {
offset dest = FindIATSymAbsOff( sym );
/* jwlink: don't write jmp instruction if not referenced */
if (!(sym->info & SYM_REFERENCED ))
continue;
if ( FmtData.u.pe.win64 == 0 ) {
I386Jump.dest = dest;
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
Confirmed - it happens when there's a mix of "IAT"-related externals and "normal" externals ( the AddVectoredExceptionHandler prototype belongs to the latter ones, while the prototypes in WinInc are "IAT"-related ).
There's a simple fix in loadpe.c, function GenPETransferTable():