Linked by Thom Holwerda on Thu 5th Nov 2009 23:05 UTC
Thread beginning with comment 393116
To read all comments associated with this story, please click here.
To read all comments associated with this story, please click here.
I have to agree with the kernel guys and Ulrich here. There is a much better way to do it
[..]
This way, you can very easily and simply delete the binaries you don't need, no patches are needed, and it is still user-friendly.
[..]
This way, you can very easily and simply delete the binaries you don't need, no patches are needed, and it is still user-friendly.
I don't know about FatELF but deleting unwanted binary code is no problem at all with universal binaries on OS X (implementing similar functionality for FatELF should be easy):
The lipo command creates or operates on ``universal'' (multi-architecture) files. It only ever produces one output file, and never alters the input file. The operations that lipo performs are: listing the architecture types in a universal file; creating a single universal file from one or more input files; thinning out a single universal file to one specified architecture type; and extracting, replacing, and/or removing architectures types from the input file to create a single new universal output file.
Since the binary code part is normaly small compared with other resources (sound files, pictures, translations, etc.), thinning out a binary is normally not worth the time (except maybe if you run under very restricted condition like a mobile phone).
However, Linux fanboys simple forget a common use case under Mac OS: copying a application from one system to another. E. g. you copy a universal binary app from a PPC-64 bit system to a x86-32 bit system - a simple drag and drop operation (or use cp if you prefer that). With universal binaries, no problem at all. Everything works. From the user perspective, the system behaves as expected (why should there be any difference between copying a data file or a application binary?).
Compare this with the sad situation under Linux ..
As long as Linux developers care more for HD space an 'the one true way'-wars that ends up in a mess under /usr/<whatever>, the year of Linux on the desktop will occur the same year as commercial fusion power arrives (whenever you ask, it's always another 50 years in the future
. The system adminstrators approach most Linux fanboys adopt may work for server environments or their own tiny world, but not for the masses ..
I don't know about FatELF but deleting unwanted binary code is no problem at all with universal binaries on OS X (implementing similar functionality for FatELF should be easy)
Yes, it is certainly possible and easy to make a command to remove unneeded binaries, but why would you do that when there is a much simpler solution. Power users can selectively delete binaries (e.g. delete arm and powerpc, but keep i686 and x86_64). And their could still be an easy command or menu option for those who don't know or care what architecture they have.
However, Linux fanboys simple forget a common use case under Mac OS: copying a application from one system to another. E. g. you copy a universal binary app from a PPC-64 bit system to a x86-32 bit system - a simple drag and drop operation (or use cp if you prefer that). With universal binaries, no problem at all. Everything works. From the user perspective, the system behaves as expected (why should there be any difference between copying a data file or a application binary?).
Um... couldn't you do this with the shell script solution too? As long as you don't delete any binaries, it will act exactly the same as universal binaries on OSX.





Member since:
2009-10-04
I have to agree with the kernel guys and Ulrich here. There is a much better way to do it:
$ ls foo/bin
foo
foo-arm
foo-ppc32
foo-ppc64
foo-i686
foo-x86_64
$ cat foo
#!/bin/sh
foo-`arch`
This way, you can very easily and simply delete the binaries you don't need, no patches are needed, and it is still user-friendly.
Edited 2009-11-06 00:02 UTC