diff options
author | law <law@138bc75d-0d04-0410-961f-82ee72b054a4> | 1997-11-25 18:55:32 +0000 |
---|---|---|
committer | law <law@138bc75d-0d04-0410-961f-82ee72b054a4> | 1997-11-25 18:55:32 +0000 |
commit | dade071107e370e2d59447fe591032cf72b6e111 (patch) | |
tree | a915de9cb92b482fd48a7e8ad8c61a1d3e0733bc /gcc/crtstuff.c | |
parent | c96dd0ff2cdcb55cbf4a5fb5cadf569736559ba8 (diff) | |
download | gcc-dade071107e370e2d59447fe591032cf72b6e111.tar.gz |
* crtstuff.c (do_global_dtors_aux): Handle multiple calls better.
git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@16698 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'gcc/crtstuff.c')
-rw-r--r-- | gcc/crtstuff.c | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/gcc/crtstuff.c b/gcc/crtstuff.c index bcb5cc50bf0..c120862139a 100644 --- a/gcc/crtstuff.c +++ b/gcc/crtstuff.c @@ -128,6 +128,11 @@ static void __do_global_dtors_aux () { static func_ptr *p = __DTOR_LIST__ + 1; + static int completed = 0; + + if (completed) + return; + while (*p) { p++; @@ -137,8 +142,10 @@ __do_global_dtors_aux () #ifdef EH_FRAME_SECTION_ASM_OP __deregister_frame (__EH_FRAME_BEGIN__); #endif + completed = 1; } + /* Stick a call to __do_global_dtors_aux into the .fini section. */ static void |