Subject: Re: COMPAT_LINUX: matching LinuxPPC binaries
To: Emmanuel Dreyfus <p99dreyf@criens.u-psud.fr>
From: Eric Haszlakiewicz <erh@nimenees.com>
List: tech-kern
Date: 01/02/2001 16:07:12
On Tue, Jan 02, 2001 at 12:24:22PM +0100, Emmanuel Dreyfus wrote:
> Eric Haszlakiewicz <erh@nimenees.com> wrote:
> >       So what about the note section?  Is there one?  Does an "objdump -s"
> > show anything in the section, if there is?  It should have the string
> > "GNU\n" in there somewhere.  (.note or .note.ABI-tag, or ...)
> 
> No .note section at all. We can match on "GNU" in .comment, but are we
> sure this is Linux if we get "GNU"? Doen't that just mean the programm
> was compiled using gcc?
	That's what the LINUX_GCC_SIGNATURE code tries to do.  Specifically,
it looks for "\0GCC: (GNU) " in a section of type SHT_PROGBITS with
no load address and no flags.  But apparently that doesn't work in this
case.  And, no we're not sure it's linux.  Enabling this code will actually
actually match NetBSD binaries on some architectures.
	Is there _anything_ in the binary that mentions linux explicitly?
(we'd just be getting lucky if there is.  linux doesn't seem to verify
that it's running an actual linux binary so there isn't much reason
for there to be a way to do so)

eric