This is the mail archive of the binutils@sources.redhat.com mailing list for the binutils project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: Why no error for the unresolved '-u SYMBOL' LD option ??


Hi Max,

> I want to force the link (exctract) of some functions from a library
> file (archive).
>
> Then I add this library file in the objects list of the LD and also
> I add the option '-u SYMBOL' where SYMBOL is the name of one of the
> functions I want force to exctract from the previous archive. Ok all
> works good.
>
> But now If I miss to add the library file in the objects list the
> linker LD don't issue any error message. Why ?

Because all that the -u switch does is to tell the linker to include a
section if it contains the undefined symbol.  If there are no sections
containing the symbol then nothing is added to the linker's output.

> 	How I can force an error for this type of undefined symbols ??

Put the symbols you require into an object file and include it on
the linker's command line.

Cheers
        Nick
        


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]