I have read that a binary is the same for Windows and Linux (I am not sure if it has a different format).
What are the differences between binaries for Linux and binaries for Windows (when speaking about format)?
And if there are none, what stops us from making a single binary for both operating systems (make sure that I mean the last file where you can run and not the source code)?
Since there are differences in the binary format, how are the operating systems themselves compiled?
If I'm not mistaken Microsoft uses Windows to compile the next Windows version/update.
How are these binaries executable by the machine (even the kernel is one of those)?
Aren't they in the same format? (For such a low-level program.)
As mentioned in the comments by @AlanBirtles, this is in fact possible. See Actually Portable Executable, Redbean, and the article about the two.
Even though the binary formats are different, it's possible to come up with a file that's valid in several different formats.
But, this being an obscure hack, I would stay away from it in production (or at all).
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With