the first two unresolved symbols can be solved by linking to bufferoverflowU.lib see http://blogs.msdn.com/nikolad/archive/2 ... 62214.aspxPOLINK: error: Unresolved external symbol '__security_cookie'
POLINK: error: Unresolved external symbol '@__security_check_cookie'
POLINK: error: Unresolved external symbol '__alloca_probe_16'
__alloca_probe_16 seems a bit more difficult, but found the answer here
http://www.interopsystems.com/tools/tm.aspx?m=7904
I had to remove the "C" but after that everything worked, however there's about 40k size increase by linking-in with the bufferoverflowU.libjerker_back wrote: my mistake - there is some magic about _alloca. It's there as is _alloca__probe, but not
_alloca_probe_8 and _alloca_probe_16.
So I made a new source file as this from alloca16.asm:
alloca_probe.cpp
Code: Select all
extern "C" void _chkstk(); //_alloca_probe_16 : 16 byte aligned alloca extern "C" void _alloca_probe_16() { __asm { push ecx lea ecx, [esp] + 8 ; TOS before entering this function sub ecx, eax ; New TOS and ecx, (16 - 1) ; Distance from 16 bit align (align down) add eax, ecx ; Increase allocation size sbb ecx, ecx ; ecx = 0xFFFFFFFF if size wrapped around or eax, ecx ; cap allocation size on wraparound pop ecx ; Restore ecx jmp _chkstk } } //alloca_8: 8 byte aligned alloca extern "C" void _alloca_probe_8() { __asm { push ecx lea ecx, [esp] + 8 ; TOS before entering this function sub ecx, eax ; New TOS and ecx, (8 - 1) ; Distance from 8 bit align (align down) add eax, ecx ; Increase allocation Size sbb ecx, ecx ; ecx = 0xFFFFFFFF if size wrapped around or eax, ecx ; cap allocation size on wraparound pop ecx ; Restore ecx jmp _chkstk } }
I am posting this just in case someone else runs into the same problems.

