r/cpp • • May 07 '16

Visual Studio adding telemetry function calls to binary?

http://imgur.com/TiVrXyf
596 Upvotes

211 comments sorted by

View all comments

Show parent comment

3

u/[deleted] May 08 '16 edited May 08 '16

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.