This is like saying if I use the same alphabet all books are the same a Biology text book and a Math text book are identical because they use the same alphabet have a cover have some pages, etc. Or I have to ski resorts and because they both use the same alphabet and because they both are about snow that their posters and brochures are identical.
int main ( void )
{
return(27);
}
0000000000402cd0 <main>:
402cd0: 48 83 ec 28 sub $0x28,%rsp
402cd4: e8 d7 e9 ff ff callq 4016b0 <__main>
402cd9: b8 1b 00 00 00 mov $0x1b,%eax
402cde: 48 83 c4 28 add $0x28,%rsp
402ce2: c3 retq
00000000004003e0 <main>:
4003e0: b8 1b 00 00 00 mov $0x1b,%eax
4003e5: c3 retq
subtle differences sure, but the key is that these are two completely different operating systems, the entry/exit of the program (there is a TON of code not shown above that varies, not just the wee bitty spec if main code in this program.
These are different operating systems, they have different calls different rules, they are different, the instruction set being common is somewhat irrelevant. Its like saying because I am running on linux and using C as my programming language then a binary made for arm and a binary made for x86 should be identical and compatible (because two of the three things I said were the same, programming language and operating system but not instruction set. or in your case programming language and instruction set but not operating system.)
This goes so far as to point out that a gcc compiled program for windows is not completely compatible across all versions of windows, you cant just say "windows". same goes for linux. they change within themselves independent of target, then there are incompatible differences between the operating systems. Just because the brick and mortar are the same doesnt make two identical buildings.
This is the purpose of JAVA and Python and such languages, to draw a line everything above this line is common and cross platform, what is below this line can be platform and target specific and no reason to expect any form of cross platform compatibility. Those languages wouldnt exist if we had this kind of compatibility across the world of computers with C compilers or computers all running linux independent of platform or all running an operating system with a compiler and the same instruction set.
There is a reason when you go download some program like chrome or 7-zip or firefox, handbrake, etc there are different installers and/or binaries based on the operating system, and operating system version. The instruction set is often not even listed as it is assumed to be x86, yet there are different binaries, if it were this trivial then why would those folks who have delivered finished products for so long be delivering several different builds of the product?