Re: Dynamic symbol table
David Faure <[email protected]>
| Newsgroups | gmane.comp.kde.devel.optimize |
|---|---|
| Organization | KDE |
| Message-ID | <[email protected]> |
On Thursday 15 July 2004 23:09, Karl Vogel wrote: > Karl Vogel wrote: > > > I noticed that a lot of the .so files have big dynamic symbol tables, as > > if everything is exported. Wouldn't it be better to only export the > > symbols that are really required?! > > Seems like it is indeed not needed. Yes, any module (plugins etc.) don't need to export more than their entry points, indeed. > +kcm_arts_la_LDFLAGS = $(all_libraries) -module -avoid-version -no-undefined -Wl,--version-script=export.ver That's a pretty good idea. Now the nice trick would be to automate that from am_edit and unsermake, so that we don't need to edit 400 Makefiles... Hmm, actually the easy (but intrusive) way of doing it would be to add -Wl,--version-script=$(top_srcdir)/admin/export.ver to the definition of $(KDE_PLUGIN), so that every module that uses $(KDE_PLUGIN) automatically gets the exported-symbols reduction. But this could break in some weird case where someone used a non-standard name for his entry point (and didn't use K_EXPORT_COMPONENT_FACTORY of course). Maybe it would be better to define this as $(KDE_STANDARD_PLUGIN) or something, and search/replace in all Makefile.ams after checking that they use a standard name for their entry point. Much more work, but safer. -- David Faure, [email protected], sponsored by Trolltech to work on KDE, Konqueror (http://www.konqueror.org), and KOffice (http://www.koffice.org).