diff options
author | Alan Modra <amodra@gmail.com> | 2009-02-16 07:25:52 +0000 |
---|---|---|
committer | Alan Modra <amodra@gmail.com> | 2009-02-16 07:25:52 +0000 |
commit | bde18da45e5dea021d600aadeab702a6f7e31cb2 (patch) | |
tree | e570a5dab586d03eb27b2864e97118cde2f5e9fa /ld/emultempl/xtensaelf.em | |
parent | 959b87241d85b42da82c45ecc4bc904895092730 (diff) | |
download | binutils-gdb-bde18da45e5dea021d600aadeab702a6f7e31cb2.tar.gz |
* ldlang.c (push_stat_ptr, pop_stat_ptr): New functions.
(stat_save, stat_save_ptr): New variables.
(lang_insert_orphan): Use push_stat_ptr and pop_stat_ptr.
(load_symbols): Likewise. Delete dead "bad_load" code.
(open_input_bfds): Warn on script containing output sections.
(lang_enter_output_section_statement): Use push_stat_ptr.
(lang_enter_group): Likewise.
(lang_leave_output_section_statement): Use pop_stat_ptr.
(lang_leave_group): Likewise.
* ldlang.h (push_stat_ptr, pop_stat_ptr): Declare.
* ldctor.c (ldctor_build_sets): Use push_stat_ptr and pop_stat_ptr.
* emultempl/beos.em (gld_${EMULATION_NAME}_set_symbols): Likewise.
* emultempl/pe.em (gld_${EMULATION_NAME}_set_symbols): Likewise.
* emultempl/pep.em (gld_${EMULATION_NAME}_set_symbols): Likewise.
* emultempl/spuelf.em (spu_place_special_section): Likewise.
* emultempl/xtensaelf.em (ld_xtensa_insert_page_offsets): Likewise.
Diffstat (limited to 'ld/emultempl/xtensaelf.em')
-rw-r--r-- | ld/emultempl/xtensaelf.em | 11 |
1 files changed, 4 insertions, 7 deletions
diff --git a/ld/emultempl/xtensaelf.em b/ld/emultempl/xtensaelf.em index 6651a50c960..acc32909824 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 +# Copyright 2003, 2004, 2005, 2006, 2007, 2008, 2009 # Free Software Foundation, Inc. # # This file is part of the GNU Binutils. @@ -1951,20 +1951,17 @@ ld_xtensa_insert_page_offsets (bfd_vma dot, lang_assignment_statement_type *assign_stmt; lang_statement_union_type *assign_union; lang_statement_list_type tmplist; - lang_statement_list_type *old_stat_ptr = stat_ptr; /* There is hidden state in "lang_add_assignment". It appends the new assignment statement to the stat_ptr list. Thus, we swap it before and after the call. */ - tmplist.head = NULL; - tmplist.tail = &tmplist.head; - - stat_ptr = &tmplist; + lang_list_init (&tmplist); + push_stat_ptr (&tmplist); /* Warning: side effect; statement appended to stat_ptr. */ assign_stmt = lang_add_assignment (assign_op); assign_union = (lang_statement_union_type *) assign_stmt; - stat_ptr = old_stat_ptr; + pop_stat_ptr (); assign_union->header.next = l; *(*stack_p)->iterloc.loc = assign_union; |