--- a/kernel/eka/kernel/scodeseg.cpp Wed Oct 20 13:58:28 2010 +0100
+++ b/kernel/eka/kernel/scodeseg.cpp Tue Nov 02 15:29:23 2010 +0000
@@ -1038,11 +1038,21 @@
DCodeSeg* pS=(i<0)?iCodeSeg:iDynamicCode[i].iSeg;
if (pS && pS!=aExclude)
{
- if ((aFlags & ETraverseFlagRestrict) && i>=0)
+ if (aFlags & ETraverseFlagRestrict)
{
- DLibrary* pL=iDynamicCode[i].iLib;
- if (pL && pL->iState!=DLibrary::EAttached)
- continue;
+ if (i>=0)
+ {
+ // Codeseg is a dynamic dependency
+ DLibrary* pL=iDynamicCode[i].iLib;
+ if (pL && pL->iState!=DLibrary::EAttached)
+ continue;
+ }
+ else
+ {
+ // Static dependencies of process
+ if (!(iAttributes&EStaticCallsDone))
+ continue;
+ }
}
if (aFlags & ETraverseFlagAdd)
n+=pS->ListDeps(aQ,aMark);
@@ -2078,6 +2088,18 @@
return KErrNone;
}
+// Mark the process after implicit DLL entry points have been called
+void ExecHandler::StaticCallsDone()
+ {
+ __KTRACE_OPT2(KEXEC,KDLL,Kern::Printf(">Exec::StaticCallsDone"));
+ DThread& t=*TheCurrentThread;
+ DProcess& p=*t.iOwningProcess;
+ NKern::LockSystem();
+ p.iAttributes|=DProcess::EStaticCallsDone;
+ NKern::UnlockSystem();
+ __KTRACE_OPT2(KEXEC,KDLL,Kern::Printf("<Exec::StaticCallsDone"));
+ }
+
// Extract a list of DLL entry points for a closing DLL
TInt ExecHandler::LibraryDetach(TInt& aNumEps, TLinAddr* aEpList)
{