httpd-modules-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Nick Kew <>
Subject Re: dlopen a .so from a module
Date Thu, 07 Jan 2016 06:16:02 GMT
On Wed, 2016-01-06 at 21:30 -0600, Mark Taylor wrote:
> Hi all,
> I have a module that dlopens a .so, gets a handle to a function in the so
> and calls it. The function in the so calls ap_rputs.  dlopen returns the
> error 'undefined symbol ap_rputs'.

Looks like you're falling victim to
which also points to ap_rwrite as an obvious workaround.
That would've caught me out, too!

> nm tells me ap_rputs is defined in httpd, and via some dark magic, httpd
> symbols are available to modules compiles the apxs -c.  But when I compile
> my .so to be loaded into my module, the symbols from httpd aren't
> available. My hypothesis, now disproven, was that symbols available to my
> module would be visible to my .so.

Does your module use dlopen or apr_dso_load/family?

Is your module loading/unloading anything per-request or
per-connection?  If not, why not use LoadFile in httpd.conf
to load the .so?

Nick Kew

View raw message