First public contribution.
     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 "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 initialization/destruction routines for 'user side' code compiled 
 
    15 // with the ARMCC EABI compiler. intended for static linking
 
    21 // This calls each of the compiler constructed functions referenced from pi_ctorvec.
 
    22 // These functions arrange to 'call' the appropriate constructor for the 'static' instance
 
    23 // (in fact the call may be inlined). If the class of the instance has a destructor then 
 
    24 // compiler records that this object needs 'destructing' at 'exit' time. It does this by 
 
    25 // calling the function __cxa_atexit. We provide our own definition of this.
 
    27 // This is the EABI compliant version - it uses .init_array rather than C$$pi_ctorvec
 
    28 // which means we need to do via assembler :-(
 
    31   __asm void __cpp_initialize__aeabi_(void)
 
    35     IMPORT    _fp_init [WEAK]
 
    37     IMPORT    |.init_array$$Base| [WEAK]
 
    38     IMPORT    |.init_array$$Limit| [WEAK]
 
    40     // export std::nothrow from here
 
    72 // cheat - saved a whole 4 bytes!!! - value is never user
 
    75     DCD    |.init_array$$Base|
 
    77     DCD    |.init_array$$Limit|
 
    82   __asm void __cpp_initialize__aeabi_(void)
 
    86     IMPORT    _fp_init [WEAK]
 
    88     IMPORT    |.init_array$$Base| [WEAK]
 
    89     IMPORT    |.init_array$$Limit| [WEAK]
 
    91     // export std::nothrow from here
 
    97     STMFD    r13!,{r3-r5,r14}
 
   107     LDMEQFD  r13!,{r3-r5,pc}
 
   117     LDMFD    r13!,{r3-r5,pc}
 
   125     DCD    |.init_array$$Base|
 
   127     DCD    |.init_array$$Limit|
 
   129 // cheat - defining this here saves a whole 4 bytes!!! - value is never user