Commit c1fe41cb by Jim Wilson

(DO_GLOBAL_CTORS_BODY): Run constructors from right to

left not left to right.

From-SVN: r8722
parent a18b5d98
......@@ -1037,9 +1037,9 @@ dtors_section() \
extern pfunc __ctors[]; \
extern pfunc __ctors_end[]; \
pfunc *p; \
for (p = __ctors; p < __ctors_end; p++) \
for (p = __ctors_end; p > __ctors; ) \
{ \
(*p)(); \
(*--p)(); \
} \
}
......
......@@ -1292,9 +1292,9 @@ dtors_section() \
extern pfunc __ctors[]; \
extern pfunc __ctors_end[]; \
pfunc *p; \
for (p = __ctors; p < __ctors_end; p++) \
for (p = __ctors_end; p > __ctors; ) \
{ \
(*p)(); \
(*--p)(); \
} \
}
......
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