[NTLUG:Discuss] Apache and Perl

Steve Baker sjbaker1 at airmail.net
Fri Dec 20 14:44:27 CST 2002


Bobby Wrenn wrote:

 > What is a DSO anyway?

A DSO is just a '.so' library that the program links to
after it's started running using the 'dlopen/dlsym/dlclose'
mechanism.  You compile it just like any other '.so' library
and at runtime, the application does a 'dlopen' on that file
then calls 'dlsym' to fetch the addresses of any functions it
wants to call, and ultimately a 'dlclose' to unlink the library
and reclaim the memory it occupied.

It's convenient both because the application's binary size is smaller
and because you don't have to link it with a bunch of stuff you'll never
use "just in case".  There are also cases (with thinks like 'plugins')
where the application may not even know that a particular library exists
at compile time and is told to load it up and call functions from within
it only at runtime.

DSO's are *cool*.

---------------------------- Steve Baker -------------------------
HomeEmail: <sjbaker1 at airmail.net>    WorkEmail: <sjbaker at link.com>
HomePage : http://web2.airmail.net/sjbaker1
Projects : http://plib.sf.net    http://tuxaqfh.sf.net
            http://tuxkart.sf.net http://prettypoly.sf.net





More information about the Discuss mailing list