GCC 3.2.2 (OAR build) question

Chris Johns chrisj at rtems.org
Tue Feb 28 12:23:56 UTC 2006

leonp at plris.com wrote:
> Please, describe what is the difference? Please!

If the C++ code is contained in the one file and so has no external 
symbols referenced by the program else where the linker passes over it.

Turn the problem around. Say you have a C++ component in a library with 
static constructors. You would not want it linked in just because it had 
a static constructor. You would only want this to happen when you 
reference it.

If you want the static constructor in the constructor list you will need 
to force the object file into the executable or reference a symbol in it.


More information about the users mailing list