6

Apple's concept of universal binaries allow easily shipping a single file containing both 32 and 64 bit versions of a binary.

Although this is possible in Linux using FatElf, FatElf and the concept of universal binaries are not baked in the kernel by default?

What is the reasoning behind this? Why do the kernel developers think its a bad idea to have universal binaries on linux?

Update
I am not looking for discussion. It is given that Universal Binaries are not part of the main linux kernel. I am just asking for the reasoning behind it.

Charles
  • 50,943
  • 13
  • 104
  • 142
pdeva
  • 43,605
  • 46
  • 133
  • 171
  • "Why do the kernel developers think its a bad idea to have universal binaries on linux?" [citation needed] – Ignacio Vazquez-Abrams Apr 16 '12 at 01:46
  • This question is totally inappropriate for SO. It's a call for discussion, and is specifically mentioned in the [FAQ](http://stackoverflow.com/faq) as not being appropriate here. This is a Q & A site, not a discussion group or chat room. Voting to close as not constructive. – Ken White Apr 16 '12 at 01:50
  • 2
    all right then which stackexchange site should this be posted on? – pdeva Apr 16 '12 at 01:51
  • That said, there is this question with a similar theme and has been allowed to live on SO http://stackoverflow.com/questions/520068/why-is-the-linux-kernel-not-implemented-in-c – pdeva Apr 16 '12 at 01:53
  • Ignacio: well looking around it seems that fatelf proposal has been around since 2009 and still not implemented, so i assumed the kernel developers dont want it for some reason. yes i do not have a citation. but that is what I am opening this thread for. either to find a citation with an explanation or a good logical answer to this by somebody in the know. – pdeva Apr 16 '12 at 01:54
  • Can anybody ask this on kernel list? – anatoly techtonik Jan 13 '14 at 21:19

1 Answers1

3

It is given that Universal Binaries are not part of the main linux kernel. I am just asking for the reasoning behind it.

A fat binary is twice as fat as it needs to be on either 32-bit or 64-bit system.

Since it's just as easy to provide two separate binaries as a single one, why would I want to carry the extra fat on my system, or why would you want to force your end-users to download twice as much fat as they need to?

I think the reason MacOS chose to use fat binaries is that they didn't want their end-users to understand whether they are running on a PPC Mac or an Intel Mac.

Linux users don't appear to have a problem understanding whether they are running on a 32-bit or a 64-bit system.

Employed Russian
  • 199,314
  • 34
  • 295
  • 362
  • To avoid extra fat, you can compile into single intermediate format which is then can be translated to native. PNaCl does this https://developers.google.com/native-client/pnacl-preview/nacl-and-pnacl#portable-native-client-pnacl – anatoly techtonik Jan 13 '14 at 21:23
  • @techtonik The question was about Linux *kernel*. It's hard for me to imagine PNaCl will ever support building the kernel -- certainly that's not a goal for current PNaCl developers. – Employed Russian Jan 14 '14 at 01:00
  • PNaCl is just an example that common binary format for 32-bit and 64-bit system is possible without twice the size of 32-bit binary, and hence without extra fat. – anatoly techtonik Jan 14 '14 at 08:37