summaryrefslogtreecommitdiff
path: root/ld/ldgram.y
diff options
context:
space:
mode:
authorNathan Sidwell <nathan@codesourcery.com>2004-02-18 16:37:21 +0000
committerNathan Sidwell <nathan@codesourcery.com>2004-02-18 16:37:21 +0000
commit782679ef188040ddee4c2fa999f4ebcdd87380ff (patch)
tree0415e099a3db16bc27b175578b805ada568bdbe9 /ld/ldgram.y
parent4575e9698ef47a29ae89d6262a4301469ee6256b (diff)
downloadbinutils-redhat-782679ef188040ddee4c2fa999f4ebcdd87380ff.tar.gz
* ldgram.y (statement_anywhere): Add assert rule.binutils-2_15-branchpoint
* ldlang.c (exp_init_os): Add assert case. * testsuite/ld-scripts/assert.{s,t,exp}: New.
Diffstat (limited to 'ld/ldgram.y')
-rw-r--r--ld/ldgram.y3
1 files changed, 3 insertions, 0 deletions
diff --git a/ld/ldgram.y b/ld/ldgram.y
index 927114a8a1..e885f7d55f 100644
--- a/ld/ldgram.y
+++ b/ld/ldgram.y
@@ -386,6 +386,9 @@ statement_anywhere:
ENTRY '(' NAME ')'
{ lang_add_entry ($3, FALSE); }
| assignment end
+ | ASSERT_K {ldlex_expression ();} '(' exp ',' NAME ')'
+ { ldlex_popstate ();
+ lang_add_assignment (exp_assert ($4, $6)); }
;
/* The '*' and '?' cases are there because the lexer returns them as