diff options
author | Alan Modra <amodra@bigpond.net.au> | 2011-01-13 13:06:21 +0000 |
---|---|---|
committer | Alan Modra <amodra@bigpond.net.au> | 2011-01-13 13:06:21 +0000 |
commit | 52ce512325a666c91eb0e6464aa65f36dfa4447a (patch) | |
tree | c7280665ef0e9dcf48ca2314a12e12863b27cb42 /ld/emultempl | |
parent | b549e669f28b6f39ac709ecc201182b49fe765fa (diff) | |
download | binutils-redhat-52ce512325a666c91eb0e6464aa65f36dfa4447a.tar.gz |
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/emultempl')
-rw-r--r-- | ld/emultempl/beos.em | 4 | ||||
-rw-r--r-- | ld/emultempl/pe.em | 10 | ||||
-rw-r--r-- | ld/emultempl/pep.em | 11 | ||||
-rw-r--r-- | ld/emultempl/spuelf.em | 5 | ||||
-rw-r--r-- | ld/emultempl/xtensaelf.em | 4 |
5 files changed, 18 insertions, 16 deletions
diff --git a/ld/emultempl/beos.em b/ld/emultempl/beos.em index abd3979b38..708a2a9d3b 100644 --- a/ld/emultempl/beos.em +++ b/ld/emultempl/beos.em @@ -8,7 +8,7 @@ fi fragment <<EOF /* This file is part of GLD, the Gnu Linker. Copyright 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, - 2005, 2006, 2007, 2008, 2009 Free Software Foundation, Inc. + 2005, 2006, 2007, 2008, 2009, 2010, 2011 Free Software Foundation, Inc. This file is part of the GNU Binutils. @@ -351,7 +351,7 @@ gld_${EMULATION_NAME}_set_symbols (void) for (j = 0; init[j].ptr; j++) { long val = init[j].value; - lang_add_assignment (exp_assop ('=', init[j].symbol, exp_intop (val))); + lang_add_assignment (exp_assign (init[j].symbol, exp_intop (val))); if (init[j].size == sizeof(short)) *(short *)init[j].ptr = val; else if (init[j].size == sizeof(int)) diff --git a/ld/emultempl/pe.em b/ld/emultempl/pe.em index b4d7a63671..0231fa77a7 100644 --- a/ld/emultempl/pe.em +++ b/ld/emultempl/pe.em @@ -9,7 +9,7 @@ rm -f e${EMULATION_NAME}.c (echo;echo;echo;echo;echo)>e${EMULATION_NAME}.c # there, now line numbers match ;-) fragment <<EOF /* Copyright 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, - 2005, 2006, 2007, 2008, 2009, 2010 Free Software Foundation, Inc. + 2005, 2006, 2007, 2008, 2009, 2010, 2011 Free Software Foundation, Inc. This file is part of the GNU Binutils. @@ -946,8 +946,8 @@ gld_${EMULATION_NAME}_set_symbols (void) long val = init[j].value; lang_assignment_statement_type *rv; - rv = lang_add_assignment (exp_assop ('=', GET_INIT_SYMBOL_NAME (j), - exp_intop (val))); + rv = lang_add_assignment (exp_assign (GET_INIT_SYMBOL_NAME (j), + exp_intop (val))); if (init[j].size == sizeof (short)) *(short *) init[j].ptr = val; else if (init[j].size == sizeof (int)) @@ -1722,8 +1722,8 @@ gld_${EMULATION_NAME}_unrecognized_file (lang_input_statement_type *entry ATTRIB = pe_def_file->base_address; init[IMAGEBASEOFF].inited = 1; if (image_base_statement) - image_base_statement->exp = exp_assop ('=', "__image_base__", - exp_intop (pe.ImageBase)); + image_base_statement->exp = exp_assign ("__image_base__", + exp_intop (pe.ImageBase)); } if (pe_def_file->stack_reserve != -1 diff --git a/ld/emultempl/pep.em b/ld/emultempl/pep.em index e407296297..56687d673e 100644 --- a/ld/emultempl/pep.em +++ b/ld/emultempl/pep.em @@ -8,7 +8,8 @@ fi rm -f e${EMULATION_NAME}.c (echo;echo;echo;echo;echo)>e${EMULATION_NAME}.c # there, now line numbers match ;-) fragment <<EOF -/* Copyright 2006, 2007, 2008, 2009, 2010 Free Software Foundation, Inc. +/* Copyright 2006, 2007, 2008, 2009, 2010, 2011 + Free Software Foundation, Inc. Written by Kai Tietz, OneVision Software GmbH&CoKg. This file is part of the GNU Binutils. @@ -858,8 +859,8 @@ gld_${EMULATION_NAME}_set_symbols (void) bfd_vma val = init[j].value; lang_assignment_statement_type *rv; - rv = lang_add_assignment (exp_assop ('=', GET_INIT_SYMBOL_NAME (j), - exp_intop (val))); + rv = lang_add_assignment (exp_assign (GET_INIT_SYMBOL_NAME (j), + exp_intop (val))); if (init[j].size == sizeof (short)) *(short *) init[j].ptr = (short) val; else if (init[j].size == sizeof (int)) @@ -1525,8 +1526,8 @@ gld_${EMULATION_NAME}_unrecognized_file (lang_input_statement_type *entry ATTRIB = pep_def_file->base_address; init[IMAGEBASEOFF].inited = 1; if (image_base_statement) - image_base_statement->exp = exp_assop ('=', "__image_base__", - exp_intop (pep.ImageBase)); + image_base_statement->exp = exp_assign ("__image_base__", + exp_intop (pep.ImageBase)); } if (pep_def_file->stack_reserve != -1 diff --git a/ld/emultempl/spuelf.em b/ld/emultempl/spuelf.em index ff6785ca6e..92f2d163d3 100644 --- a/ld/emultempl/spuelf.em +++ b/ld/emultempl/spuelf.em @@ -1,5 +1,6 @@ # This shell script emits a C file. -*- C -*- -# Copyright 2006, 2007, 2008, 2009 Free Software Foundation, Inc. +# Copyright 2006, 2007, 2008, 2009, 2010, 2011 +# Free Software Foundation, Inc. # # This file is part of the GNU Binutils. # @@ -164,7 +165,7 @@ spu_place_special_section (asection *s, asection *o, const char *output_name) push_stat_ptr (&os->children); e_size = exp_intop (params.line_size - s->size); - lang_add_assignment (exp_assop ('=', ".", e_size)); + lang_add_assignment (exp_assign (".", e_size)); pop_stat_ptr (); } lang_add_section (&os->children, s, os); diff --git a/ld/emultempl/xtensaelf.em b/ld/emultempl/xtensaelf.em index b7da721d9a..ed015a23c6 100644 --- a/ld/emultempl/xtensaelf.em +++ b/ld/emultempl/xtensaelf.em @@ -1,5 +1,5 @@ # This shell script emits a C file. -*- C -*- -# Copyright 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010 +# Copyright 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011 # Free Software Foundation, Inc. # # This file is part of the GNU Binutils. @@ -1885,7 +1885,7 @@ ld_xtensa_insert_page_offsets (bfd_vma dot, etree_type *name_op = exp_nameop (NAME, "."); etree_type *addend_op = exp_intop (1 << xtensa_page_power); etree_type *add_op = exp_binop ('+', name_op, addend_op); - etree_type *assign_op = exp_assop ('=', ".", add_op); + etree_type *assign_op = exp_assign (".", add_op); lang_assignment_statement_type *assign_stmt; lang_statement_union_type *assign_union; |