Subject: Re: -nostdlib and NetBSD ELF note
To: Todd Vierling <>
From: David Brownlee <>
List: tech-toolchain
Date: 09/16/2002 23:37:05
On Thu, 22 Aug 2002, Todd Vierling wrote:

> On Thu, 22 Aug 2002, David Brownlee wrote:
> : 	I have a package (cpuburn) which compiles .S files with
> : 	-nostdlib.  The resulting files presumably lack the NetBSD
> : 	note and are rejected by 1.6 and later. Is there a more
> : 	appropriate flag to specify, or a way to get them recognised
> : 	as NetBSD binaries?
> Um, why does it need -nostdlib?  Is it calling the __syscall stub directly?
> (Is it even expecting to do a kernel call at any point!?)
	It just sits there executing MMX or similar instructions to try to
	show up memory or CPU issues.

> crt0 really only works best in conjunction with libc (and crt0 is also
> excluded with -nostdlib), so if you are using -nostdlib on a program, you
> need to know Exactly what you're doing.  My guess is that the use of
> -nostdlib is incorrect.

	It seems plausible in this case?

On Fri, 23 Aug 2002, matthew green wrote:

> so, include the netbsd note manually then.  there are docs under
> www/Documentation describing the few lines of asm required..

	I _should_ be able to just link in crtbeginS.o which contains

		David/absolute          -- No hype required --