1 |
On May 16, 2007, at 9:39 AM, Fabian Groffen wrote: |
2 |
|
3 |
>> There's one thing I should mention that the file command of prefixed |
4 |
>> cannot tell hello64 is an executable: |
5 |
>> % $EPREFIX/usr/bin/file hello64 |
6 |
>> hello64: data |
7 |
> |
8 |
> GNU coreutils apparently isn't able to identify this (yet). Not |
9 |
> much we |
10 |
> can do about this, unless you know how to patch it to support it. I'm |
11 |
> not much into file formats/magic headers myself, so I have no clue. |
12 |
|
13 |
Actually, GNU file is not related to coreutils at all, it's a |
14 |
separate tool.[1] |
15 |
|
16 |
Apple modified file heavily to make it work with universal binaries. |
17 |
The (15!) patches are freely available[2], they're diffed against |
18 |
4.10, though (a lot has changed since then, especially related to |
19 |
universal binaries). See below for what the patches result in. |
20 |
Although I don't have a 64bit binary I could test it on, I guess |
21 |
Apple's file would recognize it. |
22 |
|
23 |
$ dirs |
24 |
/Developer/SDKs/MacOSX10.4u.sdk/usr/lib |
25 |
|
26 |
$ ~/Gentoo/usr/bin/file libncurses.5.4.dylib |
27 |
libncurses.5.4.dylib: Mach-O fat file with 4 architectures |
28 |
|
29 |
$ /usr/bin/file libncurses.5.4.dylib |
30 |
libncurses.5.4.dylib: Mach-O universal binary with 4 architectures |
31 |
libncurses.5.4.dylib (for architecture ppc): Mach-O dynamically |
32 |
linked shared library stub ppc |
33 |
libncurses.5.4.dylib (for architecture ppc64): Mach-O 64-bit |
34 |
dynamically linked shared library stub ppc64 |
35 |
libncurses.5.4.dylib (for architecture i386): Mach-O dynamically |
36 |
linked shared library stub i386 |
37 |
libncurses.5.4.dylib (for architecture x86_64): Mach-O 64-bit |
38 |
dynamically linked shared library stub x86_64 |
39 |
$ |
40 |
|
41 |
[1] ftp://ftp.astron.com/pub/file |
42 |
[2] http://www.opensource.apple.com/darwinsource/10.4.9.x86/file-6.2/ |
43 |
patches/ |
44 |
-- |
45 |
gentoo-alt@g.o mailing list |