huge _static_initialization_and_destruction

Eljay Love-Jensen eljay@adobe.com
Wed Mar 9 19:51:00 GMT 2005


Hi Ilja Golshtein,

 >1. Does my vision make sense?

I think your solution is sub-optimal.

In my opinion, header files should only declare things, not define them.

To double-check if that is the case, compile the header-as-if-it-were a 
source file -- if the object file thus produced is (shall we say) polluted 
from .data, .bss or .text (aka .code) sections than are other than an 
object file generated from an empty source file, something is suspect.

 >2. Is it possible to change the situation by some tuning of compiler 
and/or linker (I cannot get rid of this ONLY ONCE objects)?

Not to my knowledge.

 >3. I use gcc 3.2.2 and ld 2.13.90.0.18. Any hope things whould be changed 
if I step forward?

I would expect the situation to remain the same -- i.e., supported, and a 
programmer paradigm which results in binary bloat (albeit benign).

HTH,
--Eljay



More information about the Gcc-help mailing list