cURL / Mailing Lists / curl-library / Single Mail

curl-library

Support for visibility=hidden in gcc 4.x

From: Dan Fandrich <dan_at_coneharvesters.com>
Date: Mon, 12 Jun 2006 13:59:54 -0700

I've checked in to CVS a new configure option for curl,
--enable-hidden-symbols. This enables a new gcc 4.x feature that hides
local symbols from the symbol table when creating a library. This not
only reduces the size of the library binary, but speeds application startup
time by making run-time linking faster.

It's actually a pretty small patch as it ties into the existing
CURL_EXTERN macro used to control the export table used by Windows DLLs.
I'm not quite sure whether it will work on mingw or Cygwin, but it won't
break them since it's off by default.

Turning on this option gave me a 7% reduction in size of an HTTP-only
libcurl build targeting i386 Linux. In fact, I was able to get libcurl
down to 86 KiB using the size reduction techniques listed in the INSTALL
document. Not quite at the level of a "Tiny Executable" (c.f.
http://curl.haxx.se/docs/comparison-table.html ) but close!

>>> Dan

-- 
http://www.MoveAnnouncer.com              The web change of address service
          Let webmasters know that your web site has moved
Received on 2006-06-12