cURL / Mailing Lists / curl-library / Single Mail

curl-library

Re: [Patch] Disable multi API support

From: Phil Blundell <pb_at_reciva.com>
Date: Wed, 29 Oct 2008 08:50:03 +0000

On Tue, 2008-10-28 at 23:52 -0700, Dan Fandrich wrote:
> When linking with static libs, the linker will not include modules that
> aren't used. So most of the multi functions will be automatically excluded
> with no changes to the libcurl ABI. Some things could possibly be
> rearranged slightly in the source to give the linker more leeway in this,
> though.

If you compile the library with -ffunction-sections, and link with
-Wl,--gc-sections, the compiler will be able to throw away unused code
at the granularity of functions rather than files. No rearrangement of
the source required :-)

p.
Received on 2008-10-29