sparc64/146387: 'file' command on sparc64 doesn't interpret
sparc64 (V9) executables
Marius Strobl
marius at alchemy.franken.de
Tue May 11 19:20:04 UTC 2010
The following reply was made to PR sparc64/146387; it has been noted by GNATS.
From: Marius Strobl <marius at alchemy.franken.de>
To: Nathan Whitehorn <nwhitehorn at freebsd.org>
Cc: bug-followup at freebsd.org, yuri at tsoft.com
Subject: Re: sparc64/146387: 'file' command on sparc64 doesn't interpret sparc64 (V9) executables
Date: Tue, 11 May 2010 21:12:18 +0200
On Sat, May 08, 2010 at 10:20:03PM +0000, Nathan Whitehorn wrote:
> The following reply was made to PR sparc64/146387; it has been noted by GNATS.
>
> From: Nathan Whitehorn <nwhitehorn at freebsd.org>
> To: Yuri <yuri at tsoft.com>
> Cc: freebsd-gnats-submit at FreeBSD.org
> Subject: Re: sparc64/146387: 'file' command on sparc64 doesn't interpret sparc64
> (V9) executables
> Date: Sat, 08 May 2010 18:19:49 -0400
>
> Yuri wrote:
> > Description:
> >
> > On sparc64:
> >
> >> file `which file`
> >>
> > /usr/bin/file: ERROR: ELF 64-bit MSB executable, SPARC V9, relaxed memory ordering, version 1 (FreeBSD), statically linkederror reading (File too large)
> >
> > But when I try 'file' from i386 it correctly recognizes sparc64 executables.
> >
> This same thing happens on 64-bit PowerPC, and on all big-endian systems
> (32 or 64 bit) when running file on 64-bit big-endian ELF files. It
> looks like an endian bug in libmagic.
Actually, it appears that the problem is the way the base file/libmagic
is built as the port version doesn't exhibit such problems:
v215# file -v
file-5.03
magic file from /usr/share/misc/magic
v215# file `which file`
/usr/bin/file: ELF 64-bit MSB executable, SPARC V9, relaxed memory ordering, version 1 (FreeBSD), statically linked, stripped
v215# /usr/local/bin/file -v
file-5.03
magic file from /usr/local/share/file/magic
v215# /usr/local/bin/file `which file`
/usr/bin/file: ELF 64-bit MSB executable, SPARC V9, relaxed memory ordering, version 1 (FreeBSD), dynamically linked (uses shared libs), for FreeBSD 9.0 (900005), stripped
Marius
More information about the freebsd-sparc64
mailing list