This is the mail archive of the binutils@sourceware.cygnus.com mailing list for the binutils project.


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

Re: A glibc dynamic linker or gld bug?


   Date: Tue, 6 Jul 1999 21:45:02 -0700 (PDT)
   From: hjl@lucon.org (H.J. Lu)

   > If we do not, then we will fail to implement the model correctly.
   > Consider the case in which a main executable defines a symbol weakly,
   > and a shared library does not define it at all.  At present we will
   > not generate any dynamic relocations for the weak defined symbol.
   > 
   > However, if we later replace the shared library with one which does
   > have a strong definition for the symbol, then correct operation would
   > appear to require that that strong symbol override the weak symbol in
   > the main executable.
   > 
   > 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.

Ian

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