[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
Re: Fix -static with -lpthread
On Sun, Jun 27, 2010 at 09:00:19PM +0000, David Holland wrote:
> On Sun, Jun 27, 2010 at 07:40:43PM +0200, Joerg Sonnenberger wrote:
> > > ...why not just reference it from crt0?
> > Because it is an implementation detail of libc.
> It's not like crt0 and libc are really independent, and it would be a
> lot less gross that way...
They are mostly independent. crt0 has to pull in exit(3) from libc to be
standard compliant and there is no real way to avoid that. I see no good
justification for adding other requirements on the interface just for
the sake of static linkage. The way global objects in C++ are
initialized is the same -- ensure that a reference exists to the object
file that declares the global variable, so the linker can do the rest.
Main Index |
Thread Index |