Hello,
I've seen Mandrake has started compiling KDE with -fvisibility=hidden. They say this improve load times considerably. Has this flag other nasty consequences?
Thanks.
On Sat, 12 Feb 2005, Felipe Alfaro Solana wrote:
I've seen Mandrake has started compiling KDE with -fvisibility=hidden. They say this improve load times considerably. Has this flag other nasty consequences?
It shouldn't, as long as the code is fairly well behaved. We're starting to use this for OpenOffice.org as well, any large C++ app can greatly benefit from this option because the rather un-optimized dynamic linker doesn't have to load and resolve as many symbols at run-time. You should get link-time errors if symbols that aren't explicitly marked visible are needed by some other part of the program.
Dan
On Sat, 2005-02-12 at 00:16 +0100, Felipe Alfaro Solana wrote:
Hello,
I've seen Mandrake has started compiling KDE with -fvisibility=hidden. They say this improve load times considerably. Has this flag other nasty consequences?
Check this out, covers in detail the pros/cons of that flag, as well as other issues. The paper concentrates on shared libraries, but is applicable to general app link time issues as well.
http://people.redhat.com/drepper/dsohowto.pdf
Thanks.
Felipe Alfaro Solana wrote:
I've seen Mandrake has started compiling KDE with -fvisibility=hidden. They say this improve load times considerably. Has this flag other nasty consequences?
It changes the API of all the DSOs. Programs might simple stop working since functions are no longer exported from DSOs. One cannot simply add this flag. All functions in a DSO which have ever been used by any program must be exported.
-- ➧ Ulrich Drepper ➧ Red Hat, Inc. ➧ 444 Castro St ➧ Mountain View, CA ❖