mirror of
https://github.com/reactos/reactos.git
synced 2025-02-23 08:55:19 +00:00
Additional bug fixes
Removed spec file Removed libgcc.a Set FS register in thread contexts svn path=/trunk/; revision=1393
This commit is contained in:
parent
8d1034c5fa
commit
8a74f96a65
13 changed files with 26 additions and 102 deletions
|
@ -1,4 +1,4 @@
|
||||||
/* $Id: rtl.h,v 1.42 2000/10/08 12:42:24 ekohl Exp $
|
/* $Id: rtl.h,v 1.43 2000/10/08 16:32:51 dwelch Exp $
|
||||||
*
|
*
|
||||||
*/
|
*/
|
||||||
|
|
||||||
|
@ -283,8 +283,6 @@ extern BOOLEAN NLS_MB_OEM_CODE_PAGE_TAG;
|
||||||
#define InsertTailList(ListHead, ListEntry) \
|
#define InsertTailList(ListHead, ListEntry) \
|
||||||
{ \
|
{ \
|
||||||
PLIST_ENTRY OldBlink; \
|
PLIST_ENTRY OldBlink; \
|
||||||
assert((ListEntry)->Blink == NULL); \
|
|
||||||
assert((ListEntry)->Flink == NULL); \
|
|
||||||
OldBlink = (ListHead)->Blink; \
|
OldBlink = (ListHead)->Blink; \
|
||||||
(ListEntry)->Flink = (ListHead); \
|
(ListEntry)->Flink = (ListHead); \
|
||||||
(ListEntry)->Blink = OldBlink; \
|
(ListEntry)->Blink = OldBlink; \
|
||||||
|
|
|
@ -1,4 +1,4 @@
|
||||||
# $Id: makefile,v 1.39 2000/10/07 13:41:47 dwelch Exp $
|
# $Id: makefile,v 1.40 2000/10/08 16:32:51 dwelch Exp $
|
||||||
#
|
#
|
||||||
# ReactOS Operating System
|
# ReactOS Operating System
|
||||||
#
|
#
|
||||||
|
@ -177,6 +177,7 @@ $(TARGET).dll: $(DLLMAIN) $(OBJECTS) $(TARGET).def
|
||||||
-mdll \
|
-mdll \
|
||||||
-o junk.tmp \
|
-o junk.tmp \
|
||||||
-Wl,--base-file,base.tmp \
|
-Wl,--base-file,base.tmp \
|
||||||
|
-Wl,--entry=_DllMain@12 \
|
||||||
$(TARGET).o \
|
$(TARGET).o \
|
||||||
../kernel32/kernel32.a -lgcc
|
../kernel32/kernel32.a -lgcc
|
||||||
- $(RM) junk.tmp
|
- $(RM) junk.tmp
|
||||||
|
@ -195,7 +196,8 @@ $(TARGET).dll: $(DLLMAIN) $(OBJECTS) $(TARGET).def
|
||||||
-Wl,--image-base,0x77630000 \
|
-Wl,--image-base,0x77630000 \
|
||||||
-Wl,--file-alignment,0x1000 \
|
-Wl,--file-alignment,0x1000 \
|
||||||
-Wl,--section-alignment,0x1000 \
|
-Wl,--section-alignment,0x1000 \
|
||||||
-Wl,temp.exp
|
-Wl,temp.exp \
|
||||||
|
-Wl,--entry=_DllMain@12
|
||||||
- $(RM) temp.exp
|
- $(RM) temp.exp
|
||||||
$(NM) --numeric-sort $(TARGET).dll > $(TARGET).sym
|
$(NM) --numeric-sort $(TARGET).dll > $(TARGET).sym
|
||||||
|
|
||||||
|
|
|
@ -1,4 +1,4 @@
|
||||||
/* $Id: thread.c,v 1.20 2000/09/05 23:01:07 ekohl Exp $
|
/* $Id: thread.c,v 1.21 2000/10/08 16:32:52 dwelch Exp $
|
||||||
*
|
*
|
||||||
* COPYRIGHT: See COPYING in the top level directory
|
* COPYRIGHT: See COPYING in the top level directory
|
||||||
* PROJECT: ReactOS system libraries
|
* PROJECT: ReactOS system libraries
|
||||||
|
@ -163,7 +163,7 @@ HANDLE STDCALL CreateRemoteThread(HANDLE hProcess,
|
||||||
memset(&ThreadContext,0,sizeof(CONTEXT));
|
memset(&ThreadContext,0,sizeof(CONTEXT));
|
||||||
ThreadContext.Eip = (LONG)ThreadStartup;
|
ThreadContext.Eip = (LONG)ThreadStartup;
|
||||||
ThreadContext.SegGs = USER_DS;
|
ThreadContext.SegGs = USER_DS;
|
||||||
ThreadContext.SegFs = USER_DS;
|
ThreadContext.SegFs = TEB_SELECTOR;
|
||||||
ThreadContext.SegEs = USER_DS;
|
ThreadContext.SegEs = USER_DS;
|
||||||
ThreadContext.SegDs = USER_DS;
|
ThreadContext.SegDs = USER_DS;
|
||||||
ThreadContext.SegCs = USER_CS;
|
ThreadContext.SegCs = USER_CS;
|
||||||
|
|
|
@ -1,4 +1,4 @@
|
||||||
/* $Id: startup.c,v 1.31 2000/09/05 11:01:02 ekohl Exp $
|
/* $Id: startup.c,v 1.32 2000/10/08 16:32:52 dwelch Exp $
|
||||||
*
|
*
|
||||||
* COPYRIGHT: See COPYING in the top level directory
|
* COPYRIGHT: See COPYING in the top level directory
|
||||||
* PROJECT: ReactOS kernel
|
* PROJECT: ReactOS kernel
|
||||||
|
@ -148,6 +148,7 @@ LdrInitializeThunk (ULONG Unknown1,
|
||||||
DbgPrint("Failed to create loader module entry (NTDLL)\n");
|
DbgPrint("Failed to create loader module entry (NTDLL)\n");
|
||||||
ZwTerminateProcess(NtCurrentProcess(),STATUS_UNSUCCESSFUL);
|
ZwTerminateProcess(NtCurrentProcess(),STATUS_UNSUCCESSFUL);
|
||||||
}
|
}
|
||||||
|
memset(NtModule, 0, sizeof(LDR_MODULE));
|
||||||
|
|
||||||
NtModule->BaseAddress = (PVOID)&_image_base__;
|
NtModule->BaseAddress = (PVOID)&_image_base__;
|
||||||
NtModule->EntryPoint = 0; /* no entry point */
|
NtModule->EntryPoint = 0; /* no entry point */
|
||||||
|
|
|
@ -1,4 +1,4 @@
|
||||||
/* $Id: process.c,v 1.20 2000/08/05 18:01:52 dwelch Exp $
|
/* $Id: process.c,v 1.21 2000/10/08 16:32:52 dwelch Exp $
|
||||||
*
|
*
|
||||||
* COPYRIGHT: See COPYING in the top level directory
|
* COPYRIGHT: See COPYING in the top level directory
|
||||||
* PROJECT: ReactOS system libraries
|
* PROJECT: ReactOS system libraries
|
||||||
|
@ -68,7 +68,7 @@ HANDLE STDCALL KlCreateFirstThread(HANDLE ProcessHandle,
|
||||||
memset(&ThreadContext,0,sizeof(CONTEXT));
|
memset(&ThreadContext,0,sizeof(CONTEXT));
|
||||||
ThreadContext.Eip = (ULONG)lpStartAddress;
|
ThreadContext.Eip = (ULONG)lpStartAddress;
|
||||||
ThreadContext.SegGs = USER_DS;
|
ThreadContext.SegGs = USER_DS;
|
||||||
ThreadContext.SegFs = USER_DS;
|
ThreadContext.SegFs = TEB_SELECTOR;
|
||||||
ThreadContext.SegEs = USER_DS;
|
ThreadContext.SegEs = USER_DS;
|
||||||
ThreadContext.SegDs = USER_DS;
|
ThreadContext.SegDs = USER_DS;
|
||||||
ThreadContext.SegCs = USER_CS;
|
ThreadContext.SegCs = USER_CS;
|
||||||
|
|
|
@ -209,7 +209,7 @@ RtlInitializeContext(HANDLE ProcessHandle,
|
||||||
|
|
||||||
Context->Eip = (LONG)StartAddress;
|
Context->Eip = (LONG)StartAddress;
|
||||||
Context->SegGs = USER_DS;
|
Context->SegGs = USER_DS;
|
||||||
Context->SegFs = USER_DS;
|
Context->SegFs = TEB_SELECTOR;
|
||||||
Context->SegEs = USER_DS;
|
Context->SegEs = USER_DS;
|
||||||
Context->SegDs = USER_DS;
|
Context->SegDs = USER_DS;
|
||||||
Context->SegCs = USER_CS;
|
Context->SegCs = USER_CS;
|
||||||
|
|
|
@ -15,6 +15,7 @@
|
||||||
"pusha\n\t" \
|
"pusha\n\t" \
|
||||||
"pushl %ds\n\t" \
|
"pushl %ds\n\t" \
|
||||||
"pushl %es\n\t" \
|
"pushl %es\n\t" \
|
||||||
|
"pushl %fs\n\t" \
|
||||||
"movl $0xceafbeef,%eax\n\t" \
|
"movl $0xceafbeef,%eax\n\t" \
|
||||||
"pushl %eax\n\t" \
|
"pushl %eax\n\t" \
|
||||||
"movw $"STR(KERNEL_DS)",%ax\n\t" \
|
"movw $"STR(KERNEL_DS)",%ax\n\t" \
|
||||||
|
@ -27,6 +28,7 @@
|
||||||
"call _KiInterruptDispatch\n\t"\
|
"call _KiInterruptDispatch\n\t"\
|
||||||
"popl %eax\n\t" \
|
"popl %eax\n\t" \
|
||||||
"popl %eax\n\t" \
|
"popl %eax\n\t" \
|
||||||
|
"popl %fs\n\t" \
|
||||||
"popl %es\n\t" \
|
"popl %es\n\t" \
|
||||||
"popl %ds\n\t" \
|
"popl %ds\n\t" \
|
||||||
"popa\n\t" \
|
"popa\n\t" \
|
||||||
|
@ -38,6 +40,7 @@
|
||||||
"pusha\n\t" \
|
"pusha\n\t" \
|
||||||
"pushl %ds\n\t" \
|
"pushl %ds\n\t" \
|
||||||
"pushl %es\n\t" \
|
"pushl %es\n\t" \
|
||||||
|
"pushl %fs\n\t" \
|
||||||
"movl $0xceafbeef,%eax\n\t" \
|
"movl $0xceafbeef,%eax\n\t" \
|
||||||
"pushl %eax\n\t" \
|
"pushl %eax\n\t" \
|
||||||
"movw $"STR(KERNEL_DS)",%ax\n\t" \
|
"movw $"STR(KERNEL_DS)",%ax\n\t" \
|
||||||
|
@ -50,6 +53,7 @@
|
||||||
"call _KiInterruptDispatch\n\t"\
|
"call _KiInterruptDispatch\n\t"\
|
||||||
"popl %eax\n\t" \
|
"popl %eax\n\t" \
|
||||||
"popl %eax\n\t" \
|
"popl %eax\n\t" \
|
||||||
|
"popl %fs\n\t" \
|
||||||
"popl %es\n\t" \
|
"popl %es\n\t" \
|
||||||
"popl %ds\n\t" \
|
"popl %ds\n\t" \
|
||||||
"popa\n\t" \
|
"popa\n\t" \
|
||||||
|
|
|
@ -203,7 +203,7 @@ NTSTATUS LdrLoadInitialProcess (VOID)
|
||||||
Context.Eip = (ULONG)LdrStartupAddr;
|
Context.Eip = (ULONG)LdrStartupAddr;
|
||||||
Context.SegDs = USER_DS;
|
Context.SegDs = USER_DS;
|
||||||
Context.SegEs = USER_DS;
|
Context.SegEs = USER_DS;
|
||||||
Context.SegFs = USER_DS;
|
Context.SegFs = TEB_SELECTOR;
|
||||||
Context.SegGs = USER_DS;
|
Context.SegGs = USER_DS;
|
||||||
|
|
||||||
DPRINT("LdrStartupAddr %x\n",LdrStartupAddr);
|
DPRINT("LdrStartupAddr %x\n",LdrStartupAddr);
|
||||||
|
|
|
@ -1,4 +1,4 @@
|
||||||
/* $Id: loader.c,v 1.63 2000/10/07 13:41:52 dwelch Exp $
|
/* $Id: loader.c,v 1.64 2000/10/08 16:32:53 dwelch Exp $
|
||||||
*
|
*
|
||||||
* COPYRIGHT: See COPYING in the top level directory
|
* COPYRIGHT: See COPYING in the top level directory
|
||||||
* PROJECT: ReactOS kernel
|
* PROJECT: ReactOS kernel
|
||||||
|
@ -115,7 +115,7 @@ VOID LdrInitModuleManagement(VOID)
|
||||||
NULL,
|
NULL,
|
||||||
NULL);
|
NULL);
|
||||||
DPRINT("Create dir: %wZ\n", &ModuleName);
|
DPRINT("Create dir: %wZ\n", &ModuleName);
|
||||||
Status = ZwCreateDirectoryObject(&DirHandle, 0, &ObjectAttributes);
|
Status = NtCreateDirectoryObject(&DirHandle, 0, &ObjectAttributes);
|
||||||
assert(NT_SUCCESS(Status));
|
assert(NT_SUCCESS(Status));
|
||||||
|
|
||||||
/* Add module entry for NTOSKRNL */
|
/* Add module entry for NTOSKRNL */
|
||||||
|
@ -318,7 +318,7 @@ LdrLoadModule(PUNICODE_STRING Filename)
|
||||||
NULL,
|
NULL,
|
||||||
NULL);
|
NULL);
|
||||||
CHECKPOINT;
|
CHECKPOINT;
|
||||||
Status = ZwOpenFile(&FileHandle,
|
Status = NtOpenFile(&FileHandle,
|
||||||
FILE_ALL_ACCESS,
|
FILE_ALL_ACCESS,
|
||||||
&ObjectAttributes,
|
&ObjectAttributes,
|
||||||
NULL, 0, 0);
|
NULL, 0, 0);
|
||||||
|
@ -331,7 +331,7 @@ LdrLoadModule(PUNICODE_STRING Filename)
|
||||||
CHECKPOINT;
|
CHECKPOINT;
|
||||||
|
|
||||||
/* Get the size of the file */
|
/* Get the size of the file */
|
||||||
Status = ZwQueryInformationFile(FileHandle,
|
Status = NtQueryInformationFile(FileHandle,
|
||||||
NULL,
|
NULL,
|
||||||
&FileStdInfo,
|
&FileStdInfo,
|
||||||
sizeof(FileStdInfo),
|
sizeof(FileStdInfo),
|
||||||
|
@ -355,7 +355,7 @@ LdrLoadModule(PUNICODE_STRING Filename)
|
||||||
CHECKPOINT;
|
CHECKPOINT;
|
||||||
|
|
||||||
/* Load driver into memory chunk */
|
/* Load driver into memory chunk */
|
||||||
Status = ZwReadFile(FileHandle,
|
Status = NtReadFile(FileHandle,
|
||||||
0, 0, 0, 0,
|
0, 0, 0, 0,
|
||||||
ModuleLoadBase,
|
ModuleLoadBase,
|
||||||
FileStdInfo.EndOfFile.u.LowPart,
|
FileStdInfo.EndOfFile.u.LowPart,
|
||||||
|
@ -369,7 +369,7 @@ LdrLoadModule(PUNICODE_STRING Filename)
|
||||||
}
|
}
|
||||||
CHECKPOINT;
|
CHECKPOINT;
|
||||||
|
|
||||||
ZwClose(FileHandle);
|
NtClose(FileHandle);
|
||||||
|
|
||||||
/* Build module object name */
|
/* Build module object name */
|
||||||
wcscpy(NameBuffer, MODULE_ROOT_NAME);
|
wcscpy(NameBuffer, MODULE_ROOT_NAME);
|
||||||
|
|
Binary file not shown.
|
@ -31,9 +31,6 @@ static NTSTATUS PsIdleThreadMain(PVOID Context)
|
||||||
|
|
||||||
for(;;)
|
for(;;)
|
||||||
{
|
{
|
||||||
// DPRINT1("Idling DpcQueueSize %d, Irql\n",DpcQueueSize,
|
|
||||||
// KeGetCurrentIrql());
|
|
||||||
// DbgPrint(".");
|
|
||||||
if (DpcQueueSize > 0)
|
if (DpcQueueSize > 0)
|
||||||
{
|
{
|
||||||
KeRaiseIrql(DISPATCH_LEVEL,&oldlvl);
|
KeRaiseIrql(DISPATCH_LEVEL,&oldlvl);
|
||||||
|
@ -57,7 +54,7 @@ VOID PsInitIdleThread(VOID)
|
||||||
NULL);
|
NULL);
|
||||||
|
|
||||||
Priority = LOW_PRIORITY;
|
Priority = LOW_PRIORITY;
|
||||||
ZwSetInformationThread(PsIdleThreadHandle,
|
NtSetInformationThread(PsIdleThreadHandle,
|
||||||
ThreadPriority,
|
ThreadPriority,
|
||||||
&Priority,
|
&Priority,
|
||||||
sizeof(Priority));
|
sizeof(Priority));
|
||||||
|
|
|
@ -1,4 +1,4 @@
|
||||||
/* $Id: thread.c,v 1.56 2000/10/07 13:41:54 dwelch Exp $
|
/* $Id: thread.c,v 1.57 2000/10/08 16:32:53 dwelch Exp $
|
||||||
*
|
*
|
||||||
* COPYRIGHT: See COPYING in the top level directory
|
* COPYRIGHT: See COPYING in the top level directory
|
||||||
* PROJECT: ReactOS kernel
|
* PROJECT: ReactOS kernel
|
||||||
|
@ -411,7 +411,7 @@ VOID PsInitThreadManagment(VOID)
|
||||||
FirstThread->Tcb.FreezeCount = 0;
|
FirstThread->Tcb.FreezeCount = 0;
|
||||||
CurrentThread = FirstThread;
|
CurrentThread = FirstThread;
|
||||||
CURRENT_KPCR->CurrentThread = (PVOID)FirstThread;
|
CURRENT_KPCR->CurrentThread = (PVOID)FirstThread;
|
||||||
ZwClose(FirstThreadHandle);
|
NtClose(FirstThreadHandle);
|
||||||
|
|
||||||
DPRINT("FirstThread %x\n",FirstThread);
|
DPRINT("FirstThread %x\n",FirstThread);
|
||||||
|
|
||||||
|
|
|
@ -1,78 +0,0 @@
|
||||||
*asm:
|
|
||||||
|
|
||||||
|
|
||||||
*asm_final:
|
|
||||||
|
|
||||||
|
|
||||||
*cpp:
|
|
||||||
-remap %(cpp_cpu) %{posix:-D_POSIX_SOURCE}
|
|
||||||
|
|
||||||
*cc1:
|
|
||||||
%(cc1_spec)
|
|
||||||
|
|
||||||
*cc1plus:
|
|
||||||
|
|
||||||
|
|
||||||
*endfile:
|
|
||||||
|
|
||||||
|
|
||||||
*link:
|
|
||||||
%{mwindows:--subsystem windows} %{mdll:--dll -e _DllMainCRTStartup@12}
|
|
||||||
|
|
||||||
*lib:
|
|
||||||
|
|
||||||
|
|
||||||
*libgcc:
|
|
||||||
-lgcc
|
|
||||||
|
|
||||||
*startfile:
|
|
||||||
|
|
||||||
|
|
||||||
*switches_need_spaces:
|
|
||||||
|
|
||||||
|
|
||||||
*signed_char:
|
|
||||||
%{funsigned-char:-D__CHAR_UNSIGNED__}
|
|
||||||
|
|
||||||
*predefines:
|
|
||||||
-Di386 -D_WIN32 -DWIN32 -D__WIN32__ -D__MINGW32__ -DWINNT -D_X86_=1 -D__STDC__=1 -D__stdcall=__attribute__((__stdcall__)) -D_stdcall=__attribute__((__stdcall__)) -D__cdecl=__attribute__((__cdecl__)) -D__declspec(x)=__attribute__((x)) -Asystem(winnt) -Acpu(i386) -Amachine(i386)
|
|
||||||
|
|
||||||
*cross_compile:
|
|
||||||
1
|
|
||||||
|
|
||||||
*version:
|
|
||||||
egcs-2.91.57
|
|
||||||
|
|
||||||
*multilib:
|
|
||||||
. ;
|
|
||||||
|
|
||||||
*multilib_defaults:
|
|
||||||
|
|
||||||
|
|
||||||
*multilib_extra:
|
|
||||||
|
|
||||||
|
|
||||||
*multilib_matches:
|
|
||||||
|
|
||||||
|
|
||||||
*linker:
|
|
||||||
collect2
|
|
||||||
|
|
||||||
*cpp_486:
|
|
||||||
%{!ansi:-Di486} -D__i486 -D__i486__
|
|
||||||
|
|
||||||
*cpp_586:
|
|
||||||
%{!ansi:-Di586 -Dpentium} -D__i586 -D__i586__ -D__pentium -D__pentium__
|
|
||||||
|
|
||||||
*cpp_686:
|
|
||||||
%{!ansi:-Di686 -Dpentiumpro} -D__i686 -D__i686__ -D__pentiumpro -D__pentiumpro__
|
|
||||||
|
|
||||||
*cpp_cpu_default:
|
|
||||||
%(cpp_586)
|
|
||||||
|
|
||||||
*cpp_cpu:
|
|
||||||
-Acpu(i386) -Amachine(i386) %{!ansi:-Di386} -D__i386 -D__i386__ %{mcpu=i486:%(cpp_486)} %{m486:%(cpp_486)} %{mpentium:%(cpp_586)} %{mcpu=pentium:%(cpp_586)} %{mpentiumpro:%(cpp_686)} %{mcpu=pentiumpro:%(cpp_686)} %{!mcpu*:%{!m486:%{!mpentium*:%(cpp_cpu_default)}}}
|
|
||||||
|
|
||||||
*cc1_cpu:
|
|
||||||
%{!mcpu*: %{m386:-mcpu=i386 -march=i386} %{mno-486:-mcpu=i386 -march=i386} %{m486:-mcpu=i486 -march=i486} %{mno-386:-mcpu=i486 -march=i486} %{mno-pentium:-mcpu=i486 -march=i486} %{mpentium:-mcpu=pentium} %{mno-pentiumpro:-mcpu=pentium} %{mpentiumpro:-mcpu=pentiumpro}}
|
|
||||||
|
|
Loading…
Reference in a new issue