Windows Linux , , 0 2 ^ 32-1 ( 32- ) 2 ^ 64-1 ( 64- ). , . , , - .
, ELF, Linux, . , , ++.
Windows GetModuleHandle (0). , COFF, , , . ; ( DLL) , , VirtualAlloc() - (HeapAlloc(), , ).
If you want to print only good stack traces or something else, then there are many ready-made libraries that can do this for you. If you want to do checksums, then things get a lot more complicated; better to use code signatures or ready-made libraries. The real answer to your question depends on what your real problem really is ...
source
share