03879b9e2b
This commit relocates the "C++ ABI library" components such as global constructor/destructor and initialiser handlers to a dedicated directory, `lib/cpp/abi`, in order to provide a clear separation between the C++ ABI/runtime library and the standard C++ library components. Note that the Zephyr C++ ABI library currently implements the GNU/GCC C++ ABI, which is the de-facto standard ABI used by many compilers including Clang -- it may be necessary to sub-divide the `lib/cpp/abi` into `lib/cpp/abi/gnu` and `lib/cpp/abi/someotherabi` in the future when adding the support for a C++ compiler that expects an ABI vastly different from the GNU C++ ABI. Signed-off-by: Stephanos Ioannidis <stephanos.ioannidis@nordicsemi.no>
28 lines
543 B
C
28 lines
543 B
C
/*
|
|
* Copyright (c) 2015 Wind River Systems, Inc.
|
|
*
|
|
* SPDX-License-Identifier: Apache-2.0
|
|
*/
|
|
|
|
/*
|
|
* @file
|
|
* @brief Execute initialization routines referenced in .init_array section
|
|
*/
|
|
|
|
typedef void (*func_ptr)(void);
|
|
|
|
extern func_ptr __zephyr_init_array_start[];
|
|
extern func_ptr __zephyr_init_array_end[];
|
|
|
|
/**
|
|
* @brief Execute initialization routines referenced in .init_array section
|
|
*/
|
|
void __do_init_array_aux(void)
|
|
{
|
|
for (func_ptr *func = __zephyr_init_array_start;
|
|
func < __zephyr_init_array_end;
|
|
func++) {
|
|
(*func)();
|
|
}
|
|
}
|