First public contribution.
1 // Copyright (c) 2002-2009 Nokia Corporation and/or its subsidiary(-ies).
2 // All rights reserved.
3 // This component and the accompanying materials are made available
4 // under the terms of the License "ARM EABI LICENCE.txt"
5 // which accompanies this distribution, and is available
6 // in kernel/eka/compsupp.
8 // Initial Contributors:
9 // Nokia Corporation - initial contribution.
14 // toplevel destruction routines for 'user side' code compiled
15 // with the ARMEDG compiler.
23 // Need to decide what this should do
24 //void CppInitializationPanic(){};
26 #define MAX_DTOR_RECORDS 256
27 static dtd dtor_rec[MAX_DTOR_RECORDS];
29 typedef dtd **dso_handle;
30 dtd * __dso_handle = &dtor_rec[MAX_DTOR_RECORDS];
32 int __cxa_atexit ( void (*f)(void *), void *p, dso_handle d )
36 // This is what the spec says to do!!
37 if (drec < &dtor_rec[0]) return -1;
45 void __cxa_finalize ( dso_handle d )
48 dtd * lim = &dtor_rec[MAX_DTOR_RECORDS];
51 drec->dtor(drec->obj);
57 void run_static_dtors (void)
59 __cxa_finalize(&__dso_handle);