[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: ld fails to link if library order is reversed

From: Ian Lance Taylor
Subject: Re: ld fails to link if library order is reversed
Date: 07 Mar 2005 17:22:09 -0500
User-agent: Gnus/5.09 (Gnus v5.9.0) Emacs/21.3

Nilmoni Deb <address@hidden> writes:

> > 1) It's traditional Unix behaviour, so changing it will break some
> >    programs.
> Any example ?

I don't have any specific examples, no.

> > 2) It is more efficient, as the linker can just walk through an
> >    archive's symbol table, include all required objects, and then move
> >    on.
> In other words, save an average of half the time by not looking back.

Not that it really matters, but I think the analysis is a little more
complicated than that.  You would have to keep a separate hash table
for identifiers found in an archive symbol table but not included in
the link yet, and then you would have to do another hash lookup for
each new undefined symbol.  Or you would have to make the regular hash
table much larger, and annotate symbols in there for 'defined but not
included in link', but that would slow down every hash table lookup on


reply via email to

[Prev in Thread] Current Thread [Next in Thread]