[libc]重构_libc_init_array 防止gcc下芯片无法启动

This commit is contained in:
Meco Man 2021-09-25 13:03:23 -04:00
parent f4412c3abc
commit d4a5edf074
2 changed files with 7 additions and 0 deletions

View File

@ -64,3 +64,9 @@ void * _sbrk_r(struct _reent *ptr, ptrdiff_t incr)
return RT_NULL; return RT_NULL;
} }
#endif /*RT_USING_HEAP*/ #endif /*RT_USING_HEAP*/
void __libc_init_array(void)
{
/* we not use __libc init_aray to initialize C++ objects */
/* __libc_init_array is ARM code, not Thumb; it will cause hardfault. */
}

View File

@ -303,6 +303,7 @@ void _system(const char *s)
void __libc_init_array(void) void __libc_init_array(void)
{ {
/* we not use __libc init_aray to initialize C++ objects */ /* we not use __libc init_aray to initialize C++ objects */
/* __libc_init_array is ARM code, not Thumb; it will cause hardfault. */
} }
mode_t umask(mode_t mask) mode_t umask(mode_t mask)