[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

another shared library question



Do all gcc ELF binaries always link crtbegin.o and crtend.o?

That shared library I mentioned earlier has a number of static objects (and a
global, boo hss!) that need to have their constructors and destructors called
when the .so is loaded and unloaded respectively.

I read a discussion of the subject over in NetBSD-ville, but it was centered
around a.out binaries (and apparently you have to manually link in their
equivalent, c++rt0.o).  They hinted about the answer for ELF binaries, but were
less than clear.

Incidentally, they apparently refer to Linux as Loonux.  Loony Unix?  A
pejorative?  Shame on them.