-llibrary's position in ld cause with -static
Alan Modra
amodra@bigpond.net.au
Wed Sep 10 07:11:00 GMT 2003
On Tue, Sep 09, 2003 at 10:02:45PM +0800, Zhang Le wrote:
> Could you give me a explanation of this behavior?
Extract from ld.info:
The linker will search an archive only once, at the location where it is
specified on the command line. If the archive defines a symbol which
was undefined in some object which appeared before the archive on the
command line, the linker will include the appropriate file(s) from the
archive. However, an undefined symbol in an object appearing later on
the command line will not cause the linker to search the archive again.
--
Alan Modra
IBM OzLabs - Linux Technology Centre
More information about the Gcc-bugs
mailing list