Dynamic symbol table

Luciano Montanaro mikelima at cirulla.net
Fri Jul 16 16:38:56 CEST 2004


El 13:17, venerdì 16 luglio 2004, David Faure escribió:
> On Friday 16 July 2004 13:03, Allan Sandfeld Jensen wrote:
> > On Thursday 15 July 2004 23:09, Karl Vogel wrote:
> > >
> > > KDE Startup time however isn't reduced.. still 18 seconds for a cold boot..
> > > while only 5 seconds for a warm start :-(
> > 
> > I think you need so remove 10000s of symbols to get an improvement you can 
> > measure. Going from 233 to 1 is waste of your time.
> 
> ls -l $KDEDIR/lib/kde3/*.so | wc -l
> 657
> 
> There are 657 plugins in my KDE installation. If all of those can be stripped 
> from their symbols, the improvement might start being noticeable :)
> 

It should not be too hard to enable it for kde plugins:
I tired this change in my admin/acinclude.m4.in

< KDE_PLUGIN="-avoid-version -module -no-undefined \$(KDE_NO_UNDEFINED) \$(KDE_RPATH) \$(KDE_MT_LDFLAGS)"
---
> KDE_PLUGIN="-Wl,--version-script=\$(top_srcdir)/admin/plugin.map -avoid-version -module -no-undefined \$(KDE_NO_UNDEFINED) \$(KDE_RPATH) \$(KDE_MT_LDFLAGS)"

with the simple version script shown by karl (with the addition of the global symbol 
kdemain and init), and the version script was applied 
automatically everywhere $(KDE_PLUGIN) was specified. Sadly, most of the kcontrol modules 
do not
use it. I tried adding it to the kcm_background module, for a saving of ~40K.

A bit of grepping for -module in the Makefile.am files would provide the list of files 
to check. I'm willing to do that, if there is some interest.

The KDE_PLUGIN macro should contain the version script only if it is supported, however.

Luciano  


More information about the Kde-optimize mailing list