Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

What information about me and my system do compilers add to executeables?

I'm currently using Microsoft Visual Studio 2010.

If we say that we give 10 different people a copy of MSVC 10 and a short C++ Hello, World listing. They all create a new project using exactly the same settings, add a new cpp file with the Hello, World program and compile it.

  • Do they all get the exactly same binary?
  • If not, what are the exact differences?
  • What information about my system does MSVC add to my executeable?

Paranoia!

like image 949
I can't tell you my name. Avatar asked Apr 08 '10 14:04

I can't tell you my name.


2 Answers

If you each create a project from scratch you'll at least get different GUIDs assuming it's the type of project that needs GUIDs. The GUID is set at the time you create the project so if one of you creates the project and then you share the project there will be no difference in the binaries. There is no identifiable info in the GUIDs AFAIK.

like image 99
gman Avatar answered Oct 27 '22 01:10

gman


Just can't help to respond even though the question is more than a year old.

Apart from what was already mentioned (source paths & guid), there is also a structure present in most Portable Executable file known as the Rich Header.

More detailed info can be found at the following links:

http://ntcore.com/files/richsign.htm

http://web17.webbpro.de/index.php?page=microsofts-rich-header

like image 36
rƒc Avatar answered Oct 27 '22 01:10

rƒc