mirror of
https://gitlab.com/freepascal.org/fpc/source.git
synced 2025-08-01 18:26:09 +02:00
+ Added dllprt0.as fro netbsd
git-svn-id: trunk@23846 -
This commit is contained in:
parent
503b8c73c2
commit
12d4b0b173
2
.gitattributes
vendored
2
.gitattributes
vendored
@ -8221,6 +8221,7 @@ rtl/netbsd/errno.inc svneol=native#text/plain
|
||||
rtl/netbsd/errnostr.inc svneol=native#text/plain
|
||||
rtl/netbsd/i386/bsyscall.inc svneol=native#text/plain
|
||||
rtl/netbsd/i386/cprt0.as svneol=native#text/plain
|
||||
rtl/netbsd/i386/dllprt0.as svneol=native#text/plain
|
||||
rtl/netbsd/i386/prt0.as svneol=native#text/plain
|
||||
rtl/netbsd/i386/prt0_10.as svneol=native#text/plain
|
||||
rtl/netbsd/i386/sighnd.inc svneol=native#text/plain
|
||||
@ -8248,6 +8249,7 @@ rtl/netbsd/unxsockh.inc svneol=native#text/plain
|
||||
rtl/netbsd/unxsysc.inc svneol=native#text/plain
|
||||
rtl/netbsd/x86_64/bsyscall.inc svneol=native#text/plain
|
||||
rtl/netbsd/x86_64/cprt0.as svneol=native#text/plain
|
||||
rtl/netbsd/x86_64/dllprt0.as svneol=native#text/plain
|
||||
rtl/netbsd/x86_64/gprt0.as svneol=native#text/plain
|
||||
rtl/netbsd/x86_64/prt0.as svneol=native#text/plain
|
||||
rtl/netbsd/x86_64/sighnd.inc svneol=native#text/plain
|
||||
|
@ -9,7 +9,7 @@ main=rtl
|
||||
fpcpackage=y
|
||||
|
||||
[target]
|
||||
loaders=prt0 cprt0
|
||||
loaders=prt0 cprt0 dllprt0
|
||||
units=$(SYSTEMUNIT) uuchar unixtype ctypes objpas macpas iso7185 \
|
||||
strings syscall sysctl baseunix unixutil character \
|
||||
unix rtlconsts initc cmem matrix \
|
||||
@ -122,6 +122,9 @@ prt0$(OEXT) : $(CPU_TARGET)/$(PRT0).as
|
||||
cprt0$(OEXT) : $(CPU_TARGET)/cprt0.as
|
||||
$(AS) -o $(UNITTARGETDIRPREFIX)cprt0$(OEXT) $(CPU_TARGET)/cprt0.as
|
||||
|
||||
dllprt0$(OEXT) : $(CPU_TARGET)/dllprt0.as
|
||||
$(AS) -o $(UNITTARGETDIRPREFIX)dllprt0$(OEXT) $(CPU_TARGET)/dllprt0.as
|
||||
|
||||
#
|
||||
# System Units (System, Objpas, Strings)
|
||||
#
|
||||
|
1
rtl/netbsd/i386/dllprt0.as
Normal file
1
rtl/netbsd/i386/dllprt0.as
Normal file
@ -0,0 +1 @@
|
||||
.include "i386/cprt0.as"
|
52
rtl/netbsd/x86_64/dllprt0.as
Normal file
52
rtl/netbsd/x86_64/dllprt0.as
Normal file
@ -0,0 +1,52 @@
|
||||
.file "crt0.c"
|
||||
.globl __progname
|
||||
.section .rodata
|
||||
.LC0:
|
||||
.string ""
|
||||
.data
|
||||
.align 8
|
||||
.type __progname, @object
|
||||
.size __progname, 8
|
||||
__progname:
|
||||
.quad .LC0
|
||||
.text
|
||||
.p2align 2,0x90
|
||||
|
||||
.globl _haltproc
|
||||
.type _haltproc,@function
|
||||
|
||||
_haltproc:
|
||||
movq $1,%rax
|
||||
movzwq operatingsystem_result(%rip),%rbx
|
||||
pushq %rbx
|
||||
call .Lactualsyscall
|
||||
addq $8,%rsp
|
||||
jmp _haltproc
|
||||
|
||||
.Lactualsyscall:
|
||||
int $0x80
|
||||
jb .LErrorcode
|
||||
xor %rbx,%rbx
|
||||
ret
|
||||
.LErrorcode:
|
||||
movl %eax, %edi
|
||||
|
||||
# This section is needed for NetBSD to recognize a NetBSD binary as such.
|
||||
# otherwise it will be startup in Linux emulation mode.
|
||||
|
||||
.section ".note.netbsd.ident","a"
|
||||
.p2align 2
|
||||
|
||||
.long 7
|
||||
.long 4
|
||||
# ELF NOTE TYPE NETBSD TAG
|
||||
.long 1
|
||||
.ascii "NetBSD\0\0"
|
||||
.long 199905
|
||||
|
||||
.comm environ,8,8
|
||||
.comm __progname_storage,256,32
|
||||
.comm operatingsystem_parameter_envp,8,8
|
||||
.comm operatingsystem_parameter_argc,8,8
|
||||
.comm operatingsystem_parameter_argv,8,8
|
||||
|
Loading…
Reference in New Issue
Block a user