1) Fix for Bug 3117 - [GCCE] Missing symbols in linkage of template_ekern.exe
2) Adjusting e32cia.h to the fix for bug 3115, changset 184: 0e2270015475, which conflicted with the fix for bug 3114, changeset 182: eb3b9806166e
--- a/kernel/eka/common/arm/cmem.cia Tue Jun 29 13:21:36 2010 +0100
+++ b/kernel/eka/common/arm/cmem.cia Wed Jun 30 18:53:50 2010 +0100
@@ -181,19 +181,46 @@
asm("small_fill_end: ");
__JUMP(,lr);
+ }
+
#ifdef __EABI__
- // The AEABI switched the order of arg2 and arg3 to save an intruction when
- // calling 'memset' from 'memclr'
- asm(".global __aeabi_memset8 ");
- asm("__aeabi_memset8: ");
- asm(".global __aeabi_memset4 ");
- asm("__aeabi_memset4: ");
- asm(".global __aeabi_memset ");
- asm("__aeabi_memset: ");
- asm(" and r2, r2, #255");
- asm(" b fill ");
-#endif
- }
+//mikek N.B. These __aeabi_mem functions are also defined in rvct/compsupp/aeabimem.cpp
+// and should be implemented in the compsupp library, not here, when we build one for gcce.
+
+#define EXPORT_EABI_MEMSET_VENEER(name) \
+extern "C" EXPORT_C __NAKED__ TAny* (name)(TAny* /*aTrg*/, unsigned int /*aLength*/, TInt /*aValue*/ ) \
+{ \
+ asm(" and r2, r2, #255"); \
+ asm(" b fill "); \
+}
+
+EXPORT_EABI_MEMSET_VENEER(__aeabi_memset8)
+EXPORT_EABI_MEMSET_VENEER(__aeabi_memset4)
+EXPORT_EABI_MEMSET_VENEER(__aeabi_memset)
+
+#define EXPORT_EABI_MEMCLR_ALIAS(alias) \
+extern "C" EXPORT_C __NAKED__ TAny* (alias)(TAny* /*aTrg*/, unsigned int /*aLength*/ ) \
+{ \
+ asm(" b memclr "); \
+}
+
+EXPORT_EABI_MEMCLR_ALIAS(__aeabi_memclr8)
+EXPORT_EABI_MEMCLR_ALIAS(__aeabi_memclr4)
+EXPORT_EABI_MEMCLR_ALIAS(__aeabi_memclr)
+
+#define EXPORT_EABI_MEMMOVE_ALIAS(alias,func) \
+extern "C" EXPORT_C __NAKED__ TAny* (alias)(TAny* /*aTrg*/, const TAny* /*aSrc*/, unsigned int /*aLength*/) \
+{ \
+ asm(" b " #func ); \
+}
+
+EXPORT_EABI_MEMMOVE_ALIAS(__aeabi_memcpy8,memcpy)
+EXPORT_EABI_MEMMOVE_ALIAS(__aeabi_memcpy4,memcpy)
+EXPORT_EABI_MEMMOVE_ALIAS(__aeabi_memcpy,memcpy)
+EXPORT_EABI_MEMMOVE_ALIAS(__aeabi_memmove8,memmove)
+EXPORT_EABI_MEMMOVE_ALIAS(__aeabi_memmove4,memmove)
+EXPORT_EABI_MEMMOVE_ALIAS(__aeabi_memmove,memmove)
+#endif // __EABI__
#endif // USE_REPLACEMENT_MEMSET
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/kernel/eka/common/arm/gccehlp.cpp Wed Jun 30 18:53:50 2010 +0100
@@ -0,0 +1,104 @@
+// Copyright (c) 1995-2009 Nokia Corporation and/or its subsidiary(-ies).
+// All rights reserved.
+// This component and the accompanying materials are made available
+// under the terms of the License "Eclipse Public License v1.0"
+// which accompanies this distribution, and is available
+// at the URL "http://www.eclipse.org/legal/epl-v10.html".
+//
+// Initial Contributors:
+// Mike Kinghan, mikek@symbian.org, for Symbian Foundation
+//
+// Contributors:
+//
+// Description:
+// kernelhwsrv/kernel/eka/common/arm/gccehlp.cpp
+//
+//
+
+#include "../common.h"
+#include <nkern.h>
+
+extern "C" {
+EXPORT_C int __aeabi_idiv0 (int return_value)
+ {
+ FAULT();
+ return return_value;
+ }
+
+EXPORT_C long long __aeabi_ldiv0 (long long return_value)
+ {
+ FAULT();
+ return return_value;
+ }
+
+EXPORT_C __NAKED__ void __rt_exporter_dummy(void)
+{
+ asm(".comm _ZTVN10__cxxabiv117__class_type_infoE,4");
+ asm(".comm _ZTVN10__cxxabiv120__si_class_type_infoE,4");
+ asm(".comm _ZTVN10__cxxabiv121__vmi_class_type_infoE,4");
+ asm(".comm _ZTVN10__cxxabiv121__vmi_class_type_infoE,4");
+ asm(".comm __aeabi_lasr,4");
+ asm(".comm __aeabi_lcmp,4");
+ asm(".comm __aeabi_llsl,4");
+ asm(".comm __aeabi_llsr,4");
+ asm(".comm __aeabi_lmul,4");
+ asm(".comm __aeabi_ulcmp,4");
+ asm(".comm __aeabi_uread4,4");
+ asm(".comm __aeabi_uread8,4");
+ asm(".comm __aeabi_uwrite4,4");
+ asm(".comm __aeabi_uwrite8,4");
+ asm(".comm __cxa_guard_abort,4");
+ asm(".comm __cxa_guard_acquire,4");
+ asm(".comm __cxa_guard_release,4");
+}
+
+EXPORT_C int __cxa_pure_virtual()
+//
+// Gets called for any unreplaced pure virtual methods.
+//
+ {
+#ifdef __STANDALONE_NANOKERNEL__
+ __NK_ASSERT_ALWAYS(0);
+#else
+ Panic(EPureVirtualCalled);
+#endif
+ return 0;
+ }
+
+#ifdef __KERNEL_MODE__
+
+void __cxa_end_catch(){}
+
+void __cxa_begin_catch(){}
+
+void __cxa_rethrow(){}
+// std::terminate
+
+void __cxa_call_unexpected() {}
+
+void __aeabi_unwind_cpp_pr0() {}
+
+void __cxa_end_cleanup() {}
+
+#endif
+}
+
+#include "../common.h"
+#include <kernel/kernel.h>
+
+EXPORT_C TAny* operator new[](TUint aSize, const std::nothrow_t& aNoThrow) __NO_THROW
+ {
+ (void) aNoThrow;
+ return Kern::Alloc(aSize);
+ }
+
+EXPORT_C TAny* operator new(TUint aSize, const std::nothrow_t& aNoThrow) __NO_THROW
+//
+// The global new operator.
+//
+ {
+ (void) aNoThrow;
+ return Kern::Alloc(aSize);
+ }
+
+
--- a/kernel/eka/common/mem.cpp Tue Jun 29 13:21:36 2010 +0100
+++ b/kernel/eka/common/mem.cpp Wed Jun 30 18:53:50 2010 +0100
@@ -23,7 +23,6 @@
//NOTE - if these values are changed then the WINS test case value must be updated
#ifndef __MEM_MACHINE_CODED__
-
extern "C" {
// See header file e32cmn.h for the in-source documentation.
@@ -161,7 +160,7 @@
-
+//IMK: Should this __GCC32__ should be __GCCE__ now?
#if defined(__GCC32__) && !defined(__KERNEL_MODE__)
/**
Compares a block of data at one specified location with a block of data at
--- a/kernel/eka/include/e32cia.h Tue Jun 29 13:21:36 2010 +0100
+++ b/kernel/eka/include/e32cia.h Wed Jun 30 18:53:50 2010 +0100
@@ -132,7 +132,7 @@
// CIA symbols for KERNEL side code
// CIA symbol macros for Gcc98r2
#if defined(__GCC32__) && !defined(__EABI__)
-#define CSM_ZN1K8MsgInfoE " _1K.MsgInfo"
+#define CSM_ZN1K7MsgInfoE " _1K.MsgInfo"
#define CSM_ZN14NFastSemaphore6SignalEv " Signal__14NFastSemaphore"
#define CSM_ZN4Kern4ExitEi " Exit__4Kerni"
#define CSM_ZN5NKern4ExitEv " Exit__5NKern"
@@ -246,7 +246,7 @@
#elif defined(__ARMCC__)
// CIA symbol macros for RVCT
-#define CSM_ZN1K8MsgInfoE " __cpp(&K::MsgInfo)"
+#define CSM_ZN1K7MsgInfoE " __cpp(&K::MsgInfo)"
#define CSM_ZN14NFastSemaphore6SignalEv " __cpp(NFastSemaphore::Signal)"
#define CSM_ZN4Kern4ExitEi " __cpp(Kern::Exit)"
#define CSM_ZN5NKern4ExitEv " __cpp(NKern::Exit)"
@@ -359,7 +359,7 @@
#define CSM_ZN19DKernelEventHandler8DispatchE12TKernelEventPvS1_ "__cpp(DKernelEventHandler::Dispatch)"
#else
// CIA symbol macros for EABI assemblers
-#define CSM_ZN1K8MsgInfoE " _ZN1K7MsgInfoE"
+#define CSM_ZN1K7MsgInfoE " _ZN1K7MsgInfoE"
#define CSM_ZN14NFastSemaphore6SignalEv " _ZN14NFastSemaphore6SignalEv"
#define CSM_ZN4Kern4ExitEi " _ZN4Kern4ExitEi"
#define CSM_ZN5NKern4ExitEv " _ZN5NKern4ExitEv"
--- a/kernel/eka/kernel/ekern.mmp Tue Jun 29 13:21:36 2010 +0100
+++ b/kernel/eka/kernel/ekern.mmp Wed Jun 30 18:53:50 2010 +0100
@@ -38,10 +38,6 @@
targettype exexp
-#ifdef GCCE
-library drtaeabi.dso
-#endif
-
#include "kern_int.mmh"
// For emulator, specify newlib containing kernel-side definitions of new and delete operators
@@ -91,13 +87,15 @@
source ckdes8.cia cumem.cia cbma.cia
sourcepath ../common/arm
source carray.cia cdes8.cia cmem.cia
-#if defined(GCC32)
-source cgcchelp.cpp cgcchelp.cia
-#elif defined(ARMCC)
+#if defined(ARMCC)
source armcchlp.cpp
#ifndef SBSV2
source armcchlp.cia
#endif
+#elif defined(GCCE)
+source gccehlp.cpp
+#elif defined(GCC32)
+source cgcchelp.cpp cgcchelp.cia
#endif
#if defined(REPLACE_GENERIC_UTILS)