- Don't try to load referenced dlls in any other dir than system32. A second attempt would fail on the first dll that was already loaded and the function would bail out before any missing dll could be loaded. This worked only by chance on gcc builds, because the 1st import was bootvid, which was always loaded in the 2nd attempt from system32, and the function failed after that, since hal and kdcom were already loaded.

svn path=/trunk/; revision=52452
This commit is contained in:
Timo Kreuzer 2011-06-25 13:52:47 +00:00
parent de4cc449db
commit 6d9cf47ce2
2 changed files with 7 additions and 12 deletions

View file

@ -148,7 +148,7 @@ MempSetupPaging(IN ULONG StartPage,
ULONG Entry, Page;
//Print(L"MempSetupPaging: SP 0x%X, Number: 0x%X\n", StartPage, NumberOfPages);
// HACK
if (StartPage+NumberOfPages >= 0x80000)
{
@ -487,13 +487,13 @@ WinLdrSetProcessorContext(PVOID GdtIdt, IN ULONG Pcr, IN ULONG Tss)
"1:\n");
#elif defined(_MSC_VER)
/* We can't express the above in MASM so we use this far return instead */
DbgPrint("WinLdrSetProcessorContext: Performing untested far-return\n");
__asm {
__asm
{
push 8
push offset resume
retf
resume:
};
};
#else
#error
#endif

View file

@ -123,7 +123,7 @@ SetupLdrScanBootDrivers(PLOADER_PARAMETER_BLOCK LoaderBlock, HINF InfHandle, LPC
do
{
if (InfGetDataField(&InfContext, 7, &Media) &&
InfGetDataField(&InfContext, 0, &DriverName) &&
InfGetDataField(&InfContext, 0, &DriverName) &&
InfGetDataField(&InfContext, 13, &dirIndex))
{
if ((strcmp(Media, "x") == 0) &&
@ -137,7 +137,7 @@ SetupLdrScanBootDrivers(PLOADER_PARAMETER_BLOCK LoaderBlock, HINF InfHandle, LPC
swprintf(ImagePathW, L"%S", ImagePath);
wcscat(ImagePathW, L"\\");
wcscat(ImagePathW, ServiceName);
/* Remove .sys extension */
ServiceName[wcslen(ServiceName) - 4] = 0;
@ -310,12 +310,7 @@ VOID LoadReactOSSetup2(VOID)
/* Load all referenced DLLs for kernel, HAL and kdcom.dll */
strcpy(SearchPath, BootPath);
WinLdrScanImportDescriptorTable(LoaderBlock, SearchPath, KernelDTE);
WinLdrScanImportDescriptorTable(LoaderBlock, SearchPath, HalDTE);
if (KdComDTE)
WinLdrScanImportDescriptorTable(LoaderBlock, SearchPath, KdComDTE);
/* In system32 too */
strcpy(SearchPath + strlen(BootPath), "system32\\");
strcat(SearchPath, "system32\\");
WinLdrScanImportDescriptorTable(LoaderBlock, SearchPath, KernelDTE);
WinLdrScanImportDescriptorTable(LoaderBlock, SearchPath, HalDTE);
if (KdComDTE)