|
|
Log in / Subscribe / Register

Are those C++ symbols all external?

Are those C++ symbols all external?

Posted Jul 16, 2009 10:00 UTC (Thu) by sdalley (subscriber, #18550)
In reply to: Why modify the executable? by nix
Parent article: Is pre-linking worth it?

nix, is your KDE 3.5.10 built with a recent compiler? All those 48929 C++ library symbols - do they *have* to be externally visible?? Or are most of them object-internal/mangled-static symbols which shouldn't need to be involved in the linking at all? The -fvisibility compiler option is supposedly used (gcc 4.1 and later) to restrict the visibility of internal symbols, are there 48929 externals in spite of that?? That's a *huge* interface surface to document and test if so.


to post comments

Are those C++ symbols all external?

Posted Jul 16, 2009 17:47 UTC (Thu) by nix (subscriber, #2304) [Link] (4 responses)

That's in spite of using hidden visibility, yes. (The whole thing was
built with GCC 4.3.2.)

(Actually I'm not sure whether hidden visibility ever really worked with
KDE 3.x. I'll look again at a KDE4 installation as soon as I unbreak mine
far enough that a decent subset of the libraries are actually there and
have the symbols they're meant to have.)

Are those C++ symbols all external?

Posted Jul 19, 2009 7:36 UTC (Sun) by dirtyepic (guest, #30178) [Link] (3 responses)

it supposedly does work with KDE 3, or at least I remember us having to disable it repeatedly as support for hidden visibility matured over GCC releases. these days though it works pretty smoothly. note, however, that it's disabled by default. you have to pass --enable-gcc-hidden-visibility to configure at build time.

Are those C++ symbols all external?

Posted Jul 19, 2009 11:25 UTC (Sun) by nix (subscriber, #2304) [Link] (2 responses)

Last time I did that it refused, telling me Qt (3.3.8 with security fixes)
didn't have sufficient support. I think it needs distro patches to Qt...

Are those C++ symbols all external?

Posted Jul 20, 2009 4:39 UTC (Mon) by dirtyepic (guest, #30178) [Link] (1 responses)

I think you're right. I never noticed that before. I find it odd that a feature in KDE would require external patches to Qt, but I guess that's the kind of situation they were in at the time.

Are those C++ symbols all external?

Posted Jul 20, 2009 6:50 UTC (Mon) by nix (subscriber, #2304) [Link]

Getting hidden visibility to work with C++ was tricky, as I recall. You
certainly have to appropriately mark ancestors of classes that are being
so marked to get any real reduction in symbol count, which means Qt does
need marking.


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