httpd-modules-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Nick Kew <...@apache.org>
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
http://svn.apache.org/viewvc?view=revision&revision=1131465
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


Mime
View raw message