[linker] Allow asserts in sections
Nathan Sidwell
nathan@codesourcery.com
Tue May 22 13:41:00 GMT 2007
This patch does 2 things
1) allow assert statements inside section scripts. This means one doesn't have
to write the awful
foo : {
. = . + (ASSERT (foo, bar) & 0);
}
any more.
I also changed the lexer to not allow ',' in NAMES when in expression mode. I
kept getting tripped up by
ASSERT (FOO, "FOO zero");
which parses the first token as "FOO,". Also I recently got bitten by EXTERN
which allows both comma and whitespace to separate the symbol names. Thus
EXTERN (FOO, BAR, BAZ)
parses ok, but does not pull in the symbols you think it might.
tested on m68k-elf, ok?
nathan
--
Nathan Sidwell :: http://www.codesourcery.com :: CodeSourcery
nathan@codesourcery.com :: http://www.planetfall.pwp.blueyonder.co.uk
-------------- next part --------------
An embedded and charset-unspecified text was scrubbed...
Name: assert.diff
URL: <https://sourceware.org/pipermail/binutils/attachments/20070522/396d6be4/attachment.ksh>
More information about the Binutils
mailing list