This is the mail archive of the binutils@sources.redhat.com mailing list for the binutils project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: static lib drops objects with side-effects


On Tue, Feb 11, 2003 at 11:41:54AM +1030, Alan Modra wrote:
> On Mon, Feb 10, 2003 at 05:03:04PM +0100, Wesley W. Terpstra wrote:
> > This is a bug.
> 
> No it isn't.  Objects are extracted from archives during linking only
> if the object contains a symbol satisfying an undefined symbol
> reference.  If this behaviour is incompatible with your C++ model then
> don't use archives.

Every time this "bug" comes up, I wonder - why not have a feature which
says "always include an object that contains .ctors/.dtors"?

Yes, I can think of situations where you wouldn't want this.  I can
also see where it might be useful.

-- 
Daniel Jacobowitz
MontaVista Software                         Debian GNU/Linux Developer


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]