Fix the problems introduced in r16449 by changing "-mdll --dll" to "-shared" and letting the linker generate the relocations in all cases.

svn path=/trunk/; revision=16478
This commit is contained in:
Filip Navara 2005-07-07 08:57:03 +00:00
parent d1c9fb08f5
commit 8407954c54

View file

@ -647,7 +647,7 @@ MingwModuleHandler::GenerateMacro (
if ( use_pch && module.pch != NULL )
{
fprintf ( fMakefile,
" -I %s",
" -I%s",
GetDirectory ( GetPrecompiledHeaderFilename () ).c_str () );
}
@ -2086,7 +2086,7 @@ MingwKernelModuleHandler::GenerateKernelModuleTarget ()
string dependencies = linkDepsMacro + " " + objectsMacro;
string linkerParameters = ssprintf ( "-Wl,-T,%s" SSEP "ntoskrnl.lnk -Wl,--subsystem,native -Wl,--entry,%s -Wl,--image-base,%s -Wl,--file-alignment,0x1000 -Wl,--section-alignment,0x1000 -nostartfiles -mdll --dll",
string linkerParameters = ssprintf ( "-Wl,-T,%s" SSEP "ntoskrnl.lnk -Wl,--subsystem,native -Wl,--entry,%s -Wl,--image-base,%s -Wl,--file-alignment,0x1000 -Wl,--section-alignment,0x1000 -nostartfiles -shared",
module.GetBasePath ().c_str (),
module.entrypoint.c_str (),
module.baseaddress.c_str () );
@ -2173,7 +2173,7 @@ MingwKernelModeDLLModuleHandler::GenerateKernelModeDLLModuleTarget ()
string dependencies = linkDepsMacro + " " + objectsMacro;
string linkerParameters = ssprintf ( "-Wl,--subsystem,native -Wl,--entry,%s -Wl,--image-base,%s -Wl,--file-alignment,0x1000 -Wl,--section-alignment,0x1000 -nostartfiles -mdll --dll",
string linkerParameters = ssprintf ( "-Wl,--subsystem,native -Wl,--entry,%s -Wl,--image-base,%s -Wl,--file-alignment,0x1000 -Wl,--section-alignment,0x1000 -nostartfiles -shared",
module.entrypoint.c_str (),
module.baseaddress.c_str () );
GenerateLinkerCommand ( dependencies,
@ -2220,7 +2220,7 @@ MingwKernelModeDriverModuleHandler::GenerateKernelModeDriverModuleTarget ()
string dependencies = linkDepsMacro + " " + objectsMacro;
string linkerParameters = ssprintf ( "-Wl,--subsystem,native -Wl,--entry,%s -Wl,--image-base,%s -Wl,--file-alignment,0x1000 -Wl,--section-alignment,0x1000 -nostartfiles -mdll --dll",
string linkerParameters = ssprintf ( "-Wl,--subsystem,native -Wl,--entry,%s -Wl,--image-base,%s -Wl,--file-alignment,0x1000 -Wl,--section-alignment,0x1000 -nostartfiles -shared",
module.entrypoint.c_str (),
module.baseaddress.c_str () );
GenerateLinkerCommand ( dependencies,
@ -2266,7 +2266,7 @@ MingwNativeDLLModuleHandler::GenerateNativeDLLModuleTarget ()
string dependencies = linkDepsMacro + " " + objectsMacro;
string linkerParameters = ssprintf ( "-Wl,--subsystem,native -Wl,--entry,%s -Wl,--image-base,%s -Wl,--file-alignment,0x1000 -Wl,--section-alignment,0x1000 -nostartfiles -nostdlib -mdll --dll",
string linkerParameters = ssprintf ( "-Wl,--subsystem,native -Wl,--entry,%s -Wl,--image-base,%s -Wl,--file-alignment,0x1000 -Wl,--section-alignment,0x1000 -nostartfiles -nostdlib -shared",
module.entrypoint.c_str (),
module.baseaddress.c_str () );
GenerateLinkerCommand ( dependencies,
@ -2364,7 +2364,7 @@ MingwWin32DLLModuleHandler::GenerateWin32DLLModuleTarget ()
else
linker = "${gcc}";
string linkerParameters = ssprintf ( "-Wl,--subsystem,console -Wl,--entry,%s -Wl,--image-base,%s -Wl,--file-alignment,0x1000 -Wl,--section-alignment,0x1000 -mdll --dll",
string linkerParameters = ssprintf ( "-Wl,--subsystem,console -Wl,--entry,%s -Wl,--image-base,%s -Wl,--file-alignment,0x1000 -Wl,--section-alignment,0x1000 -shared",
module.entrypoint.c_str (),
module.baseaddress.c_str () );
GenerateLinkerCommand ( dependencies,