mirror of
https://gitlab.com/freepascal.org/fpc/source.git
synced 2025-04-16 01:39:27 +02:00
- removed cprt0.as from the OpenBSD i386 RTL as well
git-svn-id: trunk@42078 -
This commit is contained in:
parent
ef86b3ab29
commit
357d3ca390
1
.gitattributes
vendored
1
.gitattributes
vendored
@ -10255,7 +10255,6 @@ rtl/openbsd/Makefile.fpc svneol=native#text/plain
|
||||
rtl/openbsd/errno.inc svneol=native#text/plain
|
||||
rtl/openbsd/errnostr.inc svneol=native#text/plain
|
||||
rtl/openbsd/i386/bsyscall.inc svneol=native#text/plain
|
||||
rtl/openbsd/i386/cprt0.as svneol=native#text/plain
|
||||
rtl/openbsd/i386/openbsd_ident.inc svneol=native#text/plain
|
||||
rtl/openbsd/i386/prt0.as svneol=native#text/plain
|
||||
rtl/openbsd/i386/si_c.inc svneol=native#text/plain
|
||||
|
@ -347,16 +347,13 @@ ifdef RELEASE
|
||||
override FPCOPT+=-Ur
|
||||
endif
|
||||
CPU_UNITS=
|
||||
SYSINIT_UNITS=
|
||||
LOADERS=prt0 cprt0
|
||||
ifeq ($(ARCH),x86_64)
|
||||
CPU_UNITS=x86 ports cpu
|
||||
SYSINIT_UNITS=si_prc si_c si_dll si_g
|
||||
LOADERS=prt0
|
||||
ifeq ($(ARCH),x86_64)
|
||||
CPU_UNITS=x86 ports cpu
|
||||
endif
|
||||
ifeq ($(ARCH),i386)
|
||||
CPU_UNITS=x86 ports cpu mmx
|
||||
SYSINIT_UNITS=si_prc si_c si_dll si_g
|
||||
endif
|
||||
OBJPASDIR=$(RTL)/objpas
|
||||
GRAPHDIR=$(INC)/graph
|
||||
@ -3256,8 +3253,6 @@ SYSCPUDEPS=$(addprefix $(PROCINC)/,$(CPUINCNAMES))
|
||||
SYSDEPS=$(SYSINCDEPS) $(SYSCPUDEPS)
|
||||
prt0$(OEXT) : $(CPU_TARGET)/$(PRT0).as
|
||||
$(AS) -o $(UNITTARGETDIRPREFIX)prt0$(OEXT) $(CPU_TARGET)/$(PRT0).as
|
||||
cprt0$(OEXT) : $(CPU_TARGET)/cprt0.as
|
||||
$(AS) -o $(UNITTARGETDIRPREFIX)cprt0$(OEXT) $(CPU_TARGET)/cprt0.as
|
||||
si_prc$(PPUEXT) : si_prc.pp si_intf.inc si_impl.inc $(ARCH)/openbsd_ident.inc $(ARCH)/si_prc.inc $(SYSTEMUNIT)$(PPUEXT)
|
||||
$(COMPILER) $<
|
||||
si_c$(PPUEXT) : si_c.pp si_intf.inc si_impl.inc $(ARCH)/openbsd_ident.inc $(ARCH)/si_c.inc $(SYSTEMUNIT)$(PPUEXT)
|
||||
|
@ -76,18 +76,15 @@ override FPCOPT+=-Ur
|
||||
endif
|
||||
|
||||
CPU_UNITS=
|
||||
SYSINIT_UNITS=
|
||||
SYSINIT_UNITS=si_prc si_c si_dll si_g
|
||||
|
||||
LOADERS=prt0 cprt0
|
||||
LOADERS=prt0
|
||||
|
||||
ifeq ($(ARCH),x86_64)
|
||||
CPU_UNITS=x86 ports cpu
|
||||
SYSINIT_UNITS=si_prc si_c si_dll si_g
|
||||
LOADERS=prt0
|
||||
endif
|
||||
ifeq ($(ARCH),i386)
|
||||
CPU_UNITS=x86 ports cpu mmx
|
||||
SYSINIT_UNITS=si_prc si_c si_dll si_g
|
||||
endif
|
||||
|
||||
# Paths
|
||||
@ -129,9 +126,6 @@ SYSDEPS=$(SYSINCDEPS) $(SYSCPUDEPS)
|
||||
prt0$(OEXT) : $(CPU_TARGET)/$(PRT0).as
|
||||
$(AS) -o $(UNITTARGETDIRPREFIX)prt0$(OEXT) $(CPU_TARGET)/$(PRT0).as
|
||||
|
||||
cprt0$(OEXT) : $(CPU_TARGET)/cprt0.as
|
||||
$(AS) -o $(UNITTARGETDIRPREFIX)cprt0$(OEXT) $(CPU_TARGET)/cprt0.as
|
||||
|
||||
|
||||
#
|
||||
# $(SYSINIT_UNITS) Units
|
||||
|
@ -1,206 +0,0 @@
|
||||
.section ".note.openbsd.ident", "a"
|
||||
.p2align 2
|
||||
.long 8
|
||||
.long 4
|
||||
.long 1
|
||||
.ascii "OpenBSD\0"
|
||||
.long 0
|
||||
.previous
|
||||
.file "crt0.c"
|
||||
gcc2_compiled.:
|
||||
.data
|
||||
.align 32
|
||||
.type rcsid , @object
|
||||
.size rcsid , 58
|
||||
rcsid:
|
||||
.string "$OpenBSD: crt0.c,v 1.11 2003/06/27 22:30:38 deraadt Exp $"
|
||||
.globl __progname
|
||||
.section .rodata
|
||||
.LC0:
|
||||
.string ""
|
||||
.data
|
||||
.align 4
|
||||
.type __progname , @object
|
||||
.size __progname , 4
|
||||
__progname:
|
||||
.long .LC0
|
||||
.global __progname_storage
|
||||
.type __progname_storage, @ object
|
||||
.size __progname_storage, 256
|
||||
|
||||
.align 4
|
||||
___fpucw:
|
||||
.long 0x1332
|
||||
|
||||
.globl ___fpc_brk_addr /* heap management */
|
||||
.type ___fpc_brk_addr,@object
|
||||
.size ___fpc_brk_addr,4
|
||||
___fpc_brk_addr:
|
||||
.long 0
|
||||
|
||||
#APP
|
||||
|
||||
.text
|
||||
.align 4
|
||||
.globl __start
|
||||
.globl _start
|
||||
_start:
|
||||
__start:
|
||||
pushl %ebx #ps_strings
|
||||
pushl %ecx # obj
|
||||
pushl %edx # cleanup
|
||||
movl 12(%esp),%eax
|
||||
leal 20(%esp,%eax,4),%ecx
|
||||
leal 16(%esp),%edx
|
||||
pushl %ecx
|
||||
pushl %edx
|
||||
pushl %eax
|
||||
call ___start
|
||||
|
||||
#NO_APP
|
||||
.text
|
||||
.align 4
|
||||
.globl ___start
|
||||
.type ___start , @function
|
||||
___start:
|
||||
pushl %ebp
|
||||
movl %esp,%ebp
|
||||
subl $16,%esp
|
||||
pushl %esi
|
||||
pushl %ebx
|
||||
call fpc_geteipasecx
|
||||
addl $_GLOBAL_OFFSET_TABLE_,%ecx
|
||||
movl %ecx,%edi
|
||||
movl 12(%ebp),%esi
|
||||
movl 16(%ebp),%eax
|
||||
movl environ@GOT(%edi),%ecx
|
||||
movl %eax,(%ecx)
|
||||
movl operatingsystem_parameter_envp@GOT(%edi),%ecx
|
||||
movl %eax,(%ecx)
|
||||
movl (%esi),%ebx
|
||||
testl %ebx,%ebx
|
||||
je .L3
|
||||
addl $-8,%esp
|
||||
pushl $47
|
||||
pushl %ebx
|
||||
call _strrchr
|
||||
movl __progname@GOT(%edi),%ecx
|
||||
movl %eax,(%ecx)
|
||||
addl $16,%esp
|
||||
testl %eax,%eax
|
||||
jne .L4
|
||||
movl %ebx,(%ecx)
|
||||
jmp .L5
|
||||
.p2align 4,,7
|
||||
.L4:
|
||||
incl %eax
|
||||
movl %eax,(%ecx)
|
||||
.L5:
|
||||
movl __progname_storage@GOT(%edi),%edx
|
||||
jmp .L12
|
||||
.p2align 4,,7
|
||||
.L9:
|
||||
movb (%eax),%al
|
||||
movb %al,(%edx)
|
||||
movl __progname@GOT(%edi),%ecx
|
||||
incl (%ecx)
|
||||
incl %edx
|
||||
.L12:
|
||||
movl __progname@GOT(%edi),%ecx
|
||||
movl (%ecx),%eax
|
||||
cmpb $0,(%eax)
|
||||
je .L7
|
||||
movl __progname_storage@GOT(%edi),%ecx
|
||||
addl $255,%ecx
|
||||
cmpl %ecx,%edx
|
||||
jb .L9
|
||||
.L7:
|
||||
movb $0,(%edx)
|
||||
pushl %eax
|
||||
movl __progname_storage@GOT(%edi),%eax
|
||||
movl __progname@GOT(%edi),%ecx
|
||||
movl %eax,(%ecx)
|
||||
popl %eax
|
||||
.L3:
|
||||
# call __init
|
||||
subl $16,%esp
|
||||
pushl %eax
|
||||
movl 8(%ebp),%eax
|
||||
movl operatingsystem_parameter_argc@GOT(%edi),%ecx
|
||||
movl %eax,(%ecx)
|
||||
movl operatingsystem_parameter_argv@GOT(%edi),%ecx
|
||||
movl %esi,(%ecx)
|
||||
popl %eax
|
||||
# pushl environ
|
||||
# pushl %esi
|
||||
# pushl 8(%ebp)
|
||||
movl ___fpucw@GOT(%edi),%ecx
|
||||
finit
|
||||
fwait
|
||||
fldcw (%ecx)
|
||||
xorl %ebp,%ebp
|
||||
call main
|
||||
pushl %eax
|
||||
call exit@PLT
|
||||
.p2align 2,0x90
|
||||
|
||||
.globl _haltproc
|
||||
.type _haltproc,@function
|
||||
|
||||
_haltproc:
|
||||
call fpc_geteipasebx
|
||||
addl $_GLOBAL_OFFSET_TABLE_,%ebx
|
||||
movl operatingsystem_result@GOT(%ebx),%ebx
|
||||
movzwl (%ebx),%ebx
|
||||
pushl %ebx
|
||||
mov $1,%eax
|
||||
call .Lactualsyscall
|
||||
addl $4,%esp
|
||||
jmp _haltproc
|
||||
|
||||
.Lactualsyscall:
|
||||
int $0x80
|
||||
jb .LErrorcode
|
||||
xor %ebx,%ebx
|
||||
ret
|
||||
.LErrorcode:
|
||||
mov %eax,%ebx
|
||||
mov $-1,%eax
|
||||
ret
|
||||
.p2align 2,0x90
|
||||
.Lfe1:
|
||||
|
||||
.size ___start , . - ___start
|
||||
.align 4
|
||||
.type _strrchr , @function
|
||||
_strrchr:
|
||||
pushl %ebp
|
||||
movl %esp,%ebp
|
||||
pushl %ebx
|
||||
movl 8(%ebp),%eax
|
||||
movb 12(%ebp),%bl
|
||||
xorl %ecx,%ecx
|
||||
.p2align 4,,7
|
||||
.L14:
|
||||
movb (%eax),%dl
|
||||
cmpb %bl,%dl
|
||||
jne .L17
|
||||
movl %eax,%ecx
|
||||
.L17:
|
||||
testb %dl,%dl
|
||||
je .L16
|
||||
incl %eax
|
||||
jmp .L14
|
||||
.p2align 4,,7
|
||||
.L16:
|
||||
movl %ecx,%eax
|
||||
popl %ebx
|
||||
leave
|
||||
ret
|
||||
.size _strrchr , . - _strrchr
|
||||
.comm environ,4,4
|
||||
.comm __progname_storage,256,32
|
||||
.comm operatingsystem_parameter_envp,4,4
|
||||
.comm operatingsystem_parameter_argc,4,4
|
||||
.comm operatingsystem_parameter_argv,4,4
|
||||
|
Loading…
Reference in New Issue
Block a user