Subject: kern/13615: NetBSD current requires a .note.netbsd.ident section
To: None <>
From: None <>
List: netbsd-bugs
Date: 08/01/2001 13:58:56
>Number:         13615
>Category:       kern
>Synopsis:       NetBSD current requires a .note.netbsd.ident section
>Confidential:   no
>Severity:       critical
>Priority:       high
>Responsible:    kern-bug-people
>State:          open
>Class:          sw-bug
>Submitter-Id:   net
>Arrival-Date:   Wed Aug 01 13:56:00 PDT 2001
>Originator:     Andrew cagney
>Release:        NetBSD 1.5.1 userland + NetBSD 2001-08-01(ish) kernel
NetBSD localhost 1.5X NetBSD 1.5X (NETLUX) #0: Wed Aug  1 15:41:44 EDT 2001     boor@localhost:/usr/trunk/sys/arch/macppc/compile/NETLUX macppc

/usr/lib/crtstart.o contains a .note.netbsd.ident section.
NetBSD's bundled compiler links crtstart, crtend, crt0, ... into an executable.
The kernel (current) refuses to run NetBSD executables unless: they contain the above .note section or the kernel is configured with ``options EXEC_ELF_CATCHALL''.

Unfortunatly, unbundled complers (eg GCC>3.0) typically don't use system supplied files such as crtbegin.o - instead they supply their own.  Consequently, an unbundled compiler won't include the crtbegin.o .note section and, in turn, won't be able to generate binaries that can be run on NetBSD-current.

Further, the error message printed when you run such a binary is totally unhelpful.

Build an executable that does not contain a .note section.
Revert rev 1.57 of kern/exec_conf.c.