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:
David Welch 2000-10-08 16:32:53 +00:00
parent 8d1034c5fa
commit 8a74f96a65
13 changed files with 26 additions and 102 deletions

View file

@ -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) \
{ \
PLIST_ENTRY OldBlink; \
assert((ListEntry)->Blink == NULL); \
assert((ListEntry)->Flink == NULL); \
OldBlink = (ListHead)->Blink; \
(ListEntry)->Flink = (ListHead); \
(ListEntry)->Blink = OldBlink; \

View file

@ -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
#
@ -177,6 +177,7 @@ $(TARGET).dll: $(DLLMAIN) $(OBJECTS) $(TARGET).def
-mdll \
-o junk.tmp \
-Wl,--base-file,base.tmp \
-Wl,--entry=_DllMain@12 \
$(TARGET).o \
../kernel32/kernel32.a -lgcc
- $(RM) junk.tmp
@ -195,7 +196,8 @@ $(TARGET).dll: $(DLLMAIN) $(OBJECTS) $(TARGET).def
-Wl,--image-base,0x77630000 \
-Wl,--file-alignment,0x1000 \
-Wl,--section-alignment,0x1000 \
-Wl,temp.exp
-Wl,temp.exp \
-Wl,--entry=_DllMain@12
- $(RM) temp.exp
$(NM) --numeric-sort $(TARGET).dll > $(TARGET).sym

View file

@ -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
* PROJECT: ReactOS system libraries
@ -163,7 +163,7 @@ HANDLE STDCALL CreateRemoteThread(HANDLE hProcess,
memset(&ThreadContext,0,sizeof(CONTEXT));
ThreadContext.Eip = (LONG)ThreadStartup;
ThreadContext.SegGs = USER_DS;
ThreadContext.SegFs = USER_DS;
ThreadContext.SegFs = TEB_SELECTOR;
ThreadContext.SegEs = USER_DS;
ThreadContext.SegDs = USER_DS;
ThreadContext.SegCs = USER_CS;

View file

@ -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
* PROJECT: ReactOS kernel
@ -148,6 +148,7 @@ LdrInitializeThunk (ULONG Unknown1,
DbgPrint("Failed to create loader module entry (NTDLL)\n");
ZwTerminateProcess(NtCurrentProcess(),STATUS_UNSUCCESSFUL);
}
memset(NtModule, 0, sizeof(LDR_MODULE));
NtModule->BaseAddress = (PVOID)&_image_base__;
NtModule->EntryPoint = 0; /* no entry point */

View file

@ -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
* PROJECT: ReactOS system libraries
@ -68,7 +68,7 @@ HANDLE STDCALL KlCreateFirstThread(HANDLE ProcessHandle,
memset(&ThreadContext,0,sizeof(CONTEXT));
ThreadContext.Eip = (ULONG)lpStartAddress;
ThreadContext.SegGs = USER_DS;
ThreadContext.SegFs = USER_DS;
ThreadContext.SegFs = TEB_SELECTOR;
ThreadContext.SegEs = USER_DS;
ThreadContext.SegDs = USER_DS;
ThreadContext.SegCs = USER_CS;

View file

@ -209,7 +209,7 @@ RtlInitializeContext(HANDLE ProcessHandle,
Context->Eip = (LONG)StartAddress;
Context->SegGs = USER_DS;
Context->SegFs = USER_DS;
Context->SegFs = TEB_SELECTOR;
Context->SegEs = USER_DS;
Context->SegDs = USER_DS;
Context->SegCs = USER_CS;

View file

@ -15,6 +15,7 @@
"pusha\n\t" \
"pushl %ds\n\t" \
"pushl %es\n\t" \
"pushl %fs\n\t" \
"movl $0xceafbeef,%eax\n\t" \
"pushl %eax\n\t" \
"movw $"STR(KERNEL_DS)",%ax\n\t" \
@ -27,6 +28,7 @@
"call _KiInterruptDispatch\n\t"\
"popl %eax\n\t" \
"popl %eax\n\t" \
"popl %fs\n\t" \
"popl %es\n\t" \
"popl %ds\n\t" \
"popa\n\t" \
@ -38,6 +40,7 @@
"pusha\n\t" \
"pushl %ds\n\t" \
"pushl %es\n\t" \
"pushl %fs\n\t" \
"movl $0xceafbeef,%eax\n\t" \
"pushl %eax\n\t" \
"movw $"STR(KERNEL_DS)",%ax\n\t" \
@ -50,6 +53,7 @@
"call _KiInterruptDispatch\n\t"\
"popl %eax\n\t" \
"popl %eax\n\t" \
"popl %fs\n\t" \
"popl %es\n\t" \
"popl %ds\n\t" \
"popa\n\t" \

View file

@ -203,7 +203,7 @@ NTSTATUS LdrLoadInitialProcess (VOID)
Context.Eip = (ULONG)LdrStartupAddr;
Context.SegDs = USER_DS;
Context.SegEs = USER_DS;
Context.SegFs = USER_DS;
Context.SegFs = TEB_SELECTOR;
Context.SegGs = USER_DS;
DPRINT("LdrStartupAddr %x\n",LdrStartupAddr);

View file

@ -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
* PROJECT: ReactOS kernel
@ -115,7 +115,7 @@ VOID LdrInitModuleManagement(VOID)
NULL,
NULL);
DPRINT("Create dir: %wZ\n", &ModuleName);
Status = ZwCreateDirectoryObject(&DirHandle, 0, &ObjectAttributes);
Status = NtCreateDirectoryObject(&DirHandle, 0, &ObjectAttributes);
assert(NT_SUCCESS(Status));
/* Add module entry for NTOSKRNL */
@ -318,7 +318,7 @@ LdrLoadModule(PUNICODE_STRING Filename)
NULL,
NULL);
CHECKPOINT;
Status = ZwOpenFile(&FileHandle,
Status = NtOpenFile(&FileHandle,
FILE_ALL_ACCESS,
&ObjectAttributes,
NULL, 0, 0);
@ -331,7 +331,7 @@ LdrLoadModule(PUNICODE_STRING Filename)
CHECKPOINT;
/* Get the size of the file */
Status = ZwQueryInformationFile(FileHandle,
Status = NtQueryInformationFile(FileHandle,
NULL,
&FileStdInfo,
sizeof(FileStdInfo),
@ -355,7 +355,7 @@ LdrLoadModule(PUNICODE_STRING Filename)
CHECKPOINT;
/* Load driver into memory chunk */
Status = ZwReadFile(FileHandle,
Status = NtReadFile(FileHandle,
0, 0, 0, 0,
ModuleLoadBase,
FileStdInfo.EndOfFile.u.LowPart,
@ -369,7 +369,7 @@ LdrLoadModule(PUNICODE_STRING Filename)
}
CHECKPOINT;
ZwClose(FileHandle);
NtClose(FileHandle);
/* Build module object name */
wcscpy(NameBuffer, MODULE_ROOT_NAME);

Binary file not shown.

View file

@ -31,9 +31,6 @@ static NTSTATUS PsIdleThreadMain(PVOID Context)
for(;;)
{
// DPRINT1("Idling DpcQueueSize %d, Irql\n",DpcQueueSize,
// KeGetCurrentIrql());
// DbgPrint(".");
if (DpcQueueSize > 0)
{
KeRaiseIrql(DISPATCH_LEVEL,&oldlvl);
@ -57,7 +54,7 @@ VOID PsInitIdleThread(VOID)
NULL);
Priority = LOW_PRIORITY;
ZwSetInformationThread(PsIdleThreadHandle,
NtSetInformationThread(PsIdleThreadHandle,
ThreadPriority,
&Priority,
sizeof(Priority));

View file

@ -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
* PROJECT: ReactOS kernel
@ -411,7 +411,7 @@ VOID PsInitThreadManagment(VOID)
FirstThread->Tcb.FreezeCount = 0;
CurrentThread = FirstThread;
CURRENT_KPCR->CurrentThread = (PVOID)FirstThread;
ZwClose(FirstThreadHandle);
NtClose(FirstThreadHandle);
DPRINT("FirstThread %x\n",FirstThread);

View file

@ -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}}