httpd-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Brian Havard" <>
Subject Re: How to link...
Date Sat, 24 Mar 2001 06:39:14 GMT
On Sat, 24 Mar 2001 00:18:49 -0000, David Reid wrote:

>This came to light while trying to get PHP to build as a shared object for
>BeOS with apache 2, but I don't think it'll be a problem unique to beos...
>Basically, it won't link as beos doesn't allow undefined symbols in
>libraries.  this present a problem when trying to use the brigades, filters
>etc as while I can happily link in apr, apr-util and mm, I can't actually
>link a library that has just the defines I need, well not without including
>virtually all of apache!  It'd be useful if we had a library that we built
>along with mod_so that had all the relevant pieces from apache that a module
>needs from the apache code so platforms with this restriction could build.

Sounds like BeOS shared libraries are a lot like OS/2 DLLs. I'm currently
working on making loadable modules work under OS/2 so we're probably both
on the same page right now. A key ingredient is the shared core. This is an
httpd.dll that contains all of the core code and exports all the public
symbols. The DSO modules resolve their symbols by linking against
httpd.dll's import library.

Coming up with a full set of core exports is proving a challenge though.
Parsing exports.c gets most of them but misses the macro generated hooks,
data symbols (EG ap_server_root) and a few with odd declarations that
make_export.awk doesn't spot (I'm fixing the ones of the last type). I want
to avoid a hard coded list if at all possible.

Because OS/2 is poorly supported by libtool for making shared libraries (it
does static ones just fine though is painfully slow) I've written my own
libtool replacement in C to do a better job. It's also several orders of
magnitude faster :). I'll commit this eventually (probably in apr/build) in
case it's useful to other non-libtool friendly platforms.

 |  Brian Havard                 |  "He is not the messiah!                   |
 |  |  He's a very naughty boy!" - Life of Brian |

View raw message