Say I have a simple nasm program to print hello!, of course in intel syntax, when I assemble it (with -f elf) and diassemble with with ndisasm it's completely different! why can it not disassemble back into the same simple format of my hello world program? is it not possible ?
+2
A:
If you are trying to recover the original source code from assemblies, forget about it. Especially with modern compilers that do a lot of optimizations.
From my experience with disassemblers, you can get some semi-readable code, but only when the program is relatively simple.
NullUserException
2010-08-15 03:36:06
I concur. Nasm performs so many efficiency tweaks before changing it all to hex that it just won't be disassembled that easily.
BT
2010-08-15 03:42:43