I created two C programs
Program 1
int main()
{
}
Program 2
int main()
{
//Some Harmless comments
Note: remember that the source file name goes into the unstripped binary, so two programs coming from differently named source files will have different hashes.
In similar situations, should the above not apply, you can try:
strip against the binary to remove some fat. If the stripped binaries are the same then it was some metadata that isn't essential to the program operation.strings, or dump both programs to hex and run a diff on the two hex dumps. Once located the difference(s), you might try and see whether there's some rhyme or reason to them (PID, timestamps, source file timestamp...). For example you might have a routine storing the timestamp at compile time for diagnostic purposes.