mirror of
https://github.com/reactos/reactos.git
synced 2024-12-29 10:35:28 +00:00
2003-04-27 Casper S. Hornstrup <chorns@users.sourceforge.net>
* tools/helper.mk (TARGET_ASFLAGS): Add -march and define MK_ARCH_ID. * lib/ntdll/makefile (TARGET_ASFLAGS): Define as "-I $(PATH_TO_TOP)/include". (TARGET_OBJECTS): Add ldr/entry.o. * lib/ntdll/ldr/startup.c: Move inline assembly code... * lib/ntdll/ldr/entry.S: ...here. New file. svn path=/trunk/; revision=4598
This commit is contained in:
parent
3568bb9b50
commit
a80496b963
5 changed files with 34 additions and 40 deletions
|
@ -1,3 +1,12 @@
|
||||||
|
2003-04-27 Casper S. Hornstrup <chorns@users.sourceforge.net>
|
||||||
|
|
||||||
|
* tools/helper.mk (TARGET_ASFLAGS): Add -march and define MK_ARCH_ID.
|
||||||
|
* lib/ntdll/makefile (TARGET_ASFLAGS): Define as
|
||||||
|
"-I $(PATH_TO_TOP)/include".
|
||||||
|
(TARGET_OBJECTS): Add ldr/entry.o.
|
||||||
|
* lib/ntdll/ldr/startup.c: Move inline assembly code...
|
||||||
|
* lib/ntdll/ldr/entry.S: ...here. New file.
|
||||||
|
|
||||||
2003-04-27 Casper S. Hornstrup <chorns@users.sourceforge.net>
|
2003-04-27 Casper S. Hornstrup <chorns@users.sourceforge.net>
|
||||||
|
|
||||||
* include/kernel32/kernel32.h (assert): Define.
|
* include/kernel32/kernel32.h (assert): Define.
|
||||||
|
|
18
reactos/lib/ntdll/ldr/entry.S
Executable file
18
reactos/lib/ntdll/ldr/entry.S
Executable file
|
@ -0,0 +1,18 @@
|
||||||
|
#include <roscfg.h>
|
||||||
|
|
||||||
|
.extern ___true_LdrInitializeThunk@16
|
||||||
|
|
||||||
|
.globl _LdrInitializeThunk@16
|
||||||
|
_LdrInitializeThunk@16:
|
||||||
|
#if defined(_M_IX86)
|
||||||
|
nop /* breakin overwrites this with "int 3" */
|
||||||
|
jmp ___true_LdrInitializeThunk@16
|
||||||
|
#elif defined(_M_ALPHA)
|
||||||
|
nop /* breakin overwrites this with "call_pal bpt" */
|
||||||
|
"br"
|
||||||
|
#elif defined(_M_MIPS)
|
||||||
|
nop /* breakin overwrites this with "break" */
|
||||||
|
j ___true_LdrInitializeThunk@16
|
||||||
|
#else
|
||||||
|
#error Unsupported architecture.
|
||||||
|
#endif
|
|
@ -1,4 +1,4 @@
|
||||||
/* $Id: startup.c,v 1.49 2003/04/26 23:13:29 hyperion Exp $
|
/* $Id: startup.c,v 1.50 2003/04/27 14:45:52 chorns Exp $
|
||||||
*
|
*
|
||||||
* COPYRIGHT: See COPYING in the top level directory
|
* COPYRIGHT: See COPYING in the top level directory
|
||||||
* PROJECT: ReactOS kernel
|
* PROJECT: ReactOS kernel
|
||||||
|
@ -38,43 +38,6 @@ ULONG NtGlobalFlag = 0;
|
||||||
|
|
||||||
|
|
||||||
/* FUNCTIONS *****************************************************************/
|
/* FUNCTIONS *****************************************************************/
|
||||||
#if 0
|
|
||||||
/* FIXME: why doesn't gcc recognize __declspec(naked)? */
|
|
||||||
__declspec(naked) VOID STDCALL LdrInitializeThunk
|
|
||||||
(
|
|
||||||
ULONG Unknown1,
|
|
||||||
ULONG Unknown2,
|
|
||||||
ULONG Unknown3,
|
|
||||||
ULONG Unknown4
|
|
||||||
)
|
|
||||||
{
|
|
||||||
__asm__
|
|
||||||
(
|
|
||||||
#else
|
|
||||||
__asm__
|
|
||||||
(
|
|
||||||
"\n"
|
|
||||||
".global _LdrInitializeThunk@16\n"
|
|
||||||
"_LdrInitializeThunk@16:\n"
|
|
||||||
#endif
|
|
||||||
|
|
||||||
#if defined(_M_IX86)
|
|
||||||
"nop\n" /* breakin overwrites this with "int 3" */
|
|
||||||
"jmp"
|
|
||||||
#elif defined(_M_ALPHA)
|
|
||||||
"nop\n" /* breakin overwrites this with "call_pal bpt" */
|
|
||||||
"br"
|
|
||||||
#elif defined(_M_MIPS)
|
|
||||||
"nop\n" /* breakin overwrites this with "break" */
|
|
||||||
"j"
|
|
||||||
#else
|
|
||||||
#error Unsupported architecture.
|
|
||||||
#endif
|
|
||||||
" ___true_LdrInitializeThunk@16\n"
|
|
||||||
);
|
|
||||||
#if 0
|
|
||||||
}
|
|
||||||
#endif
|
|
||||||
|
|
||||||
VOID STDCALL
|
VOID STDCALL
|
||||||
__true_LdrInitializeThunk (ULONG Unknown1,
|
__true_LdrInitializeThunk (ULONG Unknown1,
|
||||||
|
|
|
@ -1,4 +1,4 @@
|
||||||
# $Id: makefile,v 1.81 2003/04/23 22:58:02 gvg Exp $
|
# $Id: makefile,v 1.82 2003/04/27 14:45:52 chorns Exp $
|
||||||
|
|
||||||
PATH_TO_TOP = ../..
|
PATH_TO_TOP = ../..
|
||||||
|
|
||||||
|
@ -10,6 +10,8 @@ TARGET_NAME = ntdll
|
||||||
|
|
||||||
TARGET_CFLAGS = -g -D__NTDLL__
|
TARGET_CFLAGS = -g -D__NTDLL__
|
||||||
|
|
||||||
|
TARGET_ASFLAGS = -I $(PATH_TO_TOP)/include
|
||||||
|
|
||||||
TARGET_LFLAGS = -Wl,--file-alignment,0x1000 \
|
TARGET_LFLAGS = -Wl,--file-alignment,0x1000 \
|
||||||
-Wl,--section-alignment,0x1000 \
|
-Wl,--section-alignment,0x1000 \
|
||||||
-nostartfiles
|
-nostartfiles
|
||||||
|
@ -64,6 +66,7 @@ ARCH_OBJECTS = \
|
||||||
|
|
||||||
TARGET_OBJECTS = \
|
TARGET_OBJECTS = \
|
||||||
napi.o \
|
napi.o \
|
||||||
|
ldr/entry.o \
|
||||||
ldr/startup.o \
|
ldr/startup.o \
|
||||||
$(ARCH_OBJECTS) \
|
$(ARCH_OBJECTS) \
|
||||||
$(DBG_OBJECTS) \
|
$(DBG_OBJECTS) \
|
||||||
|
|
|
@ -1,4 +1,4 @@
|
||||||
# $Id: helper.mk,v 1.34 2003/04/13 17:38:27 chorns Exp $
|
# $Id: helper.mk,v 1.35 2003/04/27 14:45:52 chorns Exp $
|
||||||
#
|
#
|
||||||
# Helper makefile for ReactOS modules
|
# Helper makefile for ReactOS modules
|
||||||
# Variables this makefile accepts:
|
# Variables this makefile accepts:
|
||||||
|
@ -488,6 +488,7 @@ endif
|
||||||
include $(PATH_TO_TOP)/config
|
include $(PATH_TO_TOP)/config
|
||||||
|
|
||||||
|
|
||||||
|
TARGET_ASFLAGS += -march=$(ARCH) -D$(MK_ARCH_ID)
|
||||||
TARGET_CFLAGS += $(MK_CFLAGS)
|
TARGET_CFLAGS += $(MK_CFLAGS)
|
||||||
TARGET_CFLAGS += -pipe -march=$(ARCH) -D$(MK_ARCH_ID)
|
TARGET_CFLAGS += -pipe -march=$(ARCH) -D$(MK_ARCH_ID)
|
||||||
ifeq ($(DBG),1)
|
ifeq ($(DBG),1)
|
||||||
|
|
Loading…
Reference in a new issue