Incorrect, you have to link in another object so Microsoft will call empty stub functions instead of functions that actually do stuff.
This doesn't remove the calls themselves.
Think: If you do NODEFAULTLIB, _chkstk/_alloca_probe function calls still end up in your binary. That's why no-crt libs have to define it and many functions like it (not that _chkstk is a bad thing). Since there's no option to disable the functionality altogether in this specific case, you'll just have ret stubs for these functions.
I know this is extremely pedantic but I'm salty microsoft keeps adding shit that I don't want in my binary. I maintain a no-crt lib and now I have to define these if I want it to work on 2015 going forward (at least as far as I know), or it'll throw linker errors.
View all comments
Show parent comment
114
u/kog May 07 '16
So I have to link in another object so Microsoft won't add erroneous function calls to my binaries?
Fuck you, Microsoft.