Merge branch 'init_priority_fix' into 'master'

CXX: make __attribute__((init_priority(n))) work

See merge request espressif/esp-idf!8276
This commit is contained in:
Ivan Grokhotkov
2020-04-17 17:56:10 +08:00
4 changed files with 196 additions and 154 deletions

View File

@@ -276,7 +276,7 @@ SECTIONS
Make a point of not including anything from crtbegin.o or crtend.o, as IDF doesn't use toolchain crt
*/
__init_array_start = ABSOLUTE(.);
KEEP (*(EXCLUDE_FILE (*crtend.* *crtbegin.*) .ctors .ctors.*))
KEEP (*(EXCLUDE_FILE (*crtend.* *crtbegin.*) .ctors SORT(.ctors.*)))
__init_array_end = ABSOLUTE(.);
KEEP (*crtbegin.*(.dtors))
KEEP (*(EXCLUDE_FILE (*crtend.*) .dtors))