Subject: Re: lib/2758: crt0.o pulls in much of libc during linking
To: Chris G Demetriou <>
From: J.T. Conklin <jtc@NetBSD.ORG>
List: netbsd-bugs
Date: 09/16/1996 11:17:32
> > >Description:
> > 	crt0.o is supposed to be a mostly-standalone module.  NetBSD's
> > violates that rule because it uses strerror(), which uses catopen(),
> > which get the idea.
> Last I heart, 'crt0.o' was meant for use with shared binaries, but
> scrt0.o was meant for use with static ones.  For them, those calls
> won't add much space at all to the size of the executable.

I believe this was the intent, but as has been noted elsewhere in this
discussion, gcc no longer links with scrt0.s.  I gather this happened
when we were merging the netbsd changes into the FSF source tree.

But before we make this change, let's make sure it's correct.  If I
understand things correctly, using scrt0.o as is makes it impossible
to dynamicly link in code to a staticly linked executable.  I think
this could be a useful feature.  So why not split the dl* functions
out into their own library so that dynamic linking can be made to
work from static libraries too?