kernel/eka/common/arm/gccehlp.cpp
branchGCC_SURGE
changeset 203 71dce6d9df02
parent 191 00cd07a1b0af
child 238 959c796a6191
equal deleted inserted replaced
197:adb088c9cfcf 203:71dce6d9df02
    57 
    57 
    58 void __aeabi_unwind_cpp_pr0() {}
    58 void __aeabi_unwind_cpp_pr0() {}
    59 
    59 
    60 void __cxa_end_cleanup() {}
    60 void __cxa_end_cleanup() {}
    61 
    61 
       
    62 EXPORT_C void __cxa_guard_abort() {}
       
    63 
       
    64 EXPORT_C void __cxa_guard_acquire() {}
       
    65 
       
    66 EXPORT_C void __cxa_guard_release() {}
       
    67 
    62 #endif
    68 #endif
    63 }
    69 }
    64 
    70 
       
    71 //
       
    72 // The global new operator.
       
    73 //
       
    74 #include <kernel/kernel.h>
       
    75 
       
    76 EXPORT_C TAny* operator new[](TUint aSize, const std::nothrow_t&) __NO_THROW
       
    77 	{
       
    78 	return Kern::Alloc(aSize);
       
    79 	}
       
    80 
       
    81 EXPORT_C TAny* operator new(TUint aSize, const std::nothrow_t&) __NO_THROW
       
    82 	{
       
    83 	return Kern::Alloc(aSize);
       
    84 	}
       
    85 
       
    86 
       
    87 
       
    88 __NAKED__ void __rt_exporter_dummy(void)
       
    89 	{
       
    90 // Ensure that "vtable for __cxxabiv1::__si_class_type_info" is available from ekern.exe
       
    91 // ** This is almost certainly just creating an instance of the symbol, without supplying the 
       
    92 // ** required functionality!
       
    93 
       
    94 #define COMM_SYMBOL(x)  asm(".comm " x ",4")
       
    95 
       
    96 COMM_SYMBOL("_ZTVN10__cxxabiv117__class_type_infoE");     // vtable for __cxxabiv1::__class_type_info
       
    97 COMM_SYMBOL("_ZTVN10__cxxabiv120__si_class_type_infoE");  // vtable for __cxxabiv1::__si_class_type_info
       
    98 COMM_SYMBOL("_ZTVN10__cxxabiv121__vmi_class_type_infoE"); // vtable for __cxxabiv1::__vmi_class_type_info
       
    99 
       
   100 // Implementations exist as globals in libgcc.a, we just need to pull them in
       
   101 #define IMPORT_GLOBAL(x)  asm(".global " x );
       
   102 
       
   103 IMPORT_GLOBAL("__aeabi_lasr");
       
   104 IMPORT_GLOBAL("__aeabi_lcmp");
       
   105 IMPORT_GLOBAL("__aeabi_llsl");
       
   106 IMPORT_GLOBAL("__aeabi_llsr");
       
   107 IMPORT_GLOBAL("__aeabi_lmul");
       
   108 IMPORT_GLOBAL("__aeabi_ulcmp");
       
   109 
       
   110 // Implementations exist as "hidden" in libgcc.a, so we need to pull them in and reveal them
       
   111 // ** This version will completely fail to do that, but creates junk to be exported
       
   112 #define IMPORT_HIDDEN(x)  asm(".comm " x ",4");
       
   113 
       
   114 // unaligned-funcs.c
       
   115 IMPORT_HIDDEN("__aeabi_uread4");
       
   116 IMPORT_HIDDEN("__aeabi_uread8");
       
   117 IMPORT_HIDDEN("__aeabi_uwrite4");
       
   118 IMPORT_HIDDEN("__aeabi_uwrite8");
       
   119 
       
   120 	}
       
   121