[PATCH] ld: Skip the LTO archive member only for the earlier DSO

Michael Matz matz@suse.de
Thu Apr 10 12:30:47 GMT 2025


Hello,

On Wed, 9 Apr 2025, H.J. Lu wrote:

> > > > Obviously it's still better to have this patch now, as it fixes a
> > > > regression in the wild, but I wonder if adding more and more conditions
> > > > for each testcase we come along is the right approach to deal with this.
> > > > Can you describe what first_hash is _really_ supposed to be and how it
> > > > interacts with the linkers symbol table vs. the two LTO symbol lookup
> > > > phases?
> > >
> > > first_hash has the first definition for dynamic symbol or archive symbol
> > > lookup.
> >
> > Well, yes, that's how it's currently filled.  But why, and how does that
> > interact with the linker symbol table, or rather: how have you designed it
> > to interact?  I will also say that the above isn't the full truth, it
> > contains the first definition for archive symbols _only_ when at the point
> > of seeing it no reference to it existed yet.
> >
> 
> The design goal is to support shared libraries and archives with LTO.

Thanks for stating the obvious.  I haven't asked for the design goal, but 
the design, i.e. how that goal is intended to be achieved.  Though, I'm 
now sorry to have asked that.


Ciao,
Michael.


More information about the Binutils mailing list