gcc __attribute__((constructor)): Remove hacked calling, move ctor sections to flash
More hacky moving of parts of .rodata to flash, until we can move all of it. Candidate fix for #128
This commit is contained in:
parent
2badeed523
commit
b61b62136b
4 changed files with 33 additions and 46 deletions
|
@ -17,20 +17,6 @@ void IRAM *zalloc(size_t nbytes)
|
|||
return calloc(1, nbytes);
|
||||
}
|
||||
|
||||
extern void (*__init_array_start)(void);
|
||||
extern void (*__init_array_end)(void);
|
||||
|
||||
/* Do things which should be done as part of the SDK startup code, but aren't.
|
||||
TODO: Move into app_main.c
|
||||
*/
|
||||
void sdk_compat_initialise()
|
||||
{
|
||||
/* Call C++ constructors or C functions marked with __attribute__((constructor)) */
|
||||
void (**p)(void);
|
||||
for ( p = &__init_array_start; p != &__init_array_end; ++p)
|
||||
(*p)();
|
||||
}
|
||||
|
||||
/* UART RX function from Espressif SDK internals.
|
||||
*
|
||||
* Not part of published API.
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue