Re: gtkmm code size



On Thu, 2006-05-11 at 11:16 +0200, dodji Seketeli wrote:
> Hello,
> 
> I wonder how the default symbols visibilty directives would affect the
> total code size of gtkmm.
> 
> In other words, if we say (like on win32) symbols are *not* exported by default,
> and we explicitely flag the exported symbols, do you think we will
> gain something ?
> 
> The new __attribute__ ((visibility("default"))) and __attribute__
> ((visibility("hidden")))
> directives of gcc make this technique more useable than the older way
> (maintain a
> separate file with the list of the exported symbols) that was bug prone.
> 
> Maybe we have to think about how to integrate this thing in the coming versions
> of gtkmm.

Feel free to try, but I am very afraid of missing even one symbol and
causing big problems for existing applications. I'd much prefer to
export everything by default and mark some things as not-exported.

I did try to hack libtool to allow me to use regex to exclude anything
with "Anonymous" in the name, to exclude anonymous namespaces, but it
made no difference to code size, though the symbols no longer showed up
in the nm output. Obviously there's more to it than that.

> Checkout the documentation at http://gcc.gnu.org/wiki/Visibility .

-- 
Murray Cumming
murrayc murrayc com
www.murrayc.com
www.openismus.com




[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]