A glibc dynamic linker or gld bug?

H.J. Lu hjl@lucon.org
Wed Jul 7 07:39:00 GMT 1999


>    > As far as I can see, this can only happen if all relocations involving
>    > the weak defined symbol are copied into the executable as dynamic
>    > relocations.
> 
>    What if the definition in executable is strong? Do you have the same
>    problem? I don't think we should worry about this.
> 
> No, we don't have the same problem if the definition in the executable
> is strong, because in that case the shared library will never override
> the definition.  The only time a shared library can override a
> definition is if it is weak in the executable.
> 

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.

-- 
H.J. Lu (hjl@gnu.org)


More information about the Binutils mailing list