else\r
entrypoint = GetDefaultModuleEntrypoint ();\r
\r
+ att = moduleNode.GetAttribute ( "baseaddress", false );\r
+ if ( att != NULL )\r
+ baseaddress = att->value;\r
+ else\r
+ baseaddress = GetDefaultModuleBaseaddress ();\r
+\r
att = moduleNode.GetAttribute ( "mangledsymbols", false );\r
if ( att != NULL )\r
mangledSymbols = att->value != "false";\r
__LINE__ );\r
}\r
\r
+string\r
+Module::GetDefaultModuleBaseaddress () const\r
+{\r
+ switch (type)\r
+ {\r
+ case Kernel:\r
+ return "0xc0000000";\r
+ case KernelModeDLL:\r
+ return "0x10000";\r
+ case NativeDLL:\r
+ return "0x10000";\r
+ case NativeCUI:\r
+ return "0x10000";\r
+ case Win32DLL:\r
+ return "0x10000";\r
+ case Win32CUI:\r
+ return "0x00400000";\r
+ case Win32GUI:\r
+ return "0x00400000";\r
+ case KernelModeDriver:\r
+ return "0x10000";\r
+ case BuildTool:\r
+ case StaticLibrary:\r
+ case ObjectLibrary:\r
+ case BootLoader:\r
+ case BootSector:\r
+ case Iso:\r
+ return "";\r
+ }\r
+ throw InvalidOperationException ( __FILE__,\r
+ __LINE__ );\r
+}\r
+\r
bool\r
Module::HasImportLibrary () const\r
{\r