I have read several articles on the topic as this one and implemented most of the described techniques. But I also want to add some extra un-referenced/never-used code to the binary. Ideally I want to be able to add this code to the built binary through a tool. Is there such a tool? Any ideas on how to build such a tool? Or how to generate and add to my C++ program some never-used code? Where should I put it?
In an analysis of Skype internals I read that they mess the code as much as possible. One way of achieving it is to compute each call dynamically:
if ( sin(a) == 42 ) {
do_dummy_stuff () ;
}
Should I enter into the dummy function? Or is the dummy function the never-used code?
Update: the reason I want to add never-used code to the binary is because we ship many e-books. I want the binaries of each to be little different so if one is compromised, the others not to be (at least not right away).