forked from Imagelibrary/binutils-gdb
* 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.
This commit is contained in:
12
ld/ldctor.c
12
ld/ldctor.c
@@ -1,6 +1,7 @@
|
||||
/* ldctor.c -- constructor support routines
|
||||
Copyright 1991, 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001,
|
||||
2002, 2003, 2004, 2006, 2007, 2008 Free Software Foundation, Inc.
|
||||
2002, 2003, 2004, 2006, 2007, 2008, 2009
|
||||
Free Software Foundation, Inc.
|
||||
By Steve Chamberlain <sac@cygnus.com>
|
||||
|
||||
This file is part of the GNU Binutils.
|
||||
@@ -198,7 +199,6 @@ void
|
||||
ldctor_build_sets (void)
|
||||
{
|
||||
static bfd_boolean called;
|
||||
lang_statement_list_type *old;
|
||||
bfd_boolean header_printed;
|
||||
struct set_info *p;
|
||||
|
||||
@@ -244,10 +244,8 @@ ldctor_build_sets (void)
|
||||
}
|
||||
}
|
||||
|
||||
old = stat_ptr;
|
||||
stat_ptr = &constructor_list;
|
||||
|
||||
lang_list_init (stat_ptr);
|
||||
lang_list_init (&constructor_list);
|
||||
push_stat_ptr (&constructor_list);
|
||||
|
||||
header_printed = FALSE;
|
||||
for (p = sets; p != NULL; p = p->next)
|
||||
@@ -372,5 +370,5 @@ ldctor_build_sets (void)
|
||||
lang_add_data (size, exp_intop (0));
|
||||
}
|
||||
|
||||
stat_ptr = old;
|
||||
pop_stat_ptr ();
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user