RFC and PATCH - Defining variables in the linker script without defining them as symbols on the file

Nick Clifton nickc@redhat.com
Wed Jul 21 15:39:00 GMT 2004

Hi Ian,

>>Because it was never programmed not to.  There is no good reason to
>>accept this, and in fact I agree that the parser ought to issue an
>>error message.  It is just that I doubt if anyone has ever done this
>>with a linker script before.

> Note that there is a very good reason to accept
>     foo = bar
> if bar is defined in some .o file.

Oh indeed - I meant that an error should be produced only when bar is 
not defined anywhere.

> I don't think you can report an error in the parser.

Which is presumably why the undefined symbol is created in the first 
place.  Hmm, I guess that we have to live with this behaviour, so the 
right thing to do would be to document it, yes ?


More information about the Binutils mailing list