aboutsummaryrefslogtreecommitdiff
path: root/ld/ldgram.y
diff options
context:
space:
mode:
authorAlan Modra <amodra@gmail.com>2011-01-13 13:06:22 +0000
committerAlan Modra <amodra@gmail.com>2011-01-13 13:06:22 +0000
commit2e57b2afce83621b72b2ac8b54635ad199663dec (patch)
treea162756c66238efb1835bc8af47ad6fe0fa9177a /ld/ldgram.y
parent15b8ba76931a8fed121a0f634388e828b3cbc063 (diff)
downloadgdb-2e57b2afce83621b72b2ac8b54635ad199663dec.zip
gdb-2e57b2afce83621b72b2ac8b54635ad199663dec.tar.gz
gdb-2e57b2afce83621b72b2ac8b54635ad199663dec.tar.bz2
PR ld/12356
* ldexp.h (exp_assop): Delete. (exp_assign, exp_defsym): Declare. * ldexp.c (exp_assop): Make static, handle all assignment variations. (exp_assign, exp_defsym): New functions. (exp_provide): Use exp_assop. * ldgram.y (defsym_expr): Use exp_defsym. * ldctor.c, * ldgram.y, * ldlang.c, * mri.c, * emultempl/beos.em, * emultempl/pe.em, * emultempl/pep.em, * emultempl/spuelf.em, * emultempl/xtensaelf.em: Update exp_assop -> exp_assign.
Diffstat (limited to 'ld/ldgram.y')
-rw-r--r--ld/ldgram.y18
1 files changed, 9 insertions, 9 deletions
diff --git a/ld/ldgram.y b/ld/ldgram.y
index ed0aaa7..49d212b 100644
--- a/ld/ldgram.y
+++ b/ld/ldgram.y
@@ -1,6 +1,6 @@
/* A YACC grammar to parse a superset of the AT&T linker scripting language.
Copyright 1991, 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999, 2000,
- 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009
+ 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011
Free Software Foundation, Inc.
Written by Steve Chamberlain of Cygnus Support (steve@cygnus.com).
@@ -176,7 +176,7 @@ defsym_expr:
NAME '=' exp
{
ldlex_popstate();
- lang_add_assignment(exp_assop($3,$2,$4));
+ lang_add_assignment (exp_defsym ($2, $4));
}
;
@@ -657,15 +657,15 @@ end: ';' | ','
assignment:
NAME '=' mustbe_exp
{
- lang_add_assignment (exp_assop ($2, $1, $3));
+ lang_add_assignment (exp_assign ($1, $3));
}
| NAME assign_op mustbe_exp
{
- lang_add_assignment (exp_assop ('=', $1,
- exp_binop ($2,
- exp_nameop (NAME,
- $1),
- $3)));
+ lang_add_assignment (exp_assign ($1,
+ exp_binop ($2,
+ exp_nameop (NAME,
+ $1),
+ $3)));
}
| PROVIDE '(' NAME '=' mustbe_exp ')'
{
@@ -983,7 +983,7 @@ section: NAME { ldlex_expression(); }
opt_exp_with_type
{
ldlex_popstate ();
- lang_add_assignment (exp_assop ('=', ".", $3));
+ lang_add_assignment (exp_assign (".", $3));
}
'{' sec_or_group_p1 '}'
| INCLUDE filename