User: Password:
Subscribe / Log in / New account

Optimizing Linker Load Times

Optimizing Linker Load Times

Posted Jul 27, 2006 14:38 UTC (Thu) by sdalley (subscriber, #18550)
Parent article: Optimizing Linker Load Times

Another recent change was the gcc -fvisibility option which reduces the number of exported symbols that the loader has to slosh around in in the first place - . It would be interesting to know whether OO, KDE etc are now taking advantage of this.

(Log in to post comments)

Optimizing Linker Load Times

Posted Jul 27, 2006 16:53 UTC (Thu) by bluefoxicy (guest, #25366) [Link]

This is of course an excellent idea; but it requires code changes as well. I was mostly writing about drop-and-go speed hacks.

It'd be awesome to start moving into -fvisibility=hidden build systems and using the visibility attribute; but it's not something you're going to drop in today and have working in 10 hours after rebuilding Gentoo on an AMD64 build server. Everything I listed, however, would just be "Oh this option is here *enable*" and reap the benefits.

A separate article on -fvisibility and the visibility attribute WRT writing good shared libraries may be nice; if you place it somewhere visible like LWN you'll get a lot of developers looking at it, for example all of Debian ;) It's not that useful stuff is out there; it's that people know about it.

Unfortunately I don't know much about the visibility attribute besides that it makes sure the final module doesn't export hidden symbols, but lets other objects in that module use the symbols; as opposed to static, which statically links the symbol in that object so other objects in the module can't reach it. There's not much I can say beyond one or two paragraphs and some extra peripheral information. Maybe someone else should write something about this? :)

Optimizing Linker Load Times

Posted Aug 7, 2006 21:39 UTC (Mon) by aleXXX (subscriber, #2742) [Link]

-fvisibility is used by KDE for gcc > 4.1, both KDE 3.5 and KDE 4.


Copyright © 2017, Eklektix, Inc.
Comments and public postings are copyrighted by their creators.
Linux is a registered trademark of Linus Torvalds