httpd-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Alexei Kosut <ako...@leland.Stanford.EDU>
Subject Re: apache/linux modules
Date Tue, 03 Feb 1998 04:41:34 GMT
On Mon, 2 Feb 1998, Marc Slemko wrote:

> On Mon, 2 Feb 1998, Alexei Kosut wrote:
> > On Mon, 2 Feb 1998, Cristian Gafton wrote:
> > 
> > > I propose to have the modules shared objects named like Each
> > > module exports a symbol (struct module) named "module". We load all the
> > > .so files and try to resolve in each module the "module" symbol. We then
> > > fill in the preloaded_modules and prelinked_modules arrays with relevant
> > > information and proceed further.
> > 
> > "We" shouldn't do anything. A module that loads modules (e.g., mod_dld,
> > mod_dll, mod_so) just needs to extract the module structure and call
> > add_module() on it. The Apache core takes care of the rest.
> How do you extract this structure if we don't know the name?

I was talking about the "fill in the preloaded_modules and
prelinked_modules arrays" part of the paragraph. Modules shouldn't touch

Obviously, the rest of it is correct; you need a standard name, or some
way of extracting the information in another way. A good way might be for
shared modules to all use the same name for their module structure. Then
the loading module can just dlsym() that name, and it will always be
there. This is how ISAPI extensions work, for example.

(though obviously this won't work if the module is statically linked
instead of dynamically. But that's what #ifdefs are for.)

-- Alexei Kosut <> <>
   Stanford University, Class of 2001 * Apache <> *

View raw message