This is the mail archive of the binutils@sources.redhat.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]
Other format: [Raw text]

Re: RFC: linker enhancements


I guess I didn't change the comments when I made the change:

elflink.c: 903
  /* If the new weak definition comes from a relocatable file and the
     old symbol comes from a dynamic object, we treat the new one as
     strong.  */

elflink.c: 922
  /* If the old weak definition comes from a relocatable file and the
     new symbol comes from a dynamic object, we treat the old one as
     strong.  */

The old comments are wrong now.


H.J.
----
On Thu, Mar 18, 2004 at 08:43:34AM +1030, Alan Modra wrote:
> On Wed, Mar 17, 2004 at 02:06:46PM -0800, H. J. Lu wrote:
> > I don't see how it can happen. A definition in regular object will
> > never be overridden by a dynamic definition. If it does happen, it
> > is not intended. I'd like to fix it.
> 
> elflink.c:1036
>      We prefer a non-weak definition in a shared library to a weak
>      definition in the executable unless it comes from a DT_NEEDED
>      entry of a shared object, in which case, the DT_NEEDED entry
>      may not be required at the run time.  */
> 
> elflink.c:1197
>   /* Handle the special case of a weak definition in a regular object
>      followed by a non-weak definition in a shared object.  In this
>      case, we prefer the definition in the shared object unless it
>      comes from a DT_NEEDED entry of a shared object, in which case,
>      the DT_NEEDED entry may not be required at the run time.  */
> 
> -- 
> Alan Modra
> IBM OzLabs - Linux Technology Centre


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