Boost logo

Boost-Build :

From: C. Andy Martin (andy_at_[hidden])
Date: 2004-11-24 17:33:13


Rene Rivera wrote:
> Similar results on my code... Which I forgot to mention. Don't have
> exact figures with me at this time... But the size difference between
> debug (which has all the symbols for me) and release (which removes all
> symbols except the dllexport ones) is more than 80%.

The numbers I quoted were from _release_! The debug build right now is
45 MB! Correct me if I'm wrong, but the discussion was about the dynamic
symbol table (used for exporting symbols to the dynamic loader). The
static symbol table is used by the compile-time linker and by the
debugger. The static symbol table isn't needed to execute code, so you
can always strip it out.

If we could strip out unneeded symbols (symbols which don't need to be
referenced by other modules) it seems you could really shrink the size
of the dynamic table. Of course, the reason the .dynstr section is so
big is that the mangled template names are so long. Here is an example
obtained with objdump -T:

_ZN5boost6python7objects23caller_py_function_implINS0_6detail6callerINS1_6detail8py_iter_ISt3mapISt4pairISsSsE15ConnectionStateSt4lessIS9_ESaIS8_IKS9_SA_EEESt17_Rb_tree_iteratorISE_RSE_PSE_ENS_3_bi16protected_bind_tINSL_6bind_tISK_PFSK_RSG_ENSL_5list1INS_3argILi1EEEEEEEEESW_NS0_25return_internal_referenceILj1ENS0_21default_call_policiesEEEEESY_NS_3mpl7vector2INS1_14iterator_rangeISZ_SK_EENS0_14back_referenceISO_EEEEEEEclEP7_objectS1B_

This string contains 439 characters! (for just one symbol!)

-Andy

 


Boost-Build list run by bdawes at acm.org, david.abrahams at rcn.com, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk