Update contrib.
1 // Copyright (c) 1995-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 "Eclipse Public License v1.0"
5 // which accompanies this distribution, and is available
6 // at the URL "http://www.eclipse.org/legal/epl-v10.html".
8 // Initial Contributors:
9 // Nokia Corporation - initial contribution.
14 // e32\euser\epoc\arm\uc_dll.cpp
15 // This file contains the DLL entrypoint
24 #if defined(__GCC32__)
26 typedef void (*PFV)();
27 extern PFV __CTOR_LIST__[];
28 extern PFV __DTOR_LIST__[];
30 GLDEF_C TInt _E32Dll_Body(TInt aReason)
32 if (aReason==KModuleEntryReasonProcessAttach)
35 while (__CTOR_LIST__[i])
36 (*__CTOR_LIST__[i++])();
38 else if (aReason==KModuleEntryReasonProcessDetach)
41 while (__DTOR_LIST__[i])
42 (*__DTOR_LIST__[i++])();
47 #elif defined(__ARMCC__)
49 void __DLL_Export_Table__(void);
50 void __cpp_initialize__aeabi_(void);
51 __weak void run_static_dtors(void);
53 GLDEF_C TInt _E32Dll_Body(TInt aReason)
55 if (aReason==KModuleEntryReasonProcessAttach)
57 __DLL_Export_Table__();
58 __cpp_initialize__aeabi_();
60 else if (aReason==KModuleEntryReasonProcessDetach)
62 int call_static_dtors = (int)run_static_dtors;
63 if (call_static_dtors) run_static_dtors();