Changed __attribute__(( constructor in main.cpp, with update provided by Victor_PV, so fix issue with premain not being called first in the init seequence

This commit is contained in:
Roger Clark 2015-05-09 20:13:41 +10:00
parent 8a5936b73d
commit 74b47dcc45
1 changed files with 1 additions and 1 deletions

View File

@ -30,7 +30,7 @@ extern void init(void);
// Force init to be called *first*, i.e. before static object allocation.
// Otherwise, statically allocated objects that need libmaple may fail.
__attribute__(( constructor )) void premain() {
__attribute__(( constructor (0) )) void premain() {
init();
}