imgtools/romtools/rombuild/r_rom.cpp
changeset 640 ac0bbc1e5d79
parent 631 9435b9008a58
child 694 c3fbb20e86f0
--- a/imgtools/romtools/rombuild/r_rom.cpp	Mon Sep 06 09:57:24 2010 +0100
+++ b/imgtools/romtools/rombuild/r_rom.cpp	Mon Sep 13 13:11:19 2010 +0800
@@ -563,7 +563,7 @@
 
 TInt E32Rom::SetupPages()
 	{
-	iHeader->iPageableRomStart = 0;
+	iHeader->iPageableRomStart = iSizeUsed;
 	iHeader->iPageableRomSize = 0;
 	iHeader->iDemandPagingConfig = gDemandPagingConfig;
 
@@ -637,6 +637,8 @@
 		pi->iDataStart = prev->iDataStart + prev->iDataSize;
 		}
 	TInt relSize = pi->iDataStart + pi->iDataSize;
+	if (relSize == 0)//no page is compressed
+		relSize = iSizeUsed;
 
 	memset((TUint8*)iHeader + relSize, 0xff, iSizeUsed - relSize);
 	TInt compression = (iSizeUsed >= 1000) ? (relSize*10)/(iSizeUsed/1000) : (relSize*10000)/iSizeUsed;