Post Syndicated from daroc original https://lwn.net/Articles/997238/
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
Cosmopolitan Libc 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.