kernel/eka/common/arm/gccehlp.cpp
author mikek
Wed, 30 Jun 2010 18:53:50 +0100
branchGCC_SURGE
changeset 188 38a7352e23d3
child 191 00cd07a1b0af
permissions -rw-r--r--
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
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
188
38a7352e23d3 1) Fix for Bug 3117 - [GCCE] Missing symbols in linkage of template_ekern.exe
mikek
parents:
diff changeset
     1
// Copyright (c) 1995-2009 Nokia Corporation and/or its subsidiary(-ies).
38a7352e23d3 1) Fix for Bug 3117 - [GCCE] Missing symbols in linkage of template_ekern.exe
mikek
parents:
diff changeset
     2
// All rights reserved.
38a7352e23d3 1) Fix for Bug 3117 - [GCCE] Missing symbols in linkage of template_ekern.exe
mikek
parents:
diff changeset
     3
// This component and the accompanying materials are made available
38a7352e23d3 1) Fix for Bug 3117 - [GCCE] Missing symbols in linkage of template_ekern.exe
mikek
parents:
diff changeset
     4
// under the terms of the License "Eclipse Public License v1.0"
38a7352e23d3 1) Fix for Bug 3117 - [GCCE] Missing symbols in linkage of template_ekern.exe
mikek
parents:
diff changeset
     5
// which accompanies this distribution, and is available
38a7352e23d3 1) Fix for Bug 3117 - [GCCE] Missing symbols in linkage of template_ekern.exe
mikek
parents:
diff changeset
     6
// at the URL "http://www.eclipse.org/legal/epl-v10.html".
38a7352e23d3 1) Fix for Bug 3117 - [GCCE] Missing symbols in linkage of template_ekern.exe
mikek
parents:
diff changeset
     7
//
38a7352e23d3 1) Fix for Bug 3117 - [GCCE] Missing symbols in linkage of template_ekern.exe
mikek
parents:
diff changeset
     8
// Initial Contributors:
38a7352e23d3 1) Fix for Bug 3117 - [GCCE] Missing symbols in linkage of template_ekern.exe
mikek
parents:
diff changeset
     9
// Mike Kinghan, mikek@symbian.org, for Symbian Foundation
38a7352e23d3 1) Fix for Bug 3117 - [GCCE] Missing symbols in linkage of template_ekern.exe
mikek
parents:
diff changeset
    10
//
38a7352e23d3 1) Fix for Bug 3117 - [GCCE] Missing symbols in linkage of template_ekern.exe
mikek
parents:
diff changeset
    11
// Contributors:
38a7352e23d3 1) Fix for Bug 3117 - [GCCE] Missing symbols in linkage of template_ekern.exe
mikek
parents:
diff changeset
    12
//
38a7352e23d3 1) Fix for Bug 3117 - [GCCE] Missing symbols in linkage of template_ekern.exe
mikek
parents:
diff changeset
    13
// Description:
38a7352e23d3 1) Fix for Bug 3117 - [GCCE] Missing symbols in linkage of template_ekern.exe
mikek
parents:
diff changeset
    14
// kernelhwsrv/kernel/eka/common/arm/gccehlp.cpp
38a7352e23d3 1) Fix for Bug 3117 - [GCCE] Missing symbols in linkage of template_ekern.exe
mikek
parents:
diff changeset
    15
// 
38a7352e23d3 1) Fix for Bug 3117 - [GCCE] Missing symbols in linkage of template_ekern.exe
mikek
parents:
diff changeset
    16
//
38a7352e23d3 1) Fix for Bug 3117 - [GCCE] Missing symbols in linkage of template_ekern.exe
mikek
parents:
diff changeset
    17
38a7352e23d3 1) Fix for Bug 3117 - [GCCE] Missing symbols in linkage of template_ekern.exe
mikek
parents:
diff changeset
    18
#include "../common.h"
38a7352e23d3 1) Fix for Bug 3117 - [GCCE] Missing symbols in linkage of template_ekern.exe
mikek
parents:
diff changeset
    19
#include <nkern.h>
38a7352e23d3 1) Fix for Bug 3117 - [GCCE] Missing symbols in linkage of template_ekern.exe
mikek
parents:
diff changeset
    20
38a7352e23d3 1) Fix for Bug 3117 - [GCCE] Missing symbols in linkage of template_ekern.exe
mikek
parents:
diff changeset
    21
extern "C" {
38a7352e23d3 1) Fix for Bug 3117 - [GCCE] Missing symbols in linkage of template_ekern.exe
mikek
parents:
diff changeset
    22
EXPORT_C int __aeabi_idiv0 (int return_value)
38a7352e23d3 1) Fix for Bug 3117 - [GCCE] Missing symbols in linkage of template_ekern.exe
mikek
parents:
diff changeset
    23
    {
38a7352e23d3 1) Fix for Bug 3117 - [GCCE] Missing symbols in linkage of template_ekern.exe
mikek
parents:
diff changeset
    24
      FAULT();
38a7352e23d3 1) Fix for Bug 3117 - [GCCE] Missing symbols in linkage of template_ekern.exe
mikek
parents:
diff changeset
    25
      return return_value;
38a7352e23d3 1) Fix for Bug 3117 - [GCCE] Missing symbols in linkage of template_ekern.exe
mikek
parents:
diff changeset
    26
    }
38a7352e23d3 1) Fix for Bug 3117 - [GCCE] Missing symbols in linkage of template_ekern.exe
mikek
parents:
diff changeset
    27
38a7352e23d3 1) Fix for Bug 3117 - [GCCE] Missing symbols in linkage of template_ekern.exe
mikek
parents:
diff changeset
    28
EXPORT_C long long __aeabi_ldiv0 (long long return_value)
38a7352e23d3 1) Fix for Bug 3117 - [GCCE] Missing symbols in linkage of template_ekern.exe
mikek
parents:
diff changeset
    29
    {
38a7352e23d3 1) Fix for Bug 3117 - [GCCE] Missing symbols in linkage of template_ekern.exe
mikek
parents:
diff changeset
    30
      FAULT();
38a7352e23d3 1) Fix for Bug 3117 - [GCCE] Missing symbols in linkage of template_ekern.exe
mikek
parents:
diff changeset
    31
      return return_value;
38a7352e23d3 1) Fix for Bug 3117 - [GCCE] Missing symbols in linkage of template_ekern.exe
mikek
parents:
diff changeset
    32
    }
38a7352e23d3 1) Fix for Bug 3117 - [GCCE] Missing symbols in linkage of template_ekern.exe
mikek
parents:
diff changeset
    33
38a7352e23d3 1) Fix for Bug 3117 - [GCCE] Missing symbols in linkage of template_ekern.exe
mikek
parents:
diff changeset
    34
EXPORT_C __NAKED__ void __rt_exporter_dummy(void)
38a7352e23d3 1) Fix for Bug 3117 - [GCCE] Missing symbols in linkage of template_ekern.exe
mikek
parents:
diff changeset
    35
{
38a7352e23d3 1) Fix for Bug 3117 - [GCCE] Missing symbols in linkage of template_ekern.exe
mikek
parents:
diff changeset
    36
	asm(".comm _ZTVN10__cxxabiv117__class_type_infoE,4");
38a7352e23d3 1) Fix for Bug 3117 - [GCCE] Missing symbols in linkage of template_ekern.exe
mikek
parents:
diff changeset
    37
	asm(".comm _ZTVN10__cxxabiv120__si_class_type_infoE,4");
38a7352e23d3 1) Fix for Bug 3117 - [GCCE] Missing symbols in linkage of template_ekern.exe
mikek
parents:
diff changeset
    38
	asm(".comm _ZTVN10__cxxabiv121__vmi_class_type_infoE,4");
38a7352e23d3 1) Fix for Bug 3117 - [GCCE] Missing symbols in linkage of template_ekern.exe
mikek
parents:
diff changeset
    39
	asm(".comm _ZTVN10__cxxabiv121__vmi_class_type_infoE,4");
38a7352e23d3 1) Fix for Bug 3117 - [GCCE] Missing symbols in linkage of template_ekern.exe
mikek
parents:
diff changeset
    40
	asm(".comm __aeabi_lasr,4");
38a7352e23d3 1) Fix for Bug 3117 - [GCCE] Missing symbols in linkage of template_ekern.exe
mikek
parents:
diff changeset
    41
	asm(".comm __aeabi_lcmp,4");
38a7352e23d3 1) Fix for Bug 3117 - [GCCE] Missing symbols in linkage of template_ekern.exe
mikek
parents:
diff changeset
    42
	asm(".comm __aeabi_llsl,4");
38a7352e23d3 1) Fix for Bug 3117 - [GCCE] Missing symbols in linkage of template_ekern.exe
mikek
parents:
diff changeset
    43
	asm(".comm __aeabi_llsr,4");
38a7352e23d3 1) Fix for Bug 3117 - [GCCE] Missing symbols in linkage of template_ekern.exe
mikek
parents:
diff changeset
    44
	asm(".comm __aeabi_lmul,4");
38a7352e23d3 1) Fix for Bug 3117 - [GCCE] Missing symbols in linkage of template_ekern.exe
mikek
parents:
diff changeset
    45
	asm(".comm __aeabi_ulcmp,4");
38a7352e23d3 1) Fix for Bug 3117 - [GCCE] Missing symbols in linkage of template_ekern.exe
mikek
parents:
diff changeset
    46
	asm(".comm __aeabi_uread4,4");
38a7352e23d3 1) Fix for Bug 3117 - [GCCE] Missing symbols in linkage of template_ekern.exe
mikek
parents:
diff changeset
    47
	asm(".comm __aeabi_uread8,4");
38a7352e23d3 1) Fix for Bug 3117 - [GCCE] Missing symbols in linkage of template_ekern.exe
mikek
parents:
diff changeset
    48
	asm(".comm __aeabi_uwrite4,4");
38a7352e23d3 1) Fix for Bug 3117 - [GCCE] Missing symbols in linkage of template_ekern.exe
mikek
parents:
diff changeset
    49
	asm(".comm __aeabi_uwrite8,4");
38a7352e23d3 1) Fix for Bug 3117 - [GCCE] Missing symbols in linkage of template_ekern.exe
mikek
parents:
diff changeset
    50
	asm(".comm __cxa_guard_abort,4");
38a7352e23d3 1) Fix for Bug 3117 - [GCCE] Missing symbols in linkage of template_ekern.exe
mikek
parents:
diff changeset
    51
	asm(".comm __cxa_guard_acquire,4");
38a7352e23d3 1) Fix for Bug 3117 - [GCCE] Missing symbols in linkage of template_ekern.exe
mikek
parents:
diff changeset
    52
	asm(".comm __cxa_guard_release,4");
38a7352e23d3 1) Fix for Bug 3117 - [GCCE] Missing symbols in linkage of template_ekern.exe
mikek
parents:
diff changeset
    53
}
38a7352e23d3 1) Fix for Bug 3117 - [GCCE] Missing symbols in linkage of template_ekern.exe
mikek
parents:
diff changeset
    54
38a7352e23d3 1) Fix for Bug 3117 - [GCCE] Missing symbols in linkage of template_ekern.exe
mikek
parents:
diff changeset
    55
EXPORT_C int __cxa_pure_virtual()
38a7352e23d3 1) Fix for Bug 3117 - [GCCE] Missing symbols in linkage of template_ekern.exe
mikek
parents:
diff changeset
    56
//
38a7352e23d3 1) Fix for Bug 3117 - [GCCE] Missing symbols in linkage of template_ekern.exe
mikek
parents:
diff changeset
    57
// Gets called for any unreplaced pure virtual methods.
38a7352e23d3 1) Fix for Bug 3117 - [GCCE] Missing symbols in linkage of template_ekern.exe
mikek
parents:
diff changeset
    58
//
38a7352e23d3 1) Fix for Bug 3117 - [GCCE] Missing symbols in linkage of template_ekern.exe
mikek
parents:
diff changeset
    59
	{
38a7352e23d3 1) Fix for Bug 3117 - [GCCE] Missing symbols in linkage of template_ekern.exe
mikek
parents:
diff changeset
    60
#ifdef __STANDALONE_NANOKERNEL__
38a7352e23d3 1) Fix for Bug 3117 - [GCCE] Missing symbols in linkage of template_ekern.exe
mikek
parents:
diff changeset
    61
	__NK_ASSERT_ALWAYS(0);
38a7352e23d3 1) Fix for Bug 3117 - [GCCE] Missing symbols in linkage of template_ekern.exe
mikek
parents:
diff changeset
    62
#else
38a7352e23d3 1) Fix for Bug 3117 - [GCCE] Missing symbols in linkage of template_ekern.exe
mikek
parents:
diff changeset
    63
	Panic(EPureVirtualCalled);
38a7352e23d3 1) Fix for Bug 3117 - [GCCE] Missing symbols in linkage of template_ekern.exe
mikek
parents:
diff changeset
    64
#endif
38a7352e23d3 1) Fix for Bug 3117 - [GCCE] Missing symbols in linkage of template_ekern.exe
mikek
parents:
diff changeset
    65
	return 0;
38a7352e23d3 1) Fix for Bug 3117 - [GCCE] Missing symbols in linkage of template_ekern.exe
mikek
parents:
diff changeset
    66
	}
38a7352e23d3 1) Fix for Bug 3117 - [GCCE] Missing symbols in linkage of template_ekern.exe
mikek
parents:
diff changeset
    67
38a7352e23d3 1) Fix for Bug 3117 - [GCCE] Missing symbols in linkage of template_ekern.exe
mikek
parents:
diff changeset
    68
#ifdef __KERNEL_MODE__
38a7352e23d3 1) Fix for Bug 3117 - [GCCE] Missing symbols in linkage of template_ekern.exe
mikek
parents:
diff changeset
    69
38a7352e23d3 1) Fix for Bug 3117 - [GCCE] Missing symbols in linkage of template_ekern.exe
mikek
parents:
diff changeset
    70
void __cxa_end_catch(){}
38a7352e23d3 1) Fix for Bug 3117 - [GCCE] Missing symbols in linkage of template_ekern.exe
mikek
parents:
diff changeset
    71
38a7352e23d3 1) Fix for Bug 3117 - [GCCE] Missing symbols in linkage of template_ekern.exe
mikek
parents:
diff changeset
    72
void __cxa_begin_catch(){}
38a7352e23d3 1) Fix for Bug 3117 - [GCCE] Missing symbols in linkage of template_ekern.exe
mikek
parents:
diff changeset
    73
38a7352e23d3 1) Fix for Bug 3117 - [GCCE] Missing symbols in linkage of template_ekern.exe
mikek
parents:
diff changeset
    74
void __cxa_rethrow(){}
38a7352e23d3 1) Fix for Bug 3117 - [GCCE] Missing symbols in linkage of template_ekern.exe
mikek
parents:
diff changeset
    75
// std::terminate
38a7352e23d3 1) Fix for Bug 3117 - [GCCE] Missing symbols in linkage of template_ekern.exe
mikek
parents:
diff changeset
    76
38a7352e23d3 1) Fix for Bug 3117 - [GCCE] Missing symbols in linkage of template_ekern.exe
mikek
parents:
diff changeset
    77
void __cxa_call_unexpected() {}
38a7352e23d3 1) Fix for Bug 3117 - [GCCE] Missing symbols in linkage of template_ekern.exe
mikek
parents:
diff changeset
    78
38a7352e23d3 1) Fix for Bug 3117 - [GCCE] Missing symbols in linkage of template_ekern.exe
mikek
parents:
diff changeset
    79
void __aeabi_unwind_cpp_pr0() {}
38a7352e23d3 1) Fix for Bug 3117 - [GCCE] Missing symbols in linkage of template_ekern.exe
mikek
parents:
diff changeset
    80
38a7352e23d3 1) Fix for Bug 3117 - [GCCE] Missing symbols in linkage of template_ekern.exe
mikek
parents:
diff changeset
    81
void __cxa_end_cleanup() {}
38a7352e23d3 1) Fix for Bug 3117 - [GCCE] Missing symbols in linkage of template_ekern.exe
mikek
parents:
diff changeset
    82
38a7352e23d3 1) Fix for Bug 3117 - [GCCE] Missing symbols in linkage of template_ekern.exe
mikek
parents:
diff changeset
    83
#endif
38a7352e23d3 1) Fix for Bug 3117 - [GCCE] Missing symbols in linkage of template_ekern.exe
mikek
parents:
diff changeset
    84
}
38a7352e23d3 1) Fix for Bug 3117 - [GCCE] Missing symbols in linkage of template_ekern.exe
mikek
parents:
diff changeset
    85
38a7352e23d3 1) Fix for Bug 3117 - [GCCE] Missing symbols in linkage of template_ekern.exe
mikek
parents:
diff changeset
    86
#include "../common.h"
38a7352e23d3 1) Fix for Bug 3117 - [GCCE] Missing symbols in linkage of template_ekern.exe
mikek
parents:
diff changeset
    87
#include <kernel/kernel.h>
38a7352e23d3 1) Fix for Bug 3117 - [GCCE] Missing symbols in linkage of template_ekern.exe
mikek
parents:
diff changeset
    88
38a7352e23d3 1) Fix for Bug 3117 - [GCCE] Missing symbols in linkage of template_ekern.exe
mikek
parents:
diff changeset
    89
EXPORT_C TAny* operator new[](TUint aSize, const std::nothrow_t& aNoThrow) __NO_THROW
38a7352e23d3 1) Fix for Bug 3117 - [GCCE] Missing symbols in linkage of template_ekern.exe
mikek
parents:
diff changeset
    90
	{
38a7352e23d3 1) Fix for Bug 3117 - [GCCE] Missing symbols in linkage of template_ekern.exe
mikek
parents:
diff changeset
    91
	(void) aNoThrow;
38a7352e23d3 1) Fix for Bug 3117 - [GCCE] Missing symbols in linkage of template_ekern.exe
mikek
parents:
diff changeset
    92
	return Kern::Alloc(aSize);
38a7352e23d3 1) Fix for Bug 3117 - [GCCE] Missing symbols in linkage of template_ekern.exe
mikek
parents:
diff changeset
    93
	}
38a7352e23d3 1) Fix for Bug 3117 - [GCCE] Missing symbols in linkage of template_ekern.exe
mikek
parents:
diff changeset
    94
38a7352e23d3 1) Fix for Bug 3117 - [GCCE] Missing symbols in linkage of template_ekern.exe
mikek
parents:
diff changeset
    95
EXPORT_C TAny* operator new(TUint aSize, const std::nothrow_t& aNoThrow) __NO_THROW
38a7352e23d3 1) Fix for Bug 3117 - [GCCE] Missing symbols in linkage of template_ekern.exe
mikek
parents:
diff changeset
    96
//
38a7352e23d3 1) Fix for Bug 3117 - [GCCE] Missing symbols in linkage of template_ekern.exe
mikek
parents:
diff changeset
    97
// The global new operator.
38a7352e23d3 1) Fix for Bug 3117 - [GCCE] Missing symbols in linkage of template_ekern.exe
mikek
parents:
diff changeset
    98
//
38a7352e23d3 1) Fix for Bug 3117 - [GCCE] Missing symbols in linkage of template_ekern.exe
mikek
parents:
diff changeset
    99
	{
38a7352e23d3 1) Fix for Bug 3117 - [GCCE] Missing symbols in linkage of template_ekern.exe
mikek
parents:
diff changeset
   100
	(void) aNoThrow;
38a7352e23d3 1) Fix for Bug 3117 - [GCCE] Missing symbols in linkage of template_ekern.exe
mikek
parents:
diff changeset
   101
	return Kern::Alloc(aSize);
38a7352e23d3 1) Fix for Bug 3117 - [GCCE] Missing symbols in linkage of template_ekern.exe
mikek
parents:
diff changeset
   102
	}
38a7352e23d3 1) Fix for Bug 3117 - [GCCE] Missing symbols in linkage of template_ekern.exe
mikek
parents:
diff changeset
   103
38a7352e23d3 1) Fix for Bug 3117 - [GCCE] Missing symbols in linkage of template_ekern.exe
mikek
parents:
diff changeset
   104