* ldlex.l: ASSERT is recognized in SCRIPT env. NAMES cannot

contain commas in EXP env.
	* ldgram.y (extern_name_list): Push to EXP env, move body to ...
	(extern_name_list_body): ... here.
	(script_file, ifile_list): Reformat.
	(statement): Add ASSERT.
testsuite:
	* ld-scripts/assert.t: Add additional cases.
	* ld-scripts/extern.t, ld-scripts/extern.s,
	ld-scripts/extern.exp: New.
This commit is contained in:
Nathan Sidwell
2007-05-24 09:24:09 +00:00
parent 01be46b59d
commit 8545d1a9dd
8 changed files with 129 additions and 16 deletions

View File

@@ -1,5 +1,9 @@
SECTIONS
{
.empty : {}
.empty : {
here = !.;
ASSERT (!., "dot is not zero");
ASSERT (here, "here is zero");
}
ASSERT (!SIZEOF(.empty), "Empty is not empty")
}