[PATCH] Shared samba build

Luke Mewburn luke at mewburn.net
Mon Nov 14 06:30:48 GMT 2005


On Wed, Oct 26, 2005 at 02:17:08PM +0200, Jelmer Vernooij wrote:
  | Rather then linking everything into one big library, I think we should
  | clearly keep all subsystems seperate. Otherwise, we might end up with
  | the dependency hell we had (have?) in Samba3, with libbigballofmud and
  | the like.

What exactly is the problem with having one large library
that all of the Samba applications are linked against?

A while ago I was amused to find that Samba3 has manually
maintained lists of object dependencies for each program.
This means that binaries are bigger than they need to be
because the linker can't exclude unnecessary object files
from the list.
If a library (static libsamba3.a or dynamic libsamba3.so)
was used instead, this would mean that the linker could select
only the object files from the library that were actually necessary.

Here's some numbers I posted in November 2004:

                                all progs       nmbd+smbd
                                ---------       ---------
        default build:          16770 KB        2880 KB
        my build, libsamba.a    11870 KB        2656 KB
        my build, libsamba.so   3438 KB         2780 KB (includes libsamba.so)

Notice the size difference even between the first two entries
(both static linking the samba-specific objects)

cheers,
Luke.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 186 bytes
Desc: not available
Url : http://lists.samba.org/archive/samba-technical/attachments/20051114/2c13cca4/attachment.bin


More information about the samba-technical mailing list