should 'ld -u sym' cause an error if sym not present?

Nick Clifton nickc@redhat.com
Wed May 26 15:46:00 GMT 2004
Hi Chris,

> so, i was just messing around with ld -u, and noticed that it doesn't
> seem to cause an error of the undefined symbol isn't available (even
> if doing a final link, in an environment w/o shlibs -- i know those
> things are some reasonable variables for generating undefined
> symbols).
> 
> Should it?  I'd think so, given that the undefined symbol was
> explicitly requested.

I think that it should - but I am worried that if we change this 
behaviour we will break build environments were a whole selection of 
undefined symbols are supplied to the linker when only a few of them are 
relevant to any particular link.

Maybe a better solution would be to extend the --unresolved-symbols 
switch to include an option to report unresolved command line symbols 
(using the method specified by --warn-unresolved-symbols / 
--error-unresolved-symbols).

Cheers
   Nick



More information about the Binutils mailing list