os/kernelhwsrv/kernel/eka/euser/epoc/arm/uc_dll.cia
changeset 0 bde4ae8d615e
     1.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
     1.2 +++ b/os/kernelhwsrv/kernel/eka/euser/epoc/arm/uc_dll.cia	Fri Jun 15 03:10:57 2012 +0200
     1.3 @@ -0,0 +1,78 @@
     1.4 +// Copyright (c) 2003-2009 Nokia Corporation and/or its subsidiary(-ies).
     1.5 +// All rights reserved.
     1.6 +// This component and the accompanying materials are made available
     1.7 +// under the terms of the License "Eclipse Public License v1.0"
     1.8 +// which accompanies this distribution, and is available
     1.9 +// at the URL "http://www.eclipse.org/legal/epl-v10.html".
    1.10 +//
    1.11 +// Initial Contributors:
    1.12 +// Nokia Corporation - initial contribution.
    1.13 +//
    1.14 +// Contributors:
    1.15 +//
    1.16 +// Description:
    1.17 +// e32\euser\epoc\arm\uc_dll.cia
    1.18 +// 
    1.19 +//
    1.20 +
    1.21 +#include <e32cia.h>
    1.22 +#include <u32std.h>
    1.23 +
    1.24 +extern "C" {
    1.25 +
    1.26 +extern TInt _E32Dll_Body(TInt);
    1.27 +
    1.28 +__NAKED__ TInt _E32Dll(TInt /*aReason*/)
    1.29 +	{
    1.30 +	// DLL entry point
    1.31 +	EKA2_ENTRY_POINT_VERSION_IDENTIFIER;	// DUMMY INSTRUCTION TO INDICATE EKA2 ENTRY POINT
    1.32 +	asm("ldr r12, 1f ");
    1.33 +	__JUMP(,r12);
    1.34 +
    1.35 +	asm(".word 0 ");			// loader will replace with code seg unique ID
    1.36 +								// for RAM-loaded code segment
    1.37 +								// MUST BE AT OFFSET 12 FROM ENTRY POINT
    1.38 +
    1.39 +	asm("1: ");
    1.40 +	asm(".word _E32Dll_Body ");
    1.41 +
    1.42 +#ifdef __ARMCC__
    1.43 +#ifdef __SUPPORT_CPP_EXCEPTIONS__
    1.44 +
    1.45 +
    1.46 +  /* It is possible no functions included in the image require
    1.47 +   * a handler table. Therefore make only a weak reference to
    1.48 +   * the handler table base symbol, which may be absent.
    1.49 +   */
    1.50 +  extern |.ARM.exidx$$Base|;
    1.51 +  extern |.ARM.exidx$$Limit|;
    1.52 +  extern |.ARM.extab$$Base| [WEAK];
    1.53 +  extern |Image$$ER_RO$$Base|;
    1.54 +  extern |Image$$ER_RO$$Limit|;
    1.55 +  export |Symbian$$CPP$$Exception$$Descriptor|;
    1.56 +
    1.57 +  /* Symbian$$CPP$$Exception$$Descriptor is referenced from the Image header.
    1.58 +   * A pointer to this object can be cached by the unwinder in the UCB
    1.59 +   * on the assumption that the EHT for the previous frame is likely to be right
    1.60 +   * for the current frame
    1.61 +   */
    1.62 +
    1.63 +|Symbian$$CPP$$Exception$$Descriptor|
    1.64 +#ifdef __LEAVE_EQUALS_THROW__
    1.65 +|Symbian$$eit_base|  		dcd |.ARM.exidx$$Base|;   /* index table base */
    1.66 +|Symbian$$eit_limit|  		dcd |.ARM.exidx$$Limit| ;  /* index table limit */
    1.67 +#endif
    1.68 +#if __ARMCC_VERSION > 220000
    1.69 +|Symbian$$code_seg_base| 	dcd |Image$$ER_RO$$Base| + 1 ; /* RO segment base + mark as ehabi v2 */
    1.70 +|Symbian$$code_seg_limit| 	dcd |Image$$ER_RO$$Limit| ;/* RO segment limit */
    1.71 +|Symbian$$reserved|		dcd 0 ; /* reserved for future use */
    1.72 +#else
    1.73 +|Symbian$$code_seg_base| 	dcd |Image$$ER_RO$$Base| ; /* RO segment base */
    1.74 +|Symbian$$code_seg_limit| 	dcd |Image$$ER_RO$$Limit| ;/* RO segment limit */
    1.75 +#endif
    1.76 +
    1.77 +#endif
    1.78 +#endif
    1.79 +	}
    1.80 +}
    1.81 +