Export functions in .def files
Deleted: branches/xmlbuildsystem/reactos/drivers/net/afd/afd.def
Modified: branches/xmlbuildsystem/reactos/drivers/net/afd/afd.xml
Modified: branches/xmlbuildsystem/reactos/lib/kernel32/kernel32.def
Modified: branches/xmlbuildsystem/reactos/lib/kernel32/kernel32.xml
Modified: branches/xmlbuildsystem/reactos/lib/ntdll/ntdll.xml
Modified: branches/xmlbuildsystem/reactos/lib/ntdll/rtl/i386/exception.c
Modified:
branches/xmlbuildsystem/reactos/tools/rbuild/backend/mingw/modulehandler
.cpp
Modified:
branches/xmlbuildsystem/reactos/tools/rbuild/backend/mingw/modulehandler
.h
_____
Deleted: branches/xmlbuildsystem/reactos/drivers/net/afd/afd.def
--- branches/xmlbuildsystem/reactos/drivers/net/afd/afd.def
2005-01-16 14:23:35 UTC (rev 13079)
+++ branches/xmlbuildsystem/reactos/drivers/net/afd/afd.def
2005-01-16 16:18:52 UTC (rev 13080)
@@ -1,7 +0,0 @@
-; Ancillary Function Driver - ReactOS Operating System
-
-LIBRARY AFDTEST.SYS
-
-EXPORTS
-
-; EOF
_____
Modified: branches/xmlbuildsystem/reactos/drivers/net/afd/afd.xml
--- branches/xmlbuildsystem/reactos/drivers/net/afd/afd.xml
2005-01-16 14:23:35 UTC (rev 13079)
+++ branches/xmlbuildsystem/reactos/drivers/net/afd/afd.xml
2005-01-16 16:18:52 UTC (rev 13080)
@@ -1,5 +1,4 @@
<module name="afd" type="kernelmodedriver">
- <importlibrary definition="afd.def" />
<include base="afd">include</include>
<include base="ReactOS">include/afd</include>
<define name="__USE_W32API" />
_____
Modified: branches/xmlbuildsystem/reactos/lib/kernel32/kernel32.def
--- branches/xmlbuildsystem/reactos/lib/kernel32/kernel32.def
2005-01-16 14:23:35 UTC (rev 13079)
+++ branches/xmlbuildsystem/reactos/lib/kernel32/kernel32.def
2005-01-16 16:18:52 UTC (rev 13080)
@@ -178,7 +178,7 @@
EnumCalendarInfoA@16
EnumCalendarInfoExA@16
EnumCalendarInfoExW@16
-EnumCalendarInfoW@16
+;EnumCalendarInfoW@16
EnumDateFormatsA@12
EnumDateFormatsExA@12
EnumDateFormatsExW@12
@@ -657,7 +657,7 @@
OpenMutexA@12
OpenMutexW@12
OpenProcess@12
-OpenProfileUserMapping@0
+;OpenProfileUserMapping@0
OpenSemaphoreA@12
OpenSemaphoreW@12
OpenThread@12
@@ -689,7 +689,7 @@
QueryPerformanceFrequency@4
QueueUserAPC@12
QueueUserWorkItem@12
-QueryWin31IniFilesMappedToRegistry@16
+;QueryWin31IniFilesMappedToRegistry@16
RaiseException@16
ReadConsoleA@20
ReadConsoleInputA@16
_____
Modified: branches/xmlbuildsystem/reactos/lib/kernel32/kernel32.xml
--- branches/xmlbuildsystem/reactos/lib/kernel32/kernel32.xml
2005-01-16 14:23:35 UTC (rev 13079)
+++ branches/xmlbuildsystem/reactos/lib/kernel32/kernel32.xml
2005-01-16 16:18:52 UTC (rev 13080)
@@ -9,6 +9,9 @@
<library>pseh</library>
<library>rosrtl</library>
<library>ntdll</library>
+ <linkerflag>-lgcc</linkerflag>
+ <linkerflag>-nostartfiles</linkerflag>
+ <linkerflag>-nostdlib</linkerflag>
<invoke module="wmc">
<input>
<inputfile>kernel32.mc</inputfile>
_____
Modified: branches/xmlbuildsystem/reactos/lib/ntdll/ntdll.xml
--- branches/xmlbuildsystem/reactos/lib/ntdll/ntdll.xml 2005-01-16
14:23:35 UTC (rev 13079)
+++ branches/xmlbuildsystem/reactos/lib/ntdll/ntdll.xml 2005-01-16
16:18:52 UTC (rev 13080)
@@ -6,6 +6,7 @@
<library>rosrtl</library>
<library>rtl</library>
<library>string</library>
+ <linkerflag>-lgcc</linkerflag>
<directory name="csr">
<file>capture.c</file>
<file>lpc.c</file>
_____
Modified: branches/xmlbuildsystem/reactos/lib/ntdll/rtl/i386/exception.c
--- branches/xmlbuildsystem/reactos/lib/ntdll/rtl/i386/exception.c
2005-01-16 14:23:35 UTC (rev 13079)
+++ branches/xmlbuildsystem/reactos/lib/ntdll/rtl/i386/exception.c
2005-01-16 16:18:52 UTC (rev 13080)
@@ -251,23 +251,6 @@
* @implemented
*/
VOID STDCALL
-RtlRaiseStatus(NTSTATUS Status)
-{
- EXCEPTION_RECORD ExceptionRecord;
-
- DPRINT("RtlRaiseStatus(Status 0x%.08x)\n", Status);
-
- ExceptionRecord.ExceptionCode = Status;
- ExceptionRecord.ExceptionRecord = NULL;
- ExceptionRecord.NumberParameters = 0;
- ExceptionRecord.ExceptionFlags = EXCEPTION_NONCONTINUABLE;
- RtlRaiseException (& ExceptionRecord);
-}
-
-/*
- * @implemented
- */
-VOID STDCALL
RtlUnwind(PEXCEPTION_REGISTRATION RegistrationFrame,
PVOID ReturnAddress,
PEXCEPTION_RECORD ExceptionRecord,
_____
Modified:
branches/xmlbuildsystem/reactos/tools/rbuild/backend/mingw/modulehandler
.cpp
---
branches/xmlbuildsystem/reactos/tools/rbuild/backend/mingw/modulehandler
.cpp 2005-01-16 14:23:35 UTC (rev 13079)
+++
branches/xmlbuildsystem/reactos/tools/rbuild/backend/mingw/modulehandler
.cpp 2005-01-16 16:18:52 UTC (rev 13080)
@@ -532,21 +532,60 @@
sourceFilename.c_str () );
}
-string
+void
MingwModuleHandler::GenerateLinkerCommand ( const Module& module,
const string& linker,
const string&
linkerParameters,
const string&
objectFilenames ) const
{
+ string targetName ( module.GetTargetName () );
string target ( FixupTargetFilename ( module.GetPath () ) );
string importLibraryDependencies = GetImportLibraryDependencies
( module );
- return ssprintf ( "%s %s -o %s %s %s %s\n",
- linker.c_str (),
- linkerParameters.c_str (),
- target.c_str (),
- objectFilenames.c_str (),
- importLibraryDependencies.c_str (),
- GetLinkerMacro ( module ).c_str () );
+ if ( module.importLibrary != NULL )
+ {
+ static string ros_junk ( "$(ROS_TEMPORARY)" );
+ string base_tmp = ros_junk + module.name + ".base.tmp";
+ string junk_tmp = ros_junk + module.name + ".junk.tmp";
+ string temp_exp = ros_junk + module.name + ".temp.exp";
+
+ fprintf ( fMakefile,
+ "\t%s %s -Wl,--base-file,%s -o %s %s %s %s\n",
+ linker.c_str (),
+ linkerParameters.c_str (),
+ base_tmp.c_str (),
+ junk_tmp.c_str (),
+ objectFilenames.c_str (),
+ importLibraryDependencies.c_str (),
+ GetLinkerMacro ( module ).c_str () );
+
+ fprintf ( fMakefile,
+ "\t${dlltool} --dllname %s --base-file %s --def %s
--output-exp %s --kill-at\n",
+ targetName.c_str (),
+ base_tmp.c_str (),
+ FixupTargetFilename ( module.GetBasePath () +
SSEP + module.importLibrary->definition ).c_str (),
+ temp_exp.c_str () );
+
+ fprintf ( fMakefile,
+ "\t%s %s %s -o %s %s %s %s\n\n",
+ linker.c_str (),
+ linkerParameters.c_str (),
+ temp_exp.c_str (),
+ target.c_str (),
+ objectFilenames.c_str (),
+ importLibraryDependencies.c_str (),
+ GetLinkerMacro ( module ).c_str () );
+ }
+ else
+ {
+ fprintf ( fMakefile,
+ "\t%s %s -o %s %s %s %s\n\n",
+ linker.c_str (),
+ linkerParameters.c_str (),
+ target.c_str (),
+ objectFilenames.c_str (),
+ importLibraryDependencies.c_str (),
+ GetLinkerMacro ( module ).c_str () );
+ }
}
void
@@ -1060,13 +1099,10 @@
importLibraryDependencies.c_str () );
string linkerParameters ( "-Wl,--subsystem,native
-Wl,--entry,_DriverEntry@8 -Wl,--image-base,0x10000
-Wl,--file-alignment,0x1000 -Wl,--section-alignment,0x1000 -nostartfiles
-mdll" );
- string linkerCommand = GenerateLinkerCommand ( module,
- "${gcc}",
-
linkerParameters,
- archiveFilename
);
- fprintf ( fMakefile,
- "\t%s\n\n",
- linkerCommand.c_str () );
+ GenerateLinkerCommand ( module,
+ "${gcc}",
+ linkerParameters,
+ archiveFilename );
}
else
{
@@ -1117,13 +1153,10 @@
importLibraryDependencies.c_str () );
string linkerParameters ( "-Wl,--subsystem,native
-Wl,--entry,_DriverEntry@8 -Wl,--image-base,0x10000
-Wl,--file-alignment,0x1000 -Wl,--section-alignment,0x1000 -nostartfiles
-mdll" );
- string linkerCommand = GenerateLinkerCommand ( module,
- "${gcc}",
-
linkerParameters,
- archiveFilename
);
- fprintf ( fMakefile,
- "\t%s\n\n",
- linkerCommand.c_str () );
+ GenerateLinkerCommand ( module,
+ "${gcc}",
+ linkerParameters,
+ archiveFilename );
}
else
{
@@ -1156,6 +1189,7 @@
static string ros_junk ( "$(ROS_TEMPORARY)" );
string target ( FixupTargetFilename ( module.GetPath () ) );
string workingDirectory = GetWorkingDirectory ( );
+ string objectFilenames = GetObjectFilenames ( module );
string archiveFilename = GetModuleArchiveFilename ( module );
string importLibraryDependencies = GetImportLibraryDependencies
( module );
@@ -1171,13 +1205,10 @@
importLibraryDependencies.c_str () );
string linkerParameters ( "-Wl,--subsystem,native
-Wl,--entry,_DllMainCRTStartup@12 -Wl,--image-base,0x10000
-Wl,--file-alignment,0x1000 -Wl,--section-alignment,0x1000 -nostartfiles
-nostdlib -mdll" );
- string linkerCommand = GenerateLinkerCommand ( module,
- "${gcc}",
-
linkerParameters,
- archiveFilename
);
- fprintf ( fMakefile,
- "\t%s\n\n",
- linkerCommand.c_str () );
+ GenerateLinkerCommand ( module,
+ "${gcc}",
+ linkerParameters,
+ objectFilenames );
}
else
{
@@ -1225,13 +1256,10 @@
importLibraryDependencies.c_str () );
string linkerParameters ( "-Wl,--subsystem,console
-Wl,--entry,_DllMain@12 -Wl,--image-base,0x10000
-Wl,--file-alignment,0x1000 -Wl,--section-alignment,0x1000 -mdll" );
- string linkerCommand = GenerateLinkerCommand ( module,
- "${gcc}",
-
linkerParameters,
- archiveFilename
);
- fprintf ( fMakefile,
- "\t%s\n\n",
- linkerCommand.c_str () );
+ GenerateLinkerCommand ( module,
+ "${gcc}",
+ linkerParameters,
+ archiveFilename );
}
else
{
@@ -1279,13 +1307,10 @@
importLibraryDependencies.c_str () );
string linkerParameters ( "-Wl,--subsystem,windows
-Wl,--entry,_WinMainCRTStartup -Wl,--image-base,0x00400000
-Wl,--file-alignment,0x1000 -Wl,--section-alignment,0x1000" );
- string linkerCommand = GenerateLinkerCommand ( module,
- "${gcc}",
-
linkerParameters,
- objectFilenames
);
- fprintf ( fMakefile,
- "\t%s\n\n",
- linkerCommand.c_str () );
+ GenerateLinkerCommand ( module,
+ "${gcc}",
+ linkerParameters,
+ objectFilenames );
}
else
{
_____
Modified:
branches/xmlbuildsystem/reactos/tools/rbuild/backend/mingw/modulehandler
.h
---
branches/xmlbuildsystem/reactos/tools/rbuild/backend/mingw/modulehandler
.h 2005-01-16 14:23:35 UTC (rev 13079)
+++
branches/xmlbuildsystem/reactos/tools/rbuild/backend/mingw/modulehandler
.h 2005-01-16 16:18:52 UTC (rev 13080)
@@ -41,10 +41,10 @@
std::string GetCFlagsMacro ( const Module& module ) const;
std::string GetObjectsMacro ( const Module& module ) const;
std::string GetLinkerMacro ( const Module& module ) const;
- std::string GenerateLinkerCommand ( const Module& module,
- const std::string& linker,
- const std::string&
linkerParameters,
- const std::string&
objectFilenames ) const;
+ void GenerateLinkerCommand ( const Module& module,
+ const std::string& linker,
+ const std::string&
linkerParameters,
+ const std::string& objectFilenames
) const;
void GenerateImportLibraryTargetIfNeeded ( const Module& module
) const;
static FILE* fMakefile;
private: