I'm using macros in MASM to generate about 2000 functions, for each of which I define a string, but I only use around ~30 of them in any given program.
(There is no way to predict which ones I will use ahead of time; I use them as needed.)
Is there any way to tell the linker to "strip out" the strings that I don't end up using? They blow up the binary size by quite a lot.
Why don't you just put those 2000 functions and strings into a static library? Make the procs public, and use externdef for the strings, then when you link your exe to the lib, the linker will only pull in the strings and procs that are used.