The dynamic software update patch produced by the patch generator is compiled using the hcucc.pl compiler to produce a dynamically loadable shared object. Figure 5-6 shows an example of preparing a dynamic software update patch that will update the vsFTPd daemon from version 2.0.4 to version 2.0.5. First, the patch is compiled to also be updateable itself. The "--update-version=205" argument is used to indicate that the patch will update the original version to the new version 2.0.5. Then the patch is re-linked to create a dynamically loadable shared object.
Figure 5-6. Compiling a dynamic software update patch for vsFTPd from 2.0.4 to 2.0.5.
# Prepare the patch to also be dynamically updateable bash$ hcucc.pl -fPIC \ -c vsftpd_comb.c_v204_to_v205.hcupatch.c \ -o vsftpd_comb.c_v204_to_v205.hcupatch.o \ --update-version=205 # Create a dynamically loadable shared object bash$ hcucc.pl -shared -Wl,-soname=vsftpd_v205_to_v205.so \ -o libvsftpd_v205_to_v205.so.205 \ vsftpd_comb.c_v204_to_v205.hcupatch.o
![]() | Unlike preparing updateable programs in Section 4.1, no "--base-version" argument is supplied here. The dynamic software update patch is not the original program: it is an update. When the patch is applied the original program is already running. |