2016-01-14 02:02:56 +08:00
|
|
|
/*
|
|
|
|
* Copyright (c) 2015 Wind River Systems, Inc.
|
|
|
|
*
|
2017-01-19 09:01:01 +08:00
|
|
|
* SPDX-License-Identifier: Apache-2.0
|
2016-01-14 02:02:56 +08:00
|
|
|
*/
|
|
|
|
|
|
|
|
/*
|
|
|
|
* @file
|
|
|
|
* @brief Execute initialization routines referenced in .init_array section
|
|
|
|
*/
|
|
|
|
|
|
|
|
typedef void (*func_ptr)(void);
|
|
|
|
|
2020-05-20 21:10:59 +08:00
|
|
|
extern func_ptr __init_array_start[];
|
|
|
|
extern func_ptr __init_array_end[];
|
2016-01-14 02:02:56 +08:00
|
|
|
|
|
|
|
/**
|
|
|
|
* @brief Execute initialization routines referenced in .init_array section
|
|
|
|
*
|
|
|
|
* @return N/A
|
|
|
|
*/
|
|
|
|
void __do_init_array_aux(void)
|
|
|
|
{
|
|
|
|
for (func_ptr *func = __init_array_start;
|
|
|
|
func < __init_array_end;
|
|
|
|
func++) {
|
|
|
|
(*func)();
|
|
|
|
}
|
|
|
|
}
|