Dynamically linked DHCPd

Jeff Waller jeffw at cnxntech.com
Tue Mar 13 20:38:08 UTC 2012


I've been putting this off file a while in hopes of having this all packaged up nicely, but
other things have taken my time, so I'm going to send as is now as an illustration to
show it's possible.  I think this answers an earlier request to reduce the footprint
of DHCPd executable.  This is apparently especially useful for embedded systems
where the footprint is required to be small.

Of course, I think, to some, this will be no surprise as I've seen similar in
Redhat as well as other distros, but not in the mainline source.  

With out going into details, it is a simple as doing libtoolize (this probably makes
it necessary to compile only on linux variants), slightly modify the Makefile.am
files, run automake as necessary, and then re-compile.

Perhaps a HOWTO would be in order.



yggdrasil server # ls -l /usr/local/sbin/dhcpd
-rwxr-xr-x 1 root root 1847930 Mar 13 16:18 /usr/local/sbin/dhcpd
yggdrasil server # ldd /usr/local/sbin/dhcpd
	linux-vdso.so.1 =>  (0x00007fffbd9ff000)
	libomapi.so.0 => /usr/local/lib/libomapi.so.0 (0x00007ff9caf66000)
	libdhcpctl.so.0 => /usr/local/lib/libdhcpctl.so.0 (0x00007ff9cad60000)
	libdns.so.81 => /usr/local/src/dhcp-4.2.3/bind/lib/libdns.so.81 (0x00007ff9caa52000)
	libisc.so.83 => /usr/local/src/dhcp-4.2.3/bind/lib/libisc.so.83 (0x00007ff9ca80c000)
	libdl.so.2 => /lib/libdl.so.2 (0x00007ff9ca608000)
	libcap.so.2 => /lib/libcap.so.2 (0x00007ff9ca403000)
	libc.so.6 => /lib/libc.so.6 (0x00007ff9ca0a3000)
	/lib64/ld-linux-x86-64.so.2 (0x00007ff9cb189000)
	libattr.so.1 => /lib/libattr.so.1 (0x00007ff9c9e9e000)
yggdrasil server # strip /usr/local/sbin/dhcpd
yggdrasil server # !ls  
ls -l /usr/local/sbin/dhcpd
-rwxr-xr-x 1 root root 711952 Mar 13 16:19 /usr/local/sbin/dhcpd



More information about the dhcp-users mailing list