sl@0: // Copyright (c) 2003-2009 Nokia Corporation and/or its subsidiary(-ies). sl@0: // All rights reserved. sl@0: // This component and the accompanying materials are made available sl@0: // under the terms of the License "Eclipse Public License v1.0" sl@0: // which accompanies this distribution, and is available sl@0: // at the URL "http://www.eclipse.org/legal/epl-v10.html". sl@0: // sl@0: // Initial Contributors: sl@0: // Nokia Corporation - initial contribution. sl@0: // sl@0: // Contributors: sl@0: // sl@0: // Description: sl@0: // e32\euser\epoc\arm\uc_dll.cia sl@0: // sl@0: // sl@0: sl@0: #include sl@0: #include sl@0: sl@0: extern "C" { sl@0: sl@0: extern TInt _E32Dll_Body(TInt); sl@0: sl@0: __NAKED__ TInt _E32Dll(TInt /*aReason*/) sl@0: { sl@0: // DLL entry point sl@0: EKA2_ENTRY_POINT_VERSION_IDENTIFIER; // DUMMY INSTRUCTION TO INDICATE EKA2 ENTRY POINT sl@0: asm("ldr r12, 1f "); sl@0: __JUMP(,r12); sl@0: sl@0: asm(".word 0 "); // loader will replace with code seg unique ID sl@0: // for RAM-loaded code segment sl@0: // MUST BE AT OFFSET 12 FROM ENTRY POINT sl@0: sl@0: asm("1: "); sl@0: asm(".word _E32Dll_Body "); sl@0: sl@0: #ifdef __ARMCC__ sl@0: #ifdef __SUPPORT_CPP_EXCEPTIONS__ sl@0: sl@0: sl@0: /* It is possible no functions included in the image require sl@0: * a handler table. Therefore make only a weak reference to sl@0: * the handler table base symbol, which may be absent. sl@0: */ sl@0: extern |.ARM.exidx$$Base|; sl@0: extern |.ARM.exidx$$Limit|; sl@0: extern |.ARM.extab$$Base| [WEAK]; sl@0: extern |Image$$ER_RO$$Base|; sl@0: extern |Image$$ER_RO$$Limit|; sl@0: export |Symbian$$CPP$$Exception$$Descriptor|; sl@0: sl@0: /* Symbian$$CPP$$Exception$$Descriptor is referenced from the Image header. sl@0: * A pointer to this object can be cached by the unwinder in the UCB sl@0: * on the assumption that the EHT for the previous frame is likely to be right sl@0: * for the current frame sl@0: */ sl@0: sl@0: |Symbian$$CPP$$Exception$$Descriptor| sl@0: #ifdef __LEAVE_EQUALS_THROW__ sl@0: |Symbian$$eit_base| dcd |.ARM.exidx$$Base|; /* index table base */ sl@0: |Symbian$$eit_limit| dcd |.ARM.exidx$$Limit| ; /* index table limit */ sl@0: #endif sl@0: #if __ARMCC_VERSION > 220000 sl@0: |Symbian$$code_seg_base| dcd |Image$$ER_RO$$Base| + 1 ; /* RO segment base + mark as ehabi v2 */ sl@0: |Symbian$$code_seg_limit| dcd |Image$$ER_RO$$Limit| ;/* RO segment limit */ sl@0: |Symbian$$reserved| dcd 0 ; /* reserved for future use */ sl@0: #else sl@0: |Symbian$$code_seg_base| dcd |Image$$ER_RO$$Base| ; /* RO segment base */ sl@0: |Symbian$$code_seg_limit| dcd |Image$$ER_RO$$Limit| ;/* RO segment limit */ sl@0: #endif sl@0: sl@0: #endif sl@0: #endif sl@0: } sl@0: } sl@0: