libtool
[Top][All Lists]
Advanced

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

Re: size of output libraries on different platforms...


From: Noah Misch
Subject: Re: size of output libraries on different platforms...
Date: Mon, 24 Jul 2006 12:27:20 -0700
User-agent: Mutt/1.5.6i

On Mon, Jul 24, 2006 at 08:13:11AM -0600, Ed Hartnett wrote:
> When building a static library I notice that it's size seems to vary a
> lot from platform to platform. On my linux box it's about 1MB, on a Sun
> it's 3MB. (Building with completely different tools, one set GNU, the
> other, Sun.)
> 
> Is this expected?

In general, yes.  RISC code takes more space, and code built to an LP64 ABI
takes more space than code built to an ILP32 ABI.  I'm assuming that your "linux
box" is i386 and your Sun is SparcV9.  Binaries for i386 Solaris should be about
the same size as binaries for i386 GNU/Linux.

> Does it matter?
> 
> A recent support request for our library notes that with a recent
> version, the size of the static library increased dramatically. But he
> says this is not affecting performance.
> 
> In general, the size of a static library should only matter at link
> time anyway, since the needed functions are copied into the program
> executable, right?

Yes.

> Whereas with a shared library, the size of the library might be
> important, because the library is loaded at run-time, and larger files
> will be harder to keep in buffers than small files, as I understand
> it.

Yes.  The dynamic linker will map the entire shared library into the process
address space; a larger library will take longer to map at startup, and it may
yield more cache misses during operation.




reply via email to

[Prev in Thread] Current Thread [Next in Thread]