base: call proper __cxa_finalize

Fixes #909.
This commit is contained in:
Josef Söntgen 2013-10-09 17:41:04 +02:00 committed by Norman Feske
parent e1ed832ac1
commit eab8217bdb
2 changed files with 15 additions and 1 deletions

View File

@ -47,6 +47,18 @@ extern "C" int __cxa_atexit(void(*func)(void*), void *arg,
}
/**
* Prototype for finalize support function provided by '_main.cc'
*/
extern int genode___cxa_finalize(void *dso);
extern "C" void __cxa_finalize(void *dso)
{
genode___cxa_finalize(dso);
}
/***********************************
** Support required for ARM EABI **
***********************************/

View File

@ -170,6 +170,8 @@ void genode___cxa_finalize(void *dso)
}
extern "C" void __cxa_finalize(void *dso);
/**
* Terminate the process.
*/
@ -192,7 +194,7 @@ void genode_exit(int status)
for (func = &_dtors_start; func != &_dtors_end; (*func++)());
/* call all handlers registered with atexit() or __cxa_atexit() */
genode___cxa_finalize(0);
__cxa_finalize(0);
/*
* Wait for destruction by the parent who was supposed to be notified by