Skip site navigation (1)Skip section navigation (2)
Date:      Thu, 10 Aug 1995 19:49:19 -0700 (PDT)
From:      Mike Pritchard <mpp>
To:        jkh@time.cdrom.com (Jordan K. Hubbard)
Cc:        graichen@sirius.physik.fu-berlin.de, hackers@freebsd.org
Subject:   Re: /etc/magic hacker needed !
Message-ID:  <199508110249.TAA28940@freefall.FreeBSD.org>
In-Reply-To: <27028.807608437@time.cdrom.com> from "Jordan K. Hubbard" at Aug 5, 95 00:40:37 am

next in thread | previous in thread | raw e-mail | index | archive | help
Jordan K. Hubbard wrote:
> 
> > is'nt there anybody out there who could /etc/magic hack that way file will
> > result in correct results for FreeBSD core's and objext-files:
> 
> Huh.  This sounds familiar..  :-)
> 
> 	To: Thomas Graichen <graichen@sirius.physik.fu-berlin.de>
> 	cc: hackers@freebsd.org
> 	Subject: Re: bugs & problems in 2.0.5
> 	In-reply-to: Your message of "Tue, 11 Jul 1995 11:04:23 +0200."
> 	             <9507110904.AA21396@sirius.physik.fu-berlin.de>
> 	Date: Wed, 12 Jul 1995 01:33:59 -0700
> 	Message-ID: <24918.805538039@time.cdrom.com>
> 	From: "Jordan K. Hubbard" <jkh@time.cdrom.com>
> 	>...
> 	> graichen@mordillo:~> cat test.c
> 	> void main(void){}
> 	> graichen@mordillo:~> gcc -c test.c
> 	> graichen@mordillo:~> file test.o
> 	> test.o: NetBSD/i386 object file not stripped
> 
> 	I tried this and I have to agree that this looks rather embarassing,
> 	espcially having our .o's identified as "NetBSD/i386 object files"; it
> 	makes it look to the casual user like we're running their stuff in
> 	some sort of emulation mode or something :-)
> 
> 	It would also be nice to have identification of core files.  If you
> 	look at the NetBSD/i386 core file entry, it even appears to ferret the
> 	name of the executable out of the core file and display it.  Nice!
> 
> 	I fooled around with od and /etc/magic a little bit but was unable to
> 	get core recognition to work in the short 2 minutes I had to devote to
> 	the problem.. :-)
> 
> 	Anyone out there game for a little puzzle?  The mission:  To see how
> 	many types of files you can get recognised by /etc/magic! :-)
> 
> 		                                Jordan
> 
> Clearly, no one out there was game for a little puzzle back in
> the middle of July, anyway.. :-)

Actually, I did get a little curious back then and did some poking
around.  As to the core files, NetBSD actually writes out a little
header with a core-file magic number, so file(1) has no problem
finding their core files.  FreeBSD doesn't do this, so there isn't
an easy way to recognize our core files.

I didn't look at the .o format yet, and I don't have access to a
NetBSD machine, so this one is somewhat tough to deal with.
Anyone care to send me/make available some NetBSD and BSDI .o files?

I did, however, go ftp the latest version of file from somewhere,
and it looks like the latest version has a lot of updated magic
files we could use.  I think I'll wait until all of the cvs import
issues are sorted out before I do anything with it.



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?199508110249.TAA28940>