Fixed atexit()
See b.android.com/66595 Change-Id: I1d4c3db424c7f839e48756359cc095a6b1028ace
This commit is contained in:
@@ -26,10 +26,20 @@
|
||||
* SUCH DAMAGE.
|
||||
*/
|
||||
|
||||
#include <stddef.h>
|
||||
|
||||
extern void* __dso_handle;
|
||||
|
||||
extern int __cxa_atexit(void (*)(void*), void*, void*);
|
||||
|
||||
__attribute__ ((visibility ("hidden")))
|
||||
int atexit(void (*func)(void))
|
||||
{
|
||||
return (__cxa_atexit((void (*)(void *))func, (void *)0, &__dso_handle));
|
||||
void __atexit_handler_wrapper(void* func) {
|
||||
if (func != NULL) {
|
||||
(*(void (*)(void))func)();
|
||||
}
|
||||
}
|
||||
|
||||
__attribute__ ((visibility ("hidden")))
|
||||
int atexit(void (*func)(void)) {
|
||||
return (__cxa_atexit(&__atexit_handler_wrapper, func, &__dso_handle));
|
||||
}
|
||||
|
||||
@@ -26,11 +26,20 @@
|
||||
* SUCH DAMAGE.
|
||||
*/
|
||||
|
||||
#include <stddef.h>
|
||||
|
||||
extern void* __dso_handle;
|
||||
extern int __cxa_atexit(void (*func)(void *), void *arg, void *dso);
|
||||
|
||||
extern int __cxa_atexit(void (*)(void*), void*, void*);
|
||||
|
||||
__attribute__ ((visibility ("hidden")))
|
||||
int atexit(void (*func)(void))
|
||||
{
|
||||
return (__cxa_atexit((void (*)(void *))func, (void *)0, &__dso_handle));
|
||||
void __atexit_handler_wrapper(void* func) {
|
||||
if (func != NULL) {
|
||||
(*(void (*)(void))func)();
|
||||
}
|
||||
}
|
||||
|
||||
__attribute__ ((visibility ("hidden")))
|
||||
int atexit(void (*func)(void)) {
|
||||
return (__cxa_atexit(&__atexit_handler_wrapper, func, &__dso_handle));
|
||||
}
|
||||
|
||||
@@ -26,10 +26,20 @@
|
||||
* SUCH DAMAGE.
|
||||
*/
|
||||
|
||||
#include <stddef.h>
|
||||
|
||||
extern void* __dso_handle;
|
||||
|
||||
extern int __cxa_atexit(void (*)(void*), void*, void*);
|
||||
|
||||
__attribute__ ((visibility ("hidden")))
|
||||
int atexit(void (*func)(void))
|
||||
{
|
||||
return (__cxa_atexit((void (*)(void *))func, (void *)0, &__dso_handle));
|
||||
void __atexit_handler_wrapper(void* func) {
|
||||
if (func != NULL) {
|
||||
(*(void (*)(void))func)();
|
||||
}
|
||||
}
|
||||
|
||||
__attribute__ ((visibility ("hidden")))
|
||||
int atexit(void (*func)(void)) {
|
||||
return (__cxa_atexit(&__atexit_handler_wrapper, func, &__dso_handle));
|
||||
}
|
||||
|
||||
1
ndk/platforms/android-L/arch-arm/src/__dso_handle.h
Symbolic link
1
ndk/platforms/android-L/arch-arm/src/__dso_handle.h
Symbolic link
@@ -0,0 +1 @@
|
||||
../../../android-3/arch-arm/src/__dso_handle.h
|
||||
1
ndk/platforms/android-L/arch-arm/src/__dso_handle_so.h
Symbolic link
1
ndk/platforms/android-L/arch-arm/src/__dso_handle_so.h
Symbolic link
@@ -0,0 +1 @@
|
||||
../../../android-3/arch-arm/src/__dso_handle_so.h
|
||||
1
ndk/platforms/android-L/arch-arm/src/atexit.h
Symbolic link
1
ndk/platforms/android-L/arch-arm/src/atexit.h
Symbolic link
@@ -0,0 +1 @@
|
||||
../../../android-3/arch-arm/src/atexit.h
|
||||
1
ndk/platforms/android-L/arch-arm/src/crtbegin_dynamic.c
Symbolic link
1
ndk/platforms/android-L/arch-arm/src/crtbegin_dynamic.c
Symbolic link
@@ -0,0 +1 @@
|
||||
../../../android-3/arch-arm/src/crtbegin_dynamic.c
|
||||
1
ndk/platforms/android-L/arch-arm/src/crtbegin_so.c
Symbolic link
1
ndk/platforms/android-L/arch-arm/src/crtbegin_so.c
Symbolic link
@@ -0,0 +1 @@
|
||||
../../../android-3/arch-arm/src/crtbegin_so.c
|
||||
1
ndk/platforms/android-L/arch-arm/src/crtbegin_static.c
Symbolic link
1
ndk/platforms/android-L/arch-arm/src/crtbegin_static.c
Symbolic link
@@ -0,0 +1 @@
|
||||
crtbegin_dynamic.c
|
||||
1
ndk/platforms/android-L/arch-arm/src/crtend.S
Symbolic link
1
ndk/platforms/android-L/arch-arm/src/crtend.S
Symbolic link
@@ -0,0 +1 @@
|
||||
../../../android-3/arch-arm/src/crtend.S
|
||||
1
ndk/platforms/android-L/arch-arm/src/crtend_so.S
Symbolic link
1
ndk/platforms/android-L/arch-arm/src/crtend_so.S
Symbolic link
@@ -0,0 +1 @@
|
||||
../../../android-3/arch-arm/src/crtend_so.S
|
||||
@@ -26,11 +26,20 @@
|
||||
* SUCH DAMAGE.
|
||||
*/
|
||||
|
||||
#include <stddef.h>
|
||||
|
||||
extern void* __dso_handle;
|
||||
|
||||
extern int __cxa_atexit(void (*)(void*), void*, void*);
|
||||
|
||||
__attribute__ ((visibility ("hidden")))
|
||||
int atexit(void (*func)(void)) {
|
||||
return (__cxa_atexit((void (*)(void*)) func, (void*) 0, &__dso_handle));
|
||||
void __atexit_handler_wrapper(void* func) {
|
||||
if (func != NULL) {
|
||||
(*(void (*)(void))func)();
|
||||
}
|
||||
}
|
||||
|
||||
__attribute__ ((visibility ("hidden")))
|
||||
int atexit(void (*func)(void)) {
|
||||
return (__cxa_atexit(&__atexit_handler_wrapper, func, &__dso_handle));
|
||||
}
|
||||
|
||||
@@ -26,11 +26,20 @@
|
||||
* SUCH DAMAGE.
|
||||
*/
|
||||
|
||||
#include <stddef.h>
|
||||
|
||||
extern void* __dso_handle;
|
||||
extern int __cxa_atexit(void (*func)(void *), void *arg, void *dso);
|
||||
|
||||
extern int __cxa_atexit(void (*)(void*), void*, void*);
|
||||
|
||||
__attribute__ ((visibility ("hidden")))
|
||||
int atexit(void (*func)(void))
|
||||
{
|
||||
return (__cxa_atexit((void (*)(void *))func, (void *)0, &__dso_handle));
|
||||
void __atexit_handler_wrapper(void* func) {
|
||||
if (func != NULL) {
|
||||
(*(void (*)(void))func)();
|
||||
}
|
||||
}
|
||||
|
||||
__attribute__ ((visibility ("hidden")))
|
||||
int atexit(void (*func)(void)) {
|
||||
return (__cxa_atexit(&__atexit_handler_wrapper, func, &__dso_handle));
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user