I understand that Linux uses shebang line to determine what interpreter to use for scripting languages, but how does it work for binaries?
I mean I can run Linux binaries, and having installed both wine and mono, Windows native and .NET binaries. And for all of them it's just ./binary-name
(if not in PATH) to run it.
How does Linux determine that a given binary must be run as a Linux native binary, as a Windows native binary (using wine facilities) or as a Windows .NET binary (using mono facilities)?