How does ld link against library archives?

Erik Leunissen
Mon Dec 12 21:22:00 GMT 2005

Ian Lance Taylor wrote:
> The GNU linker is part of the binutils, and questions about it are
> appropriately directed to  See

I wasn't aware of its existence.


> For each symbol which is undefined when the linker sees the archive,
> for which a definition is provided by the archive, the linker will
> include the complete object file which defines the symbol.  If
> including an object file causes the linker to see new undefined
> symbols, the linker will check to see whether those symbols are
> defined in the archive, and for each such symbol will include the
> object file which defines it.  This process is repeated until there
> are no new undefined symbols which can be satisfied by the archive.

Completely clear to me,


Erik Leunissen

> Ian

More information about the Gcc-help mailing list