LWN.net Logo

Advertisement

Interested in hardware, diags, validation, Linux, C, ARM, Microcode and low level programming and blazing networks?

Advertise here

Optimizing Linker Load Times

Optimizing Linker Load Times

Posted Jul 27, 2006 16:53 UTC (Thu) by bluefoxicy (guest, #25366)
In reply to: Optimizing Linker Load Times by sdalley
Parent article: Optimizing Linker Load Times

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? :)


(Log in to post comments)

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.

Alex

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