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/01/2001 23:01:38
On Mon, Jan 01, 2001 at 11:56:26PM +0100, Emmanuel Dreyfus wrote:
> LinuxPPC statically linked executables seems to have no comment, no GCC
> signature that could help. Both linux_signature and linux_gcc_signature
> fail. Fortunately, it seems that all statically linked executables on
> Linux have a __libc_atexit section. I checked it on both powerpc and
> i386, and I can't find a statically linked program that doesn't have
> this __libc_atexit  section on a Linux system. 
	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 ...)

> On the other hand, I was not able to find any statically linked
> executable with such a section on NetBSD. Do you think this is
> __libc_atexit section is specific enough to be used for recognising
> Linux statically linked executables? 
	We could always either make sure that it's the last entry in the
probe order. Or perhaps have a scored match, similar to the autoconf
probe code, with the match on the libc_atexit section having a low priority.

eric