a way to solve error LNK2001: unresolved external symbol ___security_cookie

we will meet the link error when build driver with recent ddk/wdk,even we disabled /GS or used /GS-

1>ntoskrnl.lib(loadcfg.obj) : error LNK2001: unresolved external symbol ___security_cookie

1.  add BufferOverflowK.lib to reference lib

I think if we included this lin,why don’t us enable /GS?

the linker will use the GsDriverEntry once we add the lib even we don’t use the /GS feature.I don’t want any one byte that I don’t want apperas in the final binary.

2. add one line code: int __security_cookie=__LINE__;

by this way,we can solved the LNK2001 error without add more library reference.

how about this method?

Advertisements

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s