The answer is probably: Depends on how the ELF file was generated.
Based on this article, and this sentence:
- A common misconception is that ELF files are just for executables...
- We already have seen they can be used for partial pieces ...
Not all ELF files will be executed, even if you have a proper setup.
Based on this article, there is a group pf ELF files called FatELF:
- FatELF is a file format that embeds multiple ELF binaries for different architectures into one file
- Ship one file that works across Linux and FreeBSD
Based on this page from Apple
- The BSD portion of the OS X kernel is derived primarily from FreeBSD
So, for Mac OS X, FatELF is the "beginning of the answer".
And finally, based on this page:
Object file converter
This utility can be used for converting object files between COFF/PE, OMF, ELF and Mach-O formats for all 32-bit and 64-bit x86 platforms. Can modify symbol names in object files. Can build, modify and convert function libraries across platforms. Can dump object files and executable files. Also includes a very good disassembler supporting the SSE4, AVX, AVX2, AVX512, FMA3, FMA4, XOP and Knights Corner instruction sets. Source code included (GPL).
You have a chance to active what you want.
PS: there is another page about XBinary, I didn't analyze it.
This document discusses XBinary, a new software that lets you add kernel-level support for executing files in arbitrary binary formats on Mac OS X