[Common-cvs] system/platform/symbian symbian_dll.cpp, 1.13, 1.14 symbian_dll_map.cpp, 1.5, 1.6
rrajesh at helixcommunity.org rrajesh at helixcommunity.orgUpdate of /cvsroot/common/system/platform/symbian
In directory cvs:/tmp/cvs-serv22291
Modified Files:
symbian_dll.cpp symbian_dll_map.cpp
Log Message:
>
> Synopsis: Symbian 9.1 Global variable cleanup routine for each DLL
>
> In Symbian 9.0, the Rlibrary::EntryPoint() api has been deprecated.
> The Entry point API E32DLL was used to cleanup the Globalmanager
> entries created by each DLL. To cleanup the Global variable entries
> created by each DLL, a new API FreeGlobal has been added to each DLL,
> which will cleanup the GlobalMgr.
>
> The Creation of the API was already in place for winscw build, but was
> never used. The same code change has been made for armv5 builds. Apart
> from that symbian_dll map info has been added with code to invoke the
> FreeGlobals API for each DLL.
>
> New file is added which has the common changes for platform security.
> This cf can be executed for all symbian 9.x platforms.
> Replaced the _SECURE_API_ flag with
> HELIX_CONFIG_SYMBIAN_PLATFORM_SECURITY.
>
>
> Files Changed:
> Build\umakecf\symbian.cf
> Build\umakecf\symbian-91-winscw-emulator.cf
> Build\Umakecf\symbian-91.cf
>
> Common\system\platform\symbian\symbian_dll.cpp
> Common\system\platform\symbian\symbian_dll_map.cpp
>
> Files Added:
> Build\umakecf\symbian-plat-sec.cf.
Index: symbian_dll.cpp
===================================================================
RCS file: /cvsroot/common/system/platform/symbian/symbian_dll.cpp,v
retrieving revision 1.13
retrieving revision 1.14
diff -u -d -r1.13 -r1.14
--- symbian_dll.cpp 11 May 2005 19:18:03 -0000 1.13
+++ symbian_dll.cpp 17 Nov 2005 23:31:52 -0000 1.14
@@ -123,11 +123,11 @@
{
ISymbianDLLMap* pDLLMap = HXSymbianDLLMapInstance::GetInstance();
-#ifndef __SECURE_API__ // Configuration options for Symbian_OS_v*.*
+#ifndef HELIX_CONFIG_SYMBIAN_PLATFORM_SECURITY // Configuration options for Symbian_OS_v*.*
void* pEntrypoint = (void*)m_handle.EntryPoint();
#else
- void* pEntrypoint = (void*)m_handle.Lookup(1);
-#endif /* __SECURE_API__ */
+ void* pEntrypoint = (void*)m_handle.Lookup(2);
+#endif /* HELIX_CONFIG_SYMBIAN_PLATFORM_SECURITY */
HX_ASSERT(pDLLMap);
if (pDLLMap && pEntrypoint)
@@ -156,11 +156,11 @@
{
ISymbianDLLMap* pDLLMap = HXSymbianDLLMapInstance::GetInstance();
-#ifndef __SECURE_API__ // Configuration options for Symbian_OS_v*.*
+#ifndef HELIX_CONFIG_SYMBIAN_PLATFORM_SECURITY // Configuration options for Symbian_OS_v*.*
void* pEntrypoint = (void*)m_handle.EntryPoint();
#else
- void* pEntrypoint = (void*)m_handle.Lookup(1);
-#endif /* __SECURE_API__ */
+ void* pEntrypoint = (void*)m_handle.Lookup(2);
+#endif /* HELIX_CONFIG_SYMBIAN_PLATFORM_SECURITY */
HX_ASSERT(pDLLMap);
if (pDLLMap && pEntrypoint)
Index: symbian_dll_map.cpp
===================================================================
RCS file: /cvsroot/common/system/platform/symbian/symbian_dll_map.cpp,v
retrieving revision 1.5
retrieving revision 1.6
diff -u -d -r1.5 -r1.6
--- symbian_dll_map.cpp 11 May 2005 19:18:12 -0000 1.5
+++ symbian_dll_map.cpp 17 Nov 2005 23:31:52 -0000 1.6
@@ -101,7 +101,8 @@
void DLLMapInfo::DoCleanup()
{
-#if defined(_ARM) && !defined(__SECURE_API__)
+#if !defined(HELIX_CONFIG_SYMBIAN_PLATFORM_SECURITY)
+#if defined(_ARM)
// Configuration options for Symbian_OS_v*.*
// Make the device behave like the emulator.
// The emulator calls E32Dll(EDllProcessDetach) when
@@ -115,6 +116,18 @@
pEntry(EDllProcessDetach);
}
#endif
+#else
+ // The EntryPoint stores the function pointer for FreeGlobals.
+ // Symbian 3.0 deprecated the EntryPoint API. So FreeGlobal
+ // api is added into dlls for cleaning global maps.
+ if(m_pEntryPoint != NULL)
+ {
+ TLibraryEntry pFreeGlobal = (TLibraryEntry)m_pEntryPoint;
+ pFreeGlobal(1);
+ }
+#endif // End of #if !defined(HELIX_CONFIG_SYMBIAN_PLATFORM_SECURITY)
+
+
}
SymbianDLLMapImp::SymbianDLLMapImp()