[Xcb] hidden-visibility and library size

Jamey Sharp jamey at minilop.net
Sat Dec 24 03:14:02 PST 2005

On Sat, Dec 24, 2005 at 11:36:58AM +0100, Vincent Torri wrote:
> maybe we should try the hidden-visibility feature of gcc 4.*.

I thought that feature was available in at least some 3.x versions too.

> I've experienced a big decrease of the size of the libraries with
> other projects.

I've been meaning to do that to XCB's non-public functions, yeah.
Besides code size reductions I gather there are benefits in application
startup time during the dynamic linking process. So I'd love to get a

Visibility doesn't help with any of the auto-generated code, though,
because all of that code is public and uses only public XCB APIs.

> Also, stripping the library can decrease its size too. I don't think
> that we use it.

That's more of a choice for distributors to make -- Debian, for example,
automatically runs strip across all executables and libraries by
default. Obviously running strip as part of the build process is not
useful for us developers though, as it pretty much ruins debugging.

And my code-size measurements are always done using the `size` command,
which reports only how big the text, data, and bss sections are --
nothing about debugging symbols etc. So for the purposes of comparing
memory footprint, we don't need to run strip.

-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 189 bytes
Desc: Digital signature
Url : http://lists.freedesktop.org/archives/xcb/attachments/20051224/a41ca25a/attachment.pgp

More information about the Xcb mailing list