For some reasons, I want to be able to fine tune the final executables generated for my C++ program – down to individual instructions. As I recall, GCC should generate some text assembler file as intermediate output before feeding it to the assembler for generating the final binary object file.
Is it possible for me to extract this assembler source, edit it programatically and feed this modified version to the final assembler for generating my custom object file? I am targeting the Windows platform.
Does MSVC++ support similar feature?
And if you wonder why, part of the reason is to prevent reverse engineering by including our custom polymorphic code generation logic. Another reason, is to create hidden identification within each copy distributed to customers in order to deter anyone cracking our protection and distributing his cracked version.
Take a look at the
-Sflag:Then make your fine tuning on
output.sand compile the final executable with: