Author: hpoussin
Date: Mon Jul 30 17:18:35 2007
New Revision: 28043
URL:
http://svn.reactos.org/svn/reactos?rev=28043&view=rev
Log:
Remove ExportDriver concept.
If you want a driver which exports some functions, simply set it as kernelmodedriver and
add a .def file
Modified:
trunk/reactos/drivers/ksfilter/ks/ks.rbuild
trunk/reactos/drivers/network/ndis/ndis.rbuild
trunk/reactos/drivers/network/tcpip/tcpip.rbuild
trunk/reactos/drivers/network/tdi/tdi.rbuild
trunk/reactos/drivers/storage/class/class2/class2.rbuild
trunk/reactos/drivers/storage/ide/pciidex/pciidex.rbuild
trunk/reactos/drivers/storage/port/diskdump/diskdump.rbuild
trunk/reactos/drivers/storage/scsiport/scsiport.rbuild
trunk/reactos/drivers/video/videoprt/videoprt.rbuild
trunk/reactos/drivers/wdm/audio/drm/drmk/drmk.rbuild
trunk/reactos/drivers/wmi/wmilib.rbuild
trunk/reactos/subsystems/win32/win32k/win32k.rbuild
trunk/reactos/tools/rbuild/backend/mingw/modulehandler.cpp
trunk/reactos/tools/rbuild/bootstrap.cpp
trunk/reactos/tools/rbuild/module.cpp
trunk/reactos/tools/rbuild/rbuild.h
Modified: trunk/reactos/drivers/ksfilter/ks/ks.rbuild
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/drivers/ksfilter/ks/ks.rbu…
==============================================================================
--- trunk/reactos/drivers/ksfilter/ks/ks.rbuild (original)
+++ trunk/reactos/drivers/ksfilter/ks/ks.rbuild Mon Jul 30 17:18:35 2007
@@ -1,4 +1,4 @@
-<module name="ks" type="exportdriver"
installbase="system32/drivers" installname="ks.sys"
allowwarnings="true">
+<module name="ks" type="kernelmodedriver"
installbase="system32/drivers" installname="ks.sys"
allowwarnings="true">
<include base="ks">.</include>
<include base="ks">..</include>
<include base="ks">../include</include>
@@ -7,7 +7,7 @@
<define name="__USE_W32API" />
<define name="BUILDING_KS" />
<define name="_NTDDK_" />
- <define name="_COMDDK_" />
+ <define name="_COMDDK_" />
<file>ks.rc</file>
<file>allocators.c</file>
<file>clocks.c</file>
Modified: trunk/reactos/drivers/network/ndis/ndis.rbuild
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/drivers/network/ndis/ndis.…
==============================================================================
--- trunk/reactos/drivers/network/ndis/ndis.rbuild (original)
+++ trunk/reactos/drivers/network/ndis/ndis.rbuild Mon Jul 30 17:18:35 2007
@@ -1,4 +1,4 @@
-<module name="ndis" type="exportdriver"
installbase="system32/drivers" installname="ndis.sys">
+<module name="ndis" type="kernelmodedriver"
installbase="system32/drivers" installname="ndis.sys">
<importlibrary definition="ndis.def"></importlibrary>
<include base="ndis">include</include>
<define name="NDIS_WRAPPER" />
Modified: trunk/reactos/drivers/network/tcpip/tcpip.rbuild
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/drivers/network/tcpip/tcpi…
==============================================================================
--- trunk/reactos/drivers/network/tcpip/tcpip.rbuild (original)
+++ trunk/reactos/drivers/network/tcpip/tcpip.rbuild Mon Jul 30 17:18:35 2007
@@ -1,4 +1,4 @@
-<module name="tcpip" type="exportdriver"
installbase="system32/drivers" installname="tcpip.sys">
+<module name="tcpip" type="kernelmodedriver"
installbase="system32/drivers" installname="tcpip.sys">
<importlibrary definition="tcpip.def"></importlibrary>
<include base="tcpip">include</include>
<include base="oskittcp">include</include>
Modified: trunk/reactos/drivers/network/tdi/tdi.rbuild
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/drivers/network/tdi/tdi.rb…
==============================================================================
--- trunk/reactos/drivers/network/tdi/tdi.rbuild (original)
+++ trunk/reactos/drivers/network/tdi/tdi.rbuild Mon Jul 30 17:18:35 2007
@@ -1,4 +1,4 @@
-<module name="tdi" type="exportdriver"
installbase="system32/drivers" installname="tdi.sys">
+<module name="tdi" type="kernelmodedriver"
installbase="system32/drivers" installname="tdi.sys">
<importlibrary definition="misc/tdi.def"></importlibrary>
<define name="__USE_W32API" />
<library>ntoskrnl</library>
Modified: trunk/reactos/drivers/storage/class/class2/class2.rbuild
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/drivers/storage/class/clas…
==============================================================================
--- trunk/reactos/drivers/storage/class/class2/class2.rbuild (original)
+++ trunk/reactos/drivers/storage/class/class2/class2.rbuild Mon Jul 30 17:18:35 2007
@@ -1,4 +1,4 @@
-<module name="class2" type="exportdriver"
installbase="system32/drivers" installname="class2.sys">
+<module name="class2" type="kernelmodedriver"
installbase="system32/drivers" installname="class2.sys">
<bootstrap base="$(CDOUTPUT)" />
<define name="__USE_W32API" />
<importlibrary definition="class2.def" />
Modified: trunk/reactos/drivers/storage/ide/pciidex/pciidex.rbuild
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/drivers/storage/ide/pciide…
==============================================================================
--- trunk/reactos/drivers/storage/ide/pciidex/pciidex.rbuild (original)
+++ trunk/reactos/drivers/storage/ide/pciidex/pciidex.rbuild Mon Jul 30 17:18:35 2007
@@ -1,4 +1,4 @@
-<module name="pciidex" type="exportdriver"
installbase="system32/drivers" installname="pciidex.sys">
+<module name="pciidex" type="kernelmodedriver"
installbase="system32/drivers" installname="pciidex.sys">
<importlibrary definition="pciidex.def" />
<define name="__USE_W32API" />
<library>ntoskrnl</library>
Modified: trunk/reactos/drivers/storage/port/diskdump/diskdump.rbuild
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/drivers/storage/port/diskd…
==============================================================================
--- trunk/reactos/drivers/storage/port/diskdump/diskdump.rbuild (original)
+++ trunk/reactos/drivers/storage/port/diskdump/diskdump.rbuild Mon Jul 30 17:18:35 2007
@@ -1,4 +1,4 @@
-<module name="diskdump" type="exportdriver"
installbase="system32/drivers" installname="diskdump.sys">
+<module name="diskdump" type="kernelmodedriver"
installbase="system32/drivers" installname="diskdump.sys">
<bootstrap base="$(CDOUTPUT)" />
<define name="__USE_W32API" />
<include base="ReactOS">include/reactos/drivers</include>
Modified: trunk/reactos/drivers/storage/scsiport/scsiport.rbuild
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/drivers/storage/scsiport/s…
==============================================================================
--- trunk/reactos/drivers/storage/scsiport/scsiport.rbuild (original)
+++ trunk/reactos/drivers/storage/scsiport/scsiport.rbuild Mon Jul 30 17:18:35 2007
@@ -1,4 +1,4 @@
-<module name="scsiport" type="exportdriver"
installbase="system32/drivers" installname="scsiport.sys">
+<module name="scsiport" type="kernelmodedriver"
installbase="system32/drivers" installname="scsiport.sys">
<bootstrap base="$(CDOUTPUT)" />
<define name="__USE_W32API" />
<define name="_SCSIPORT_" />
Modified: trunk/reactos/drivers/video/videoprt/videoprt.rbuild
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/drivers/video/videoprt/vid…
==============================================================================
--- trunk/reactos/drivers/video/videoprt/videoprt.rbuild (original)
+++ trunk/reactos/drivers/video/videoprt/videoprt.rbuild Mon Jul 30 17:18:35 2007
@@ -1,4 +1,4 @@
-<module name="videoprt" type="exportdriver"
installbase="system32/drivers" installname="videoprt.sys">
+<module name="videoprt" type="kernelmodedriver"
installbase="system32/drivers" installname="videoprt.sys">
<importlibrary definition="videoprt.def" />
<include base="videoprt">.</include>
<include base="ntoskrnl">include</include>
Modified: trunk/reactos/drivers/wdm/audio/drm/drmk/drmk.rbuild
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/drivers/wdm/audio/drm/drmk…
==============================================================================
--- trunk/reactos/drivers/wdm/audio/drm/drmk/drmk.rbuild (original)
+++ trunk/reactos/drivers/wdm/audio/drm/drmk/drmk.rbuild Mon Jul 30 17:18:35 2007
@@ -1,4 +1,4 @@
-<module name="drmk" type="exportdriver"
installbase="system32/drivers" installname="drmk.sys"
allowwarnings="true">
+<module name="drmk" type="kernelmodedriver"
installbase="system32/drivers" installname="drmk.sys"
allowwarnings="true">
<include base="drmk">.</include>
<include base="drmk">..</include>
<include base="drmk">../include</include>
Modified: trunk/reactos/drivers/wmi/wmilib.rbuild
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/drivers/wmi/wmilib.rbuild?…
==============================================================================
--- trunk/reactos/drivers/wmi/wmilib.rbuild (original)
+++ trunk/reactos/drivers/wmi/wmilib.rbuild Mon Jul 30 17:18:35 2007
@@ -1,4 +1,4 @@
-<module name="wmilib" type="exportdriver"
installbase="system32/drivers" installname="wmilib.sys">
+<module name="wmilib" type="kernelmodedriver"
installbase="system32/drivers" installname="wmilib.sys">
<importlibrary definition="wmilib.def" />
<include base="wmilib">.</include>
<library>ntoskrnl</library>
Modified: trunk/reactos/subsystems/win32/win32k/win32k.rbuild
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/subsystems/win32/win32k/wi…
==============================================================================
--- trunk/reactos/subsystems/win32/win32k/win32k.rbuild (original)
+++ trunk/reactos/subsystems/win32/win32k/win32k.rbuild Mon Jul 30 17:18:35 2007
@@ -160,7 +160,7 @@
<file>xpstubs.c</file>
</directory>
</module>
-<module name="win32k" type="exportdriver"
installbase="system32" installname="win32k.sys"
allowwarnings="true">
+<module name="win32k" type="kernelmodedriver"
installbase="system32" installname="win32k.sys"
allowwarnings="true">
<importlibrary definition="win32k.def" />
<library>win32k_base</library>
<library>pseh</library>
Modified: trunk/reactos/tools/rbuild/backend/mingw/modulehandler.cpp
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/tools/rbuild/backend/mingw…
==============================================================================
--- trunk/reactos/tools/rbuild/backend/mingw/modulehandler.cpp (original)
+++ trunk/reactos/tools/rbuild/backend/mingw/modulehandler.cpp Mon Jul 30 17:18:35 2007
@@ -226,7 +226,6 @@
handler = new MingwWin32OCXModuleHandler ( module );
break;
case KernelModeDriver:
- case ExportDriver: // maybe change this later
handler = new MingwKernelModeDriverModuleHandler ( module );
break;
case BootLoader:
@@ -1626,7 +1625,19 @@
fprintf ( fMakefile, "\t$(ECHO_LD)\n" );
string targetName ( module.GetTargetName () );
- if ( module.IsDLL () )
+ if ( !module.IsDLL () )
+ {
+ fprintf ( fMakefile,
+ "\t%s %s %s -o %s %s %s %s\n",
+ linker.c_str (),
+ linkerParameters.c_str (),
+ linkerScriptArgument.c_str (),
+ target.c_str (),
+ objectsMacro.c_str (),
+ libsMacro.c_str (),
+ GetLinkerMacro ().c_str () );
+ }
+ else if ( module.HasImportLibrary () )
{
string temp_exp = ros_temp + module.name + ".temp.exp";
CLEAN_FILE ( temp_exp );
@@ -1661,6 +1672,12 @@
}
else
{
+ /* XXX: need to workaround binutils bug, which exports
+ * all functions in a dll if no .def file or an empty
+ * one has been provided... */
+ /* See bug 1244 */
+ //printf ( "%s will have all its functions exported\n",
+ // module.GetTargetName ().c_str () );
fprintf ( fMakefile,
"\t%s %s %s -o %s %s %s %s\n",
linker.c_str (),
@@ -1670,12 +1687,6 @@
objectsMacro.c_str (),
libsMacro.c_str (),
GetLinkerMacro ().c_str () );
-
-#if 0 // causes crashes sometimes
- fprintf ( fMakefile,
- "\t${objcopy} -R .edata %s\n",
- target.c_str () );
-#endif
}
GenerateBuildMapCode ();
Modified: trunk/reactos/tools/rbuild/bootstrap.cpp
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/tools/rbuild/bootstrap.cpp…
==============================================================================
--- trunk/reactos/tools/rbuild/bootstrap.cpp (original)
+++ trunk/reactos/tools/rbuild/bootstrap.cpp Mon Jul 30 17:18:35 2007
@@ -43,7 +43,6 @@
{
case Kernel:
case KernelModeDLL:
- case ExportDriver:
case NativeDLL:
case NativeCUI:
case Win32DLL:
Modified: trunk/reactos/tools/rbuild/module.cpp
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/tools/rbuild/module.cpp?re…
==============================================================================
--- trunk/reactos/tools/rbuild/module.cpp (original)
+++ trunk/reactos/tools/rbuild/module.cpp Mon Jul 30 17:18:35 2007
@@ -805,8 +805,6 @@
return Kernel;
if ( attribute.value == "kernelmodedll" )
return KernelModeDLL;
- if ( attribute.value == "exportdriver" )
- return ExportDriver;
if ( attribute.value == "kernelmodedriver" )
return KernelModeDriver;
if ( attribute.value == "nativedll" )
@@ -881,7 +879,6 @@
return ".ocx";
case KernelModeDriver:
case BootLoader:
- case ExportDriver:
return ".sys";
case BootSector:
return ".o";
@@ -916,7 +913,6 @@
return "NtProcessStartup";
case KernelModeDLL:
case KernelModeDriver:
- case ExportDriver:
return "DriverEntry@8";
case NativeDLL:
return "DllMainCRTStartup@12";
@@ -978,7 +974,6 @@
return "0x00400000";
case KernelModeDLL:
case KernelModeDriver:
- case ExportDriver:
return "0x00010000";
case BuildTool:
case StaticLibrary:
@@ -1014,12 +1009,11 @@
{
case Kernel:
case KernelModeDLL:
- case ExportDriver:
case NativeDLL:
case Win32DLL:
case Win32OCX:
+ case KernelModeDriver:
return true;
- case KernelModeDriver:
case NativeCUI:
case Win32CUI:
case Test:
@@ -1053,7 +1047,6 @@
{
case Kernel:
case KernelModeDLL:
- case ExportDriver:
case NativeDLL:
case Win32DLL:
case Win32OCX:
@@ -1547,11 +1540,10 @@
switch ( type )
{
case Win32DLL:
- case Win32OCX:
+ case Win32OCX:
return true;
case Kernel:
case KernelModeDLL:
- case ExportDriver:
case NativeDLL:
case NativeCUI:
case Win32CUI:
Modified: trunk/reactos/tools/rbuild/rbuild.h
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/tools/rbuild/rbuild.h?rev=…
==============================================================================
--- trunk/reactos/tools/rbuild/rbuild.h (original)
+++ trunk/reactos/tools/rbuild/rbuild.h Mon Jul 30 17:18:35 2007
@@ -270,7 +270,6 @@
Alias = 19,
BootProgram = 20,
Win32SCR = 21,
- ExportDriver = 22,
IdlHeader = 23,
IsoRegTest = 24,
LiveIsoRegTest = 25,
@@ -322,7 +321,7 @@
bool allowWarnings;
bool enabled;
bool useHostStdlib;
- bool isStartupLib;
+ bool isStartupLib;
Module ( const Project& project,
const XMLElement& moduleNode,
@@ -346,7 +345,7 @@
void InvokeModule () const;
void ProcessXML ();
void GetSourceFilenames ( string_list& list,
- bool includeGeneratedFiles ) const;
+ bool includeGeneratedFiles ) const;
private:
std::string GetDefaultModuleExtension () const;
std::string GetDefaultModuleEntrypoint () const;