fix linker options
authorChristoph von Wittich <christoph_vw@reactos.org>
Wed, 30 Nov 2005 09:16:21 +0000 (09:16 +0000)
committerChristoph von Wittich <christoph_vw@reactos.org>
Wed, 30 Nov 2005 09:16:21 +0000 (09:16 +0000)
svn path=/trunk/; revision=19774

reactos/tools/rbuild/backend/msvc/vcprojmaker.cpp

index b84d0a0..7bbb7b5 100644 (file)
@@ -325,20 +325,27 @@ MSVCBackend::_generate_vcproj ( const Module& module )
 \r
                        if ( sys )\r
                        {\r
-                               fprintf ( OUT, "\t\t\t\tAdditionalOptions=\" /DRIVER /ALIGN:0x20 /subsystem:NATIVE /SECTION:INIT,D /FORCE:MULTIPLE /IGNORE:4001,4037,4039,4065,4070,4078,4087,4089,4096\"\r\n" );\r
+                               fprintf ( OUT, "\t\t\t\tAdditionalOptions=\" /DRIVER /ALIGN:0x20 /SUBSYSTEM:NATIVE /SECTION:INIT,D /NODEFAULTLIB /IGNORE:4001,4037,4039,4065,4070,4078,4087,4089,4096\"\r\n" );\r
                                fprintf ( OUT, "\t\t\t\tIgnoreAllDefaultLibraries=\"TRUE\"\r\n" );\r
                                fprintf ( OUT, "\t\t\t\tEntryPointSymbol=\"%s\"\r\n", module.entrypoint == "" ? "DriverEntry" : module.entrypoint.c_str ());\r
                                fprintf ( OUT, "\t\t\t\tBaseAddress=\"%s\"\r\n", module.baseaddress == "" ? "0x10000" : module.baseaddress.c_str ());   \r
                        }\r
                        else if ( exe )\r
                        {\r
-                               if ( module.type == Kernel || module.type == NativeCUI)\r
+                               if ( module.type == Kernel )\r
                                {\r
-                                       fprintf ( OUT, "\t\t\t\tAdditionalOptions=\" /SUBSYSTEM:NATIVE /SECTION:INIT,D /ALIGN:4096 /FORCE:MULTIPLE\"\r\n" );\r
+                                       fprintf ( OUT, "\t\t\t\tAdditionalOptions=\" /SUBSYSTEM:NATIVE /NODEFAULTLIB /SECTION:INIT,D /ALIGN:0x80\"\r\n" );\r
                                        fprintf ( OUT, "\t\t\t\tIgnoreAllDefaultLibraries=\"TRUE\"\r\n" );\r
-                                       fprintf ( OUT, "\t\t\t\tEntryPointSymbol=\"%s\"\r\n", module.entrypoint.c_str ());\r
+                                       fprintf ( OUT, "\t\t\t\tEntryPointSymbol=\"KiSystemStartup\"\r\n" );\r
                                        fprintf ( OUT, "\t\t\t\tBaseAddress=\"%s\"\r\n", module.baseaddress.c_str ());  \r
                                }\r
+                               else if ( module.type == NativeCUI )\r
+                               {\r
+                                       fprintf ( OUT, "\t\t\t\tAdditionalOptions=\" /SUBSYSTEM:NATIVE /NODEFAULTLIB /ALIGN:0x20\"\r\n" );\r
+                                       fprintf ( OUT, "\t\t\t\tIgnoreAllDefaultLibraries=\"TRUE\"\r\n" );\r
+                                       fprintf ( OUT, "\t\t\t\tEntryPointSymbol=\"NtProcessStartup\"\r\n" );\r
+                                       fprintf ( OUT, "\t\t\t\tBaseAddress=\"%s\"\r\n", module.baseaddress.c_str ());  \r
+                               }\r
                                else if ( module.type == Win32CUI || module.type == Win32GUI )\r
                                {\r
                                        fprintf ( OUT, "\t\t\t\tSubSystem=\"%d\"\r\n", console ? 1 : 2 );\r