* needs asw to link correctly wprt0 or wdllprt0 file

This commit is contained in:
pierre 1998-11-30 13:13:40 +00:00
parent 5f21062312
commit 292e21df12
4 changed files with 31 additions and 14 deletions

View File

@ -137,6 +137,10 @@ clean :
#
# Base Units (System, strings, os-dependent-base-unit)
#
ifneq ($(OS_SOURCE),win32)
override AS=asw
endif
wprt0$(OEXT) : wprt0.as
$(AS) -o wprt0$(OEXT) wprt0.as
@ -393,7 +397,10 @@ include $(CFG)/makefile.def
#
# $Log$
# Revision 1.13 1998-11-30 09:16:57 pierre
# Revision 1.14 1998-11-30 13:13:40 pierre
# * needs asw to link correctly wprt0 or wdllprt0 file
#
# Revision 1.13 1998/11/30 09:16:57 pierre
# + added the changes from Pavel Ozerski after several modifications
# to be able to create DLLs
#

View File

@ -731,9 +731,9 @@ begin
end;
end;
{$endif}
{$ASMMODE ATT}
procedure Exe_entry;[public, alias : 'FPC_EXE_Entry'];
{$ASMMODE DIRECT}
procedure Exe_entry;[public, alias : '_FPC_EXE_Entry'];
begin
IsLibrary:=false;
asm
@ -743,7 +743,7 @@ procedure Exe_entry;[public, alias : 'FPC_EXE_Entry'];
ExitProcess(0);
end;
procedure Dll_entry;[public, alias : 'FPC_DLL_Entry'];
procedure Dll_entry;[public, alias : '_FPC_DLL_Entry'];
begin
IsLibrary:=true;
case DLLreason of
@ -756,8 +756,15 @@ procedure Dll_entry;[public, alias : 'FPC_DLL_Entry'];
end;
end;
end;
const
Exe_entry_code : pointer = @Exe_entry;
Dll_entry_code : pointer = @Dll_entry;
{$endif def FPC_WIN32_DLL_SUPPORT}
{$ASMMODE ATT}
begin
{ get some helpful informations }
GetStartupInfo(@startupinfo);
@ -792,7 +799,10 @@ end.
{
$Log$
Revision 1.25 1998-11-30 09:16:58 pierre
Revision 1.26 1998-11-30 13:13:41 pierre
* needs asw to link correctly wprt0 or wdllprt0 file
Revision 1.25 1998/11/30 09:16:58 pierre
+ added the changes from Pavel Ozerski after several modifications
to be able to create DLLs

View File

@ -4,11 +4,11 @@
.text
.globl _mainCRTStartup
_mainCRTStartup:
movl $1,U_SYSWIN32_ISCONSOLE
movb $1,U_SYSWIN32_ISCONSOLE
jmp .LDLL_Entry
.globl _WinMainCRTStartup
_WinMainCRTStartup:
movl $0,U_SYSWIN32_ISCONSOLE
movb $0,U_SYSWIN32_ISCONSOLE
.LDLL_Entry:
pushl %ebp
movl %esp,%ebp
@ -21,7 +21,7 @@ _WinMainCRTStartup:
movl %edi,U_SYSWIN32_DLLREASON
movl 16(%ebp),%edi
movl %edi,U_SYSWIN32_DLLPARAM
call FPC_DLL_Entry
call _FPC_DLL_Entry
popl %edi
popl %esi
popl %ebx

View File

@ -3,12 +3,12 @@
//1998
// modified by Pierre Muller
.text
.GLOBL _mainCRTStartup
.globl _mainCRTStartup
_mainCRTStartup:
movl $1,U_SYSWIN32_ISCONSOLE
jmp FPC_EXE_Entry
.GLOBL _WinMainCRTStartup
movb $1,U_SYSWIN32_ISCONSOLE
call _FPC_EXE_Entry
.globl _WinMainCRTStartup
_WinMainCRTStartup:
movl $0,U_SYSWIN32_ISCONSOLE
jmp FPC_EXE_Entry
movb $0,U_SYSWIN32_ISCONSOLE
call _FPC_EXE_Entry