From owner-freebsd-sparc64@FreeBSD.ORG Tue May 11 19:20:04 2010 Return-Path: Delivered-To: freebsd-sparc64@hub.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 40F881065672 for ; Tue, 11 May 2010 19:20:04 +0000 (UTC) (envelope-from gnats@FreeBSD.org) Received: from freefall.freebsd.org (freefall.freebsd.org [IPv6:2001:4f8:fff6::28]) by mx1.freebsd.org (Postfix) with ESMTP id 156F38FC20 for ; Tue, 11 May 2010 19:20:04 +0000 (UTC) Received: from freefall.freebsd.org (localhost [127.0.0.1]) by freefall.freebsd.org (8.14.4/8.14.4) with ESMTP id o4BJK3NM090016 for ; Tue, 11 May 2010 19:20:03 GMT (envelope-from gnats@freefall.freebsd.org) Received: (from gnats@localhost) by freefall.freebsd.org (8.14.4/8.14.4/Submit) id o4BJK3Sd090015; Tue, 11 May 2010 19:20:03 GMT (envelope-from gnats) Date: Tue, 11 May 2010 19:20:03 GMT Message-Id: <201005111920.o4BJK3Sd090015@freefall.freebsd.org> To: freebsd-sparc64@FreeBSD.org From: Marius Strobl Cc: Subject: Re: sparc64/146387: 'file' command on sparc64 doesn't interpret sparc64 (V9) executables X-BeenThere: freebsd-sparc64@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list Reply-To: Marius Strobl List-Id: Porting FreeBSD to the Sparc List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 11 May 2010 19:20:04 -0000 The following reply was made to PR sparc64/146387; it has been noted by GNATS. From: Marius Strobl To: Nathan Whitehorn Cc: bug-followup@freebsd.org, yuri@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 > To: Yuri > Cc: freebsd-gnats-submit@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