Static functions

Rolf Magnus ramagnus at kde.org
Mon Feb 16 08:50:47 GMT 2004


On Monday 12 January 2004 20:08, David Leimbach wrote:
> On Jan 12, 2004, at 12:50 PM, Tim Jansen wrote:
> > On Monday 12 January 2004 14:56, Bo Thorsen wrote:
> >> The reason for using these is optimization - especially when it comes
> >> to
> >> libraries. And since almost all of KDE is made up of libraries, this
> >> really is important.
> >
> > Wouldn't it be cleaner to fix the tools instead of losing another
> > piece of C++
> > functionality and rewrite the source for this? You could probably go
> > on with
> > optimizations that fix compiler problems until you have plain C.
> >
> > bye...
>
> Perhaps its not viewed as a problem in the tools that do the symbol
> reallocations
> unless you are coming from the point of view of a C++ programmer.
>
> There are lots of things you *can* do in C++ and a good portion of them
> that you
> also shouldn't :).
>
> This is also a very platform specific issue.  A fix on Linux doesn't
> fix the linker on OS X for instance... however OS X can be told which
> symbols to export in a library instead of the default "all symbols exported"
> to make life easier on the tools. 

Can't you do that with a linker script for GNU ld too? Maybe it would be 
possible to write a (instert favorite scripting language)-script that 
generates a linker script from hints in the source code.

> Even AIX has different ways to make shared libs.
>
> Advocating a "lets not expose symbols to the user that they don't need
> to see" policy sounds like a good design choice and not a loss of C++
> functionality. 





More information about the kde-core-devel mailing list