[$] Truly portable C applications
Programming language polyglots are files that are valid
programs in multiple languages, and do different things in each. While polyglots are normally
nothing more than a curiosity, the
<a href="https://justine.lol/cosmopolitan/index.html" rel="nofollow">
Cosmopolitan Libc</a> project has been trying
to put them to a novel use: producing native, multi-platform binaries that
run directly on several operating systems and architectures. There are still
some rough edges with the project's approach, but it is generally possible to
build C programs into a polyglot format with with minimal
tweaking.
https://lwn.net/Articles/997238/