Export functions in .def files

svn path=/branches/xmlbuildsystem/; revision=13080
This commit is contained in:
Casper Hornstrup
2005-01-16 16:18:52 +00:00
parent fd7f52294b
commit 772c512c90
8 changed files with 79 additions and 75 deletions
-7
View File
@@ -1,7 +0,0 @@
; Ancillary Function Driver - ReactOS Operating System
LIBRARY AFDTEST.SYS
EXPORTS
; EOF
-1
View File
@@ -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" />
+3 -3
View File
@@ -178,7 +178,7 @@ EnterCriticalSection@4=NTDLL.RtlEnterCriticalSection
EnumCalendarInfoA@16
EnumCalendarInfoExA@16
EnumCalendarInfoExW@16
EnumCalendarInfoW@16
;EnumCalendarInfoW@16
EnumDateFormatsA@12
EnumDateFormatsExA@12
EnumDateFormatsExW@12
@@ -657,7 +657,7 @@ OpenJobObjectW@12
OpenMutexA@12
OpenMutexW@12
OpenProcess@12
OpenProfileUserMapping@0
;OpenProfileUserMapping@0
OpenSemaphoreA@12
OpenSemaphoreW@12
OpenThread@12
@@ -689,7 +689,7 @@ QueryPerformanceCounter@4
QueryPerformanceFrequency@4
QueueUserAPC@12
QueueUserWorkItem@12
QueryWin31IniFilesMappedToRegistry@16
;QueryWin31IniFilesMappedToRegistry@16
RaiseException@16
ReadConsoleA@20
ReadConsoleInputA@16
+3
View File
@@ -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>
+1
View File
@@ -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>
-17
View File
@@ -247,23 +247,6 @@ RtlpDispatchException(IN PEXCEPTION_RECORD ExceptionRecord,
return ExceptionContinueExecution;
}
/*
* @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
*/
@@ -532,21 +532,60 @@ MingwModuleHandler::GenerateCommand ( const Module& module,
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 @@ MingwKernelModeDLLModuleHandler::GenerateKernelModeDLLModuleTarget ( const Modul
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 @@ MingwKernelModeDriverModuleHandler::GenerateKernelModeDriverModuleTarget ( const
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 @@ MingwNativeDLLModuleHandler::GenerateNativeDLLModuleTarget ( const Module& modul
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 @@ MingwNativeDLLModuleHandler::GenerateNativeDLLModuleTarget ( const Module& modul
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 @@ MingwWin32DLLModuleHandler::GenerateWin32DLLModuleTarget ( const Module& module
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 @@ MingwWin32GUIModuleHandler::GenerateWin32GUIModuleTarget ( const Module& module
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
{
@@ -41,10 +41,10 @@ protected:
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: