1 |
On 16-05-2007 18:01:18 +0200, Elias Pipping wrote: |
2 |
> On May 16, 2007, at 9:39 AM, Fabian Groffen wrote: |
3 |
> |
4 |
>>> There's one thing I should mention that the file command of prefixed |
5 |
>>> cannot tell hello64 is an executable: |
6 |
>>> % $EPREFIX/usr/bin/file hello64 |
7 |
>>> hello64: data |
8 |
>> |
9 |
>> GNU coreutils apparently isn't able to identify this (yet). Not 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 separate |
14 |
> tool.[1] |
15 |
|
16 |
You're right. I guess it was late... err no, it was (too) early. |
17 |
|
18 |
> Apple modified file heavily to make it work with universal binaries. The |
19 |
> (15!) patches are freely available[2], they're diffed against 4.10, though |
20 |
> (a lot has changed since then, especially related to universal binaries). |
21 |
> See below for what the patches result in. Although I don't have a 64bit |
22 |
> binary I could test it on, I guess Apple's file would recognize it. |
23 |
|
24 |
Interesting. Anyone objections on including them in our tree? |
25 |
|
26 |
(nice to have a bit of this knowledge around!) |
27 |
|
28 |
|
29 |
> $ dirs |
30 |
> /Developer/SDKs/MacOSX10.4u.sdk/usr/lib |
31 |
> |
32 |
> $ ~/Gentoo/usr/bin/file libncurses.5.4.dylib |
33 |
> libncurses.5.4.dylib: Mach-O fat file with 4 architectures |
34 |
> |
35 |
> $ /usr/bin/file libncurses.5.4.dylib |
36 |
> libncurses.5.4.dylib: Mach-O universal binary with 4 architectures |
37 |
> libncurses.5.4.dylib (for architecture ppc): Mach-O dynamically linked |
38 |
> shared library stub ppc |
39 |
> libncurses.5.4.dylib (for architecture ppc64): Mach-O 64-bit dynamically |
40 |
> linked shared library stub ppc64 |
41 |
> libncurses.5.4.dylib (for architecture i386): Mach-O dynamically linked |
42 |
> shared library stub i386 |
43 |
> libncurses.5.4.dylib (for architecture x86_64): Mach-O 64-bit dynamically |
44 |
> linked shared library stub x86_64 |
45 |
> $ |
46 |
> |
47 |
> [1] ftp://ftp.astron.com/pub/file |
48 |
> [2] |
49 |
> http://www.opensource.apple.com/darwinsource/10.4.9.x86/file-6.2/patches/ |
50 |
|
51 |
-- |
52 |
Fabian Groffen |
53 |
Gentoo on a different level |
54 |
|
55 |
-- |
56 |
gentoo-alt@g.o mailing list |