https://sourceware.org/bugzilla/show_bug.cgi?id=20152

Nick Clifton <nickc at redhat dot com> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |nickc at redhat dot com

--- Comment #1 from Nick Clifton <nickc at redhat dot com> ---
Hi Dave,

> I noticed when developing a patch for GCC that C++ objects with global
> constructors are sometimes discarded if linked via a .a archive.

Why is this surprising ?  The point of an archive is that contents are only
extracted from it if they are needed.  If nothing in the main program
references the global object in the library then it is not included in the
link and its constructor is never run.

Cheers
  Nick

-- 
You are receiving this mail because:
You are on the CC list for the bug.
_______________________________________________
bug-binutils mailing list
bug-binutils@gnu.org
https://lists.gnu.org/mailman/listinfo/bug-binutils

Reply via email to