This is the mail archive of the mailing list for the glibc project.

Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]

Re: DSO issue

> Date: Mon, 7 Sep 1998 13:45:51 -0400
> From: Dan Jacobowitz <>

> On Mon, Sep 07, 1998 at 09:32:18AM +0200, Ralf S. Engelschall wrote:
> > Building 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.
> [/background]
> 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 <>

Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]