Commit 91141d4f by Richard Stallman

*** empty log message ***

From-SVN: r1013
parent c3f3d7e1
...@@ -216,13 +216,32 @@ the Free Software Foundation, 675 Mass Ave, Cambridge, MA 02139, USA. ...@@ -216,13 +216,32 @@ the Free Software Foundation, 675 Mass Ave, Cambridge, MA 02139, USA.
/* CTOR_LIST_BEGIN and CTOR_LIST_END are machine-dependent /* CTOR_LIST_BEGIN and CTOR_LIST_END are machine-dependent
because they push on the stack. */ because they push on the stack. */
#define DO_GLOBAL_CTORS_BODY \ #ifdef STACK_GROWS_DOWNWARD
do { \
func_ptr *__CTOR_LIST__ = __builtin_alloca (0), *p; \ /* Constructor list on stack is in reverse order. Go to the end of the
for (p = __CTOR_LIST__; *p; ) \ list and go backwards to call constructors in the right order. */
(*p++) (); \ #define DO_GLOBAL_CTORS_BODY \
do { \
func_ptr *p, *beg = alloca (0); \
for (p = beg; *p; p++) \
; \
while (p != beg) \
(*--p) (); \
} while (0) } while (0)
#else
/* Constructor list on stack is in correct order. Just call them. */
#define DO_GLOBAL_CTORS_BODY \
do { \
func_ptr *p, *beg = alloca (0); \
for (p = beg; *p; ) \
(*p++) (); \
#endif \
} while (0)
#endif /* STACK_GROWS_DOWNWARD */
/* Add extra sections .init and .fini, in addition to .bss from att386.h. */ /* Add extra sections .init and .fini, in addition to .bss from att386.h. */
#undef EXTRA_SECTIONS #undef EXTRA_SECTIONS
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment