Subject: Re: kern/13615: NetBSD current requires a .note.netbsd.ident section
To: =?ISO-8859-1?Q?Jarom=EDr?= Dolecek <>
From: Andrew Cagney <>
List: netbsd-bugs
Date: 09/22/2001 14:10:17
> This fallback has
> been removed on -current since it has bad interactions when running
> binaries from different OS than NetBSD (potentially dangerous interactions).

I know. The problem has been thrashed to death.

> Any binary not having the note is IMHO broken. Please find some
> solution to get the note in there, probably by pushing the section
> to GCC's crt{begin,end} for 1.5.* and down.

I guess you mean add a .note.netbsd.ident to the gcc 3.x sources? 
Someone can certainly do it.  Given it likely involves transfering a 
snipit of (c) NetBSD code to FSF/GCC it wont be me :-)  Anyone?  This 
would be my prefered option.

Another option is for NetBSD to release a patch fixing the supplied crt* 
files and push it onto the 1.5.x branch.  The GCC release notes and 
configuration could then be updated to indicate that such a patch is 
required.  A really simple variation of this patch would be to make the 
.note section available in its own file where GCC 3.0 could link it in.

Finally there is the possibility of adding magic to FSF gcc so that 
either the installed or FSF suplied crt* are used.  Since it doesn't 
address the problem of a GCC compiled 1.5.x binary not working on a >1.5 
system I don't think it is any better than the status quo.

So what next?  I think I'll try and get the NetBSD/PPC patches onto the 
3.0.x GCC branch regardless.  I'll also add a release note mentioning 
the need to include ``option EXEC_ELF_CATCHALL'' in post 1.5 kernels 
along with references to a few PRs.