|
1 // Copyright (c) 2003-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". |
|
7 // |
|
8 // Initial Contributors: |
|
9 // Nokia Corporation - initial contribution. |
|
10 // |
|
11 // Contributors: |
|
12 // |
|
13 // Description: |
|
14 // e32\euser\epoc\arm\uc_dll.cia |
|
15 // |
|
16 // |
|
17 |
|
18 #include <e32cia.h> |
|
19 #include <u32std.h> |
|
20 |
|
21 extern "C" { |
|
22 |
|
23 extern TInt _E32Dll_Body(TInt); |
|
24 |
|
25 __NAKED__ TInt _E32Dll(TInt /*aReason*/) |
|
26 { |
|
27 // DLL entry point |
|
28 EKA2_ENTRY_POINT_VERSION_IDENTIFIER; // DUMMY INSTRUCTION TO INDICATE EKA2 ENTRY POINT |
|
29 asm("ldr r12, 1f "); |
|
30 __JUMP(,r12); |
|
31 |
|
32 asm(".word 0 "); // loader will replace with code seg unique ID |
|
33 // for RAM-loaded code segment |
|
34 // MUST BE AT OFFSET 12 FROM ENTRY POINT |
|
35 |
|
36 asm("1: "); |
|
37 asm(".word _E32Dll_Body "); |
|
38 |
|
39 #ifdef __ARMCC__ |
|
40 #ifdef __SUPPORT_CPP_EXCEPTIONS__ |
|
41 |
|
42 |
|
43 /* It is possible no functions included in the image require |
|
44 * a handler table. Therefore make only a weak reference to |
|
45 * the handler table base symbol, which may be absent. |
|
46 */ |
|
47 extern |.ARM.exidx$$Base|; |
|
48 extern |.ARM.exidx$$Limit|; |
|
49 extern |.ARM.extab$$Base| [WEAK]; |
|
50 extern |Image$$ER_RO$$Base|; |
|
51 extern |Image$$ER_RO$$Limit|; |
|
52 export |Symbian$$CPP$$Exception$$Descriptor|; |
|
53 |
|
54 /* Symbian$$CPP$$Exception$$Descriptor is referenced from the Image header. |
|
55 * A pointer to this object can be cached by the unwinder in the UCB |
|
56 * on the assumption that the EHT for the previous frame is likely to be right |
|
57 * for the current frame |
|
58 */ |
|
59 |
|
60 |Symbian$$CPP$$Exception$$Descriptor| |
|
61 #ifdef __LEAVE_EQUALS_THROW__ |
|
62 |Symbian$$eit_base| dcd |.ARM.exidx$$Base|; /* index table base */ |
|
63 |Symbian$$eit_limit| dcd |.ARM.exidx$$Limit| ; /* index table limit */ |
|
64 #endif |
|
65 #if __ARMCC_VERSION > 220000 |
|
66 |Symbian$$code_seg_base| dcd |Image$$ER_RO$$Base| + 1 ; /* RO segment base + mark as ehabi v2 */ |
|
67 |Symbian$$code_seg_limit| dcd |Image$$ER_RO$$Limit| ;/* RO segment limit */ |
|
68 |Symbian$$reserved| dcd 0 ; /* reserved for future use */ |
|
69 #else |
|
70 |Symbian$$code_seg_base| dcd |Image$$ER_RO$$Base| ; /* RO segment base */ |
|
71 |Symbian$$code_seg_limit| dcd |Image$$ER_RO$$Limit| ;/* RO segment limit */ |
|
72 #endif |
|
73 |
|
74 #endif |
|
75 #endif |
|
76 } |
|
77 } |
|
78 |