[PEFILE:APITEST]: Validate IMAGE_SCN_MEM_NOT_PAGED flag for PE files. By Mark Jansen...
authorHermès Bélusca-Maïto <hermes.belusca-maito@reactos.org>
Sat, 12 Sep 2015 13:08:47 +0000 (13:08 +0000)
committerHermès Bélusca-Maïto <hermes.belusca-maito@reactos.org>
Sat, 12 Sep 2015 13:08:47 +0000 (13:08 +0000)
svn path=/trunk/; revision=69198

rostests/apitests/pefile/ntoskrnl.c

index 41186dc..557d7ad 100644 (file)
@@ -18,21 +18,24 @@ typedef struct KnownSections
 static struct KnownSections g_Sections[] = {
     {
         ".text",
 static struct KnownSections g_Sections[] = {
     {
         ".text",
-        IMAGE_SCN_CNT_CODE | IMAGE_SCN_MEM_EXECUTE | IMAGE_SCN_MEM_READ,
+        IMAGE_SCN_CNT_CODE | IMAGE_SCN_MEM_EXECUTE | IMAGE_SCN_MEM_READ | IMAGE_SCN_MEM_NOT_PAGED,
         IMAGE_SCN_MEM_DISCARDABLE
         IMAGE_SCN_MEM_DISCARDABLE
-        // optional: IMAGE_SCN_MEM_NOT_PAGED
     },
     {
         ".data",
     },
     {
         ".data",
-        IMAGE_SCN_CNT_INITIALIZED_DATA | IMAGE_SCN_MEM_READ | IMAGE_SCN_MEM_WRITE,
+        IMAGE_SCN_CNT_INITIALIZED_DATA | IMAGE_SCN_MEM_READ | IMAGE_SCN_MEM_WRITE | IMAGE_SCN_MEM_NOT_PAGED,
         IMAGE_SCN_MEM_DISCARDABLE
         IMAGE_SCN_MEM_DISCARDABLE
-        // optional: IMAGE_SCN_MEM_NOT_PAGED
     },
     {
         ".rsrc",
         IMAGE_SCN_CNT_INITIALIZED_DATA | IMAGE_SCN_MEM_READ,
         IMAGE_SCN_MEM_DISCARDABLE
     },
     },
     {
         ".rsrc",
         IMAGE_SCN_CNT_INITIALIZED_DATA | IMAGE_SCN_MEM_READ,
         IMAGE_SCN_MEM_DISCARDABLE
     },
+    {
+        ".rdata",
+        IMAGE_SCN_CNT_INITIALIZED_DATA | IMAGE_SCN_MEM_READ,
+        IMAGE_SCN_MEM_DISCARDABLE
+    },
     {
         ".reloc",
         IMAGE_SCN_CNT_INITIALIZED_DATA | IMAGE_SCN_MEM_DISCARDABLE | IMAGE_SCN_MEM_READ,
     {
         ".reloc",
         IMAGE_SCN_CNT_INITIALIZED_DATA | IMAGE_SCN_MEM_DISCARDABLE | IMAGE_SCN_MEM_READ,
@@ -42,7 +45,6 @@ static struct KnownSections g_Sections[] = {
         "INIT",
         IMAGE_SCN_CNT_CODE | IMAGE_SCN_MEM_DISCARDABLE | IMAGE_SCN_MEM_EXECUTE | IMAGE_SCN_MEM_READ,
         0
         "INIT",
         IMAGE_SCN_CNT_CODE | IMAGE_SCN_MEM_DISCARDABLE | IMAGE_SCN_MEM_EXECUTE | IMAGE_SCN_MEM_READ,
         0
-        // optional?? : IMAGE_SCN_MEM_WRITE
     },
     { NULL, 0 },
 };
     },
     { NULL, 0 },
 };