This is the mail archive of the
binutils@sourceware.cygnus.com
mailing list for the binutils project.
Re: A glibc dynamic linker or gld bug?
- To: hjl@lucon.org
- Subject: Re: A glibc dynamic linker or gld bug?
- From: Ian Lance Taylor <ian@zembu.com>
- Date: 7 Jul 1999 11:02:31 -0400
- CC: drepper@cygnus.com, binutils@sourceware.cygnus.com
- References: <19990707145750.ACAA157BA@ocean.lucon.org>
Date: Wed, 7 Jul 1999 07:57:50 -0700 (PDT)
From: hjl@lucon.org (H.J. Lu)
> By "problem", I mean the same symbol will have different values in
> executable and DSO. When you update one of them, you won't see the
> change in the other. If you relink executable against the new DSO,
> the symbol in executable will override the one in DSO.
>
> I guess I don't understand. The DSO should have relocations for all
> uses of the symbol, so it will wind up seeing the definition in the
> executable. At runtime the symbol will not have different values.
> This is an ordinary case in which the executable overrides the DSO.
Here is the testcase.
I see what you mean. You're right, to make this work you need to use
the --export-dynamic option when you link the executable. That is the
default on Solaris, perhaps for this very reason. What a pain.
Ian