On May 30, 12:57 pm, "JohnQ" <
[email protected]>
wrote:
Plenty of people. Most C++ compilers support a debug (non-optimised)
and release (optimised) mode.
That's interesting. None of the compilers I use (Sun CC, g++
and VC++) have such a simplistic division. They all have a
fairly complicated list of options concerning optimization:
several levels of optimization, and the possibility to turn off
or on specific optimizations, regardless of the level.
So you automatically get optimisation
turned on in release mode even if you aren't aware of it.
With the three compilers mentionned above, you get what you
asked for. Generally, in the places I've worked, we've not
turned on optimization in released code unless we needed it. (A
lot of applications, even today, are IO bound, and it makes no
sense to turn on optimization in such cases. But for those
which aren't...)
Optimisation
can make a huge difference to runtime performance, even on todays
machines.
Especially on today's machines

.
Of course, even in release mode you may have some debug code
in there.
Generally they are not visible in non-debug, stripped code. Your OS
might differ in the stripping utilities provided. Eg Unix strip
generally does more than MS Windows.
Another important issue is the use of dynamically loaded code.
The symbols needed to link it must remain present.
Also, I'm not too sure just what strip actually does. If I run
it on an executable, after, nm shows no symbols. But if I do
strings on the executable, I still find all of the names.
The real question, of course, is why you'd want to obfuscate to
begin with. The current trend seems to be in the other
direction---more and more companies are delivering the sources
with the product, or at least making them available. (Of
course, in many cases, the quality of the code is such that one
could consider the actual sources obfuscation.)