This is the mail archive of the
mailing list for the glibc project.
Re: DSO issue
- To: email@example.com
- Subject: Re: DSO issue
- From: Geoff Keating <firstname.lastname@example.org>
- Date: Tue, 8 Sep 1998 22:08:23 +1000
- CC: email@example.com, firstname.lastname@example.org
- References: <19980907093218.A10041@engelschall.com> <19980907134551.A7748@mindcryme.com>
> Date: Mon, 7 Sep 1998 13:45:51 -0400
> From: Dan Jacobowitz <email@example.com>
> On Mon, Sep 07, 1998 at 09:32:18AM +0200, Ralf S. Engelschall wrote:
> > Building mod_auth_dbm.so works on most platforms because there the DBM stuff
> > is in libc which is always available to DSOs ;-). The SHARED_CHAIN is on
> > 1.3.2-dev. Sorry, it was added after 1.3.1.
> [background for crosspost to libc-alpha]
> I am trying to build Apache under glibc 2.1 with db.h and -ldb. I'm
> encountering a problem with loaded modules not being able to see
> symbols unless explicitly linked against -ldb, something not necessary
> on i386 and glibc 2.0.7.
> I just want to add one more question to this...
> On Debian 2.0 (glibc 2.0.7), the dbm stuff is not in libc.
> mod_auth_dbm is linked only against libc. Apache, however, is linked
> against libdb. This works. On powerpc and glibc 2.0.95, the situation
> is similar: dbm in libdb, apache linked against -ldb, mod_auth_dbm
> linked only against libdb. This fails.
> Oddly, mod_auth_db (which requires dbopen, also from libdb) loads fine.
> It looks like some kind of linker confusion. Ahah - the missing
> symbols from mod_auth_dbm are strong symbols and dbopen is weak. Are
> we sufficiently confused yet? I could understand the other way around,
> but it seems that only the weakly linked symbols are propogating to
> dlopen()'d modules.
Under binutils 2.9.4 and earlier, there is a bug involving weak
symbols in executables. This may or may not be affecting this...
A similar thing works for me with PAM and -ldl. I haven't got around
to building apache yet---by a strange coincidence, I just downloaded
Hmmm. What versions are the symbols in the three files? Can you run
objdump -T and show me the symbols involved?
In general, though, you must link against the libraries a shared
object uses, otherwise you can expect strange things to happen---for
instance, stdio won't work.
Geoffrey Keating <firstname.lastname@example.org>