libtool & DHCP
Francis Dupont
fdupont at isc.org
Mon Mar 5 22:40:36 UTC 2012
> WOW!.
>
> that is something.
=> IMHO it should be very interesting to remove the unused files from
the bind libs before creating the object. It is a standard garbage
collection process:
- get the list of external symbols for each file
- get the list of references we need from the DHCP tools
- compute the list of required files by recursively following the
references
I remember something similar with old (i.e., before Solaris) SunOS
C library: the external symbols where extracted and given to a
topological sort (standard Unix tsort(1)). The idea was to get
the files in the archive (aka the static library) in the dependency
order so to get efficient linking process even without the table
created by ranlib...
So I believe this tool already exists.
> On Mar 5, 2012, at 5:16 PM, Francis Dupont wrote:
>
> > I tried to reduce the DHCP tool footprint for CPEs using libtool:
> > - run libtoolize
> > - add a --with-libtool to configure.ac
> > - update Makefile.am files
> > - patch cltest.c (or don't build it)
> >
> > On my Fedora 16 64 bits, stripped binaries so mainly text,
> >
> > before:
> > dhclient -> 1552648
> > dhcrelay -> 1465032
> >
> > after:
> > dhclient -> 122968
> > dhrelay -> 24256
> > libdns -> 1084568
> > libdhcp -> 331032
> >
> > so there is a clear win as soon as the libraries are shared by
> > two or more tools.
Francis Dupont <fdupont at isc.org>
More information about the sdcpe-devel
mailing list