LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - General (https://www.linuxquestions.org/questions/linux-general-1/)
-   -   "Universal" binaries in Linux? (https://www.linuxquestions.org/questions/linux-general-1/universal-binaries-in-linux-613185/)

ajmas 01-12-2008 07:31 PM

"Universal" binaries in Linux?
 
I saw that with MacOS X it is possible to have what is called a "universal binary", which is basically a binary executable which supports multiple architectures. For example the sample output of a binary:

$ file libtest.dylib
libtest.dylib: Mach-O universal binary with 3 architectures
libtest.dylib (for architecture i386): Mach-O bundle i386
libtest.dylib (for architecture ppc): Mach-O bundle ppc
libtest.dylib (for architecture x86_64): Mach-O 64-bit bundle x86_64

Is this achievable under Linux? If it is, how would I go about doing this?

Uncle_Theodore 01-12-2008 07:41 PM

I've got one word for you.
Java.

ajmas 01-12-2008 11:12 PM

Quote:

Originally Posted by Uncle_Theodore (Post 3020573)
I've got one word for you.
Java.

Certainly universal, but it does not always have access to the native APIs. Even here a library that supports multiple architectures (Not OSs) could be useful.


All times are GMT -5. The time now is 01:23 PM.