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>
36 lines
726 B
C
36 lines
726 B
C
/*
|
|
* Copyright (c) 2016 Wind River Systems, Inc.
|
|
*
|
|
* SPDX-License-Identifier: Apache-2.0
|
|
*/
|
|
|
|
/*
|
|
* @file
|
|
* @brief Basic C++ destructor module for globals
|
|
*
|
|
*/
|
|
|
|
#include <zephyr/toolchain.h>
|
|
|
|
__weak void *__dso_handle;
|
|
|
|
/**
|
|
* @brief Register destructor for a global object
|
|
*
|
|
* @param destructor the global object destructor function
|
|
* @param objptr global object pointer
|
|
* @param dso Dynamic Shared Object handle for shared libraries
|
|
*
|
|
* Function does nothing at the moment, assuming the global objects
|
|
* do not need to be deleted
|
|
*
|
|
* @retval 0 on success.
|
|
*/
|
|
int __cxa_atexit(void (*destructor)(void *), void *objptr, void *dso)
|
|
{
|
|
ARG_UNUSED(destructor);
|
|
ARG_UNUSED(objptr);
|
|
ARG_UNUSED(dso);
|
|
return 0;
|
|
}
|