From bde18da45e5dea021d600aadeab702a6f7e31cb2 Mon Sep 17 00:00:00 2001 From: Alan Modra Date: Mon, 16 Feb 2009 07:25:52 +0000 Subject: * 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. --- ld/emultempl/spuelf.em | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) (limited to 'ld/emultempl/spuelf.em') diff --git a/ld/emultempl/spuelf.em b/ld/emultempl/spuelf.em index 376889a..396fe80 100644 --- a/ld/emultempl/spuelf.em +++ b/ld/emultempl/spuelf.em @@ -160,12 +160,11 @@ spu_place_special_section (asection *s, asection *o, const char *output_name) /* Pad this stub section so that it finishes at the end of the icache line. */ etree_type *e_size; - lang_statement_list_type *save = stat_ptr; - stat_ptr = &os->children; + push_stat_ptr (&os->children); e_size = exp_intop (params.line_size - s->size); lang_add_assignment (exp_assop ('=', ".", e_size)); - stat_ptr = save; + pop_stat_ptr (); } lang_add_section (&os->children, s, os); } @@ -558,7 +557,7 @@ embedded_spu_file (lang_input_statement_type *entry, const char *flags) if (lang_add_input_file (oname, lang_input_file_is_file_enum, NULL) == NULL) return FALSE; - /* lang_add_input_file put the new list entry at the end of the statement + /* lang_add_input_file puts the new list entry at the end of the statement and input file lists. Move it to just after the current entry. */ new_ent = *old_stat_tail; *old_stat_tail = NULL; -- cgit v1.1