gold patch committed: Skip incompatible objects

Michael Hennebry
Mon Mar 16 15:17:00 GMT 2009

On Fri, 13 Mar 2009, Ian Lance Taylor wrote:

> When the GNU linker searches for an input file or an archive, if it
> finds an incompatible file, it skips it and keeps searching.  An object
> is incompatible if it is built for a target other than the one being
> linked.  An archive is incompatible if it contains an incompatible
> object.  A script is incompatible if it uses an OUTPUT_FORMAT command to
> name a target other than the one being linked.  The GNU linker issues a
> warning when it skips a file, unless --no-warn-search-mismatch is used.

IIRC linkers generally and GNU's in particular
*quietly* skip -L directories they can't find.
Usually that isn't too bad.
Sometimes it's the reason a failure to link is mysterious to me.
It would be nice if, at least in the case of a failure to link,
a failure to find a directory became noisy.

"Pessimist: The glass is half empty.
Optimist:   The glass is half full.
Engineer:   The glass is twice as big as it needs to be."

More information about the Binutils mailing list