Don't link kernel-mode modules to kernel32.dll
Modified: branches/xmlbuildsystem/reactos/Makefile
Modified: branches/xmlbuildsystem/reactos/drivers/dd/null/null.xml
Modified: branches/xmlbuildsystem/reactos/drivers/fs/vfat/vfatfs.xml
Modified: branches/xmlbuildsystem/reactos/drivers/lib/bzip2/bzip2.xml
Modified: branches/xmlbuildsystem/reactos/drivers/net/afd/afd.xml
Modified: branches/xmlbuildsystem/reactos/drivers/storage/disk/disk.xml
Modified: branches/xmlbuildsystem/reactos/subsys/win32k/win32k.xml
Modified:
branches/xmlbuildsystem/reactos/tools/rbuild/backend/mingw/modulehandler
.cpp
Modified:
branches/xmlbuildsystem/reactos/tools/rbuild/backend/mingw/modulehandler
.h
_____
Modified: branches/xmlbuildsystem/reactos/Makefile
--- branches/xmlbuildsystem/reactos/Makefile 2005-04-20 16:01:19 UTC
(rev 14715)
+++ branches/xmlbuildsystem/reactos/Makefile 2005-04-20 17:57:26 UTC
(rev 14716)
@@ -35,7 +35,6 @@
#
# ROS_RBUILDFLAGS
# Pass parameters to rbuild.
-#
.PHONY: all
.PHONY: clean
_____
Modified: branches/xmlbuildsystem/reactos/drivers/dd/null/null.xml
--- branches/xmlbuildsystem/reactos/drivers/dd/null/null.xml
2005-04-20 16:01:19 UTC (rev 14715)
+++ branches/xmlbuildsystem/reactos/drivers/dd/null/null.xml
2005-04-20 17:57:26 UTC (rev 14716)
@@ -1,9 +1,9 @@
<module name="null" type="kernelmodedriver"
installbase="system32/drivers" installname="null.sys">
<include base="null">.</include>
<define name="__USE_W32API" />
+ <library>pseh</library>
<library>ntoskrnl</library>
<library>hal</library>
- <library>pseh</library>
<file>null.c</file>
<file>null.rc</file>
</module>
_____
Modified: branches/xmlbuildsystem/reactos/drivers/fs/vfat/vfatfs.xml
--- branches/xmlbuildsystem/reactos/drivers/fs/vfat/vfatfs.xml
2005-04-20 16:01:19 UTC (rev 14715)
+++ branches/xmlbuildsystem/reactos/drivers/fs/vfat/vfatfs.xml
2005-04-20 17:57:26 UTC (rev 14716)
@@ -2,6 +2,7 @@
<bootstrap base="reactos" />
<include base="vfatfs">.</include>
<define name="__USE_W32API" />
+ <linkerflag>-lgcc</linkerflag>
<library>ntoskrnl</library>
<library>hal</library>
<file>blockdev.c</file>
_____
Modified: branches/xmlbuildsystem/reactos/drivers/lib/bzip2/bzip2.xml
--- branches/xmlbuildsystem/reactos/drivers/lib/bzip2/bzip2.xml
2005-04-20 16:01:19 UTC (rev 14715)
+++ branches/xmlbuildsystem/reactos/drivers/lib/bzip2/bzip2.xml
2005-04-20 17:57:26 UTC (rev 14716)
@@ -3,6 +3,7 @@
<define name="BZ_NO_STDIO" />
<define name="BZ_DECOMPRESS_ONLY" />
<define name="__USE_W32API" />
+ <linkerflag>-lgcc</linkerflag>
<library>ntoskrnl</library>
<library>hal</library>
<file>bzlib.c</file>
_____
Modified: branches/xmlbuildsystem/reactos/drivers/net/afd/afd.xml
--- branches/xmlbuildsystem/reactos/drivers/net/afd/afd.xml
2005-04-20 16:01:19 UTC (rev 14715)
+++ branches/xmlbuildsystem/reactos/drivers/net/afd/afd.xml
2005-04-20 17:57:26 UTC (rev 14716)
@@ -2,11 +2,11 @@
<include base="afd">include</include>
<include base="ReactOS">include/afd</include>
<define name="__USE_W32API" />
+ <library>pseh</library>
<library>ntoskrnl</library>
<library>hal</library>
- <library>pseh</library>
<directory name="include">
- <pch>afd.h</pch>
+ <pch>afd.h</pch>
</directory>
<directory name="afd">
<file>bind.c</file>
_____
Modified: branches/xmlbuildsystem/reactos/drivers/storage/disk/disk.xml
--- branches/xmlbuildsystem/reactos/drivers/storage/disk/disk.xml
2005-04-20 16:01:19 UTC (rev 14715)
+++ branches/xmlbuildsystem/reactos/drivers/storage/disk/disk.xml
2005-04-20 17:57:26 UTC (rev 14716)
@@ -1,5 +1,6 @@
<module name="disk" type="kernelmodedriver"
installbase="system32/drivers" installname="debugout.sys">
<bootstrap base="reactos" />
+ <linkerflag>-lgcc</linkerflag>
<library>ntoskrnl</library>
<library>hal</library>
<library>class2</library>
_____
Modified: branches/xmlbuildsystem/reactos/subsys/win32k/win32k.xml
--- branches/xmlbuildsystem/reactos/subsys/win32k/win32k.xml
2005-04-20 16:01:19 UTC (rev 14715)
+++ branches/xmlbuildsystem/reactos/subsys/win32k/win32k.xml
2005-04-20 17:57:26 UTC (rev 14716)
@@ -9,10 +9,10 @@
<define name="_WIN32_WINNT">0x0501</define>
<define name="WINVER">0x600</define>
<define name="_WIN32K_" />
+ <library>pseh</library>
<library>rosrtl</library>
<library>ntoskrnl</library>
<library>hal</library>
- <library>pseh</library>
<library>freetype</library>
<pch>w32k.h</pch>
<directory name="dib">
_____
Modified:
branches/xmlbuildsystem/reactos/tools/rbuild/backend/mingw/modulehandler
.cpp
---
branches/xmlbuildsystem/reactos/tools/rbuild/backend/mingw/modulehandler
.cpp 2005-04-20 16:01:19 UTC (rev 14715)
+++
branches/xmlbuildsystem/reactos/tools/rbuild/backend/mingw/modulehandler
.cpp 2005-04-20 17:57:26 UTC (rev 14716)
@@ -1511,6 +1511,15 @@
nasmflags.c_str () );
}
+ string linkerflags = TypeSpecificLinkerFlags();
+ if ( linkerflags.size() > 0 )
+ {
+ fprintf ( fMakefile,
+ "%s += %s\n\n",
+ linkerflagsMacro.c_str (),
+ linkerflags.c_str () );
+ }
+
fprintf ( fMakefile, "\n\n" );
// future references to the macros will be to get their values
_____
Modified:
branches/xmlbuildsystem/reactos/tools/rbuild/backend/mingw/modulehandler
.h
---
branches/xmlbuildsystem/reactos/tools/rbuild/backend/mingw/modulehandler
.h 2005-04-20 16:01:19 UTC (rev 14715)
+++
branches/xmlbuildsystem/reactos/tools/rbuild/backend/mingw/modulehandler
.h 2005-04-20 17:57:26 UTC (rev 14716)
@@ -49,6 +49,7 @@
virtual void Process () = 0;
virtual std::string TypeSpecificCFlags() { return ""; }
virtual std::string TypeSpecificNasmFlags() { return ""; }
+ virtual std::string TypeSpecificLinkerFlags() { return ""; }
void GenerateInvocations () const;
void GenerateCleanTarget () const;
static bool ReferenceObjects ( const Module& module );
@@ -196,6 +197,7 @@
MingwKernelModuleHandler ( const Module& module );
virtual HostType DefaultHost() { return HostFalse; }
virtual void Process ();
+ std::string TypeSpecificCFlags() { return
"-D_SEH_NO_NATIVE_NLG"; }
private:
void GenerateKernelModuleTarget ();
};
@@ -229,6 +231,8 @@
MingwKernelModeDLLModuleHandler ( const Module& module );
virtual HostType DefaultHost() { return HostFalse; }
virtual void Process ();
+ std::string TypeSpecificCFlags() { return
"-D_SEH_NO_NATIVE_NLG"; }
+ std::string TypeSpecificLinkerFlags() { return "-nostartfiles
-nostdlib"; }
private:
void GenerateKernelModeDLLModuleTarget ();
};
@@ -240,7 +244,8 @@
MingwKernelModeDriverModuleHandler ( const Module& module );
virtual HostType DefaultHost() { return HostFalse; }
virtual void Process ();
- std::string TypeSpecificCFlags() { return "-D__NTDRIVER__"; }
+ std::string TypeSpecificCFlags() { return "-D__NTDRIVER__
-D_SEH_NO_NATIVE_NLG"; }
+ std::string TypeSpecificLinkerFlags() { return "-nostartfiles
-nostdlib"; }
private:
void GenerateKernelModeDriverModuleTarget ();
};
@@ -252,6 +257,8 @@
MingwNativeDLLModuleHandler ( const Module& module );
virtual HostType DefaultHost() { return HostFalse; }
virtual void Process ();
+ std::string TypeSpecificCFlags() { return
"-D_SEH_NO_NATIVE_NLG"; }
+ std::string TypeSpecificLinkerFlags() { return "-nostartfiles
-nostdlib"; }
private:
void GenerateNativeDLLModuleTarget ();
};
@@ -263,7 +270,8 @@
MingwNativeCUIModuleHandler ( const Module& module );
virtual HostType DefaultHost() { return HostFalse; }
virtual void Process ();
- std::string TypeSpecificCFlags() { return "-D__NTAPP__"; }
+ std::string TypeSpecificCFlags() { return "-D__NTAPP__
-D_SEH_NO_NATIVE_NLG"; }
+ std::string TypeSpecificLinkerFlags() { return "-nostartfiles
-nostdlib"; }
private:
void GenerateNativeCUIModuleTarget ();
};
@@ -309,6 +317,7 @@
MingwBootLoaderModuleHandler ( const Module& module );
virtual HostType DefaultHost() { return HostFalse; }
virtual void Process ();
+ std::string TypeSpecificLinkerFlags() { return "-nostartfiles
-nostdlib"; }
private:
void GenerateBootLoaderModuleTarget ();
};