Subject: re: kern/13615: NetBSD current requires a .note.netbsd.ident section
To: None <itojun@iijlab.net>
From: matthew green <mrg@eterna.com.au>
List: netbsd-bugs
Date: 08/03/2001 12:58:00
   
   >> every compiler?  what about programs that use their own startup routines
   >> that are written completely in assembler?  why shouldn't we run unlabelled
   >> programs?  i'm yet to see a good reason why.  the default should be to run
   >> these programs, and the option should be to disable it.
   >
   >See kern/12253 for reason why. I do not think we should run random ELF
   >binaries as if they would be NetBSD binaries. I think every ELF NetBSD
   >binary should be marked as such explicitly.
   
   	maybe we should:
   	- keep emulation binary detection part even if we don't have
   	  COMPAT_xxx,
   	- on program invocation, exclude every obviously-non-netbsd binaries,
   	- execute as netbsd binary if none matches.


i think this is kinda ugly, but i'm not sure how else to do it.  PR#12253 is
certainly fairly compelling, though of course on needs to be root to do this
and therefore can be put down to "user error" (but the failure mode is damn
spectacular.)

but certainly the solution that simply refuses to run correct programs 
because they don't have a tag is no good.  it makes it impossible (sans a
kernel rebuild) to run programs that are otherwise completely useful.


the thing is that while one generally should use our crt* when linking, it
isn't always necessary or applicable.  in a pure-assembly program why
should i have to create a special .note section?  espcially one that isn't
well documented outside of the NetBSD source code.


the current situation seems "anti-embedded" to me.


.mrg.