瀏覽代碼

* converted the openbsd_ident.as loader to pascal

git-svn-id: trunk@41710 -
nickysn 6 年之前
父節點
當前提交
d8f79c7363

+ 2 - 2
.gitattributes

@@ -10248,7 +10248,7 @@ 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/dllprt0.as svneol=native#text/plain
-rtl/openbsd/i386/openbsd_ident.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
 rtl/openbsd/i386/si_dll.inc svneol=native#text/plain
@@ -10284,7 +10284,7 @@ rtl/openbsd/x86_64/cprt0.as svneol=native#text/plain
 rtl/openbsd/x86_64/crt0.s svneol=native#text/plain
 rtl/openbsd/x86_64/dllprt0.as svneol=native#text/plain
 rtl/openbsd/x86_64/gprt0.as svneol=native#text/plain
-rtl/openbsd/x86_64/openbsd_ident.as svneol=native#text/plain
+rtl/openbsd/x86_64/openbsd_ident.inc svneol=native#text/plain
 rtl/openbsd/x86_64/prt0.as svneol=native#text/plain
 rtl/openbsd/x86_64/si_c.inc svneol=native#text/plain
 rtl/openbsd/x86_64/si_dll.inc svneol=native#text/plain

+ 4 - 6
rtl/openbsd/Makefile

@@ -355,7 +355,7 @@ override FPCOPT+=-Ur
 endif
 CPU_UNITS=
 SYSINIT_UNITS=
-LOADERS=prt0 cprt0 dllprt0 openbsd_ident
+LOADERS=prt0 cprt0 dllprt0
 ifeq ($(ARCH),x86_64)
 CPU_UNITS=x86 ports cpu
 SYSINIT_UNITS=si_prc si_c si_dll
@@ -3265,13 +3265,11 @@ 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
-openbsd_ident$(OEXT) : $(CPU_TARGET)/openbsd_ident.as
-	$(AS) -o $(UNITTARGETDIRPREFIX)openbsd_ident$(OEXT) $(CPU_TARGET)/openbsd_ident.as
-si_prc$(PPUEXT) : si_prc.pp si_intf.inc $(ARCH)/si_prc.inc $(SYSTEMUNIT)$(PPUEXT)
+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 $(ARCH)/si_c.inc $(SYSTEMUNIT)$(PPUEXT)
+si_c$(PPUEXT) : si_c.pp si_intf.inc si_impl.inc $(ARCH)/openbsd_ident.inc $(ARCH)/si_c.inc $(SYSTEMUNIT)$(PPUEXT)
 	$(COMPILER) $<
-si_dll$(PPUEXT) : si_dll.pp si_intf.inc $(ARCH)/si_dll.inc $(SYSTEMUNIT)$(PPUEXT)
+si_dll$(PPUEXT) : si_dll.pp si_intf.inc si_impl.inc $(ARCH)/openbsd_ident.inc $(ARCH)/si_dll.inc $(SYSTEMUNIT)$(PPUEXT)
 	$(COMPILER) $<
 $(SYSTEMUNIT)$(PPUEXT) : $(BSDINC)/$(SYSTEMUNIT).pp sysconst.inc systypes.inc syscalls.inc $(SYSDEPS)
 	$(COMPILER) $(FPC_SYSTEM_OPT) -Us -Sg $(BSDINC)/$(SYSTEMUNIT).pp

+ 4 - 7
rtl/openbsd/Makefile.fpc

@@ -85,7 +85,7 @@ endif
 CPU_UNITS=
 SYSINIT_UNITS=
 
-LOADERS=prt0 cprt0 dllprt0 openbsd_ident
+LOADERS=prt0 cprt0 dllprt0
 
 ifeq ($(ARCH),x86_64)
 CPU_UNITS=x86 ports cpu
@@ -141,20 +141,17 @@ cprt0$(OEXT) : $(CPU_TARGET)/cprt0.as
 dllprt0$(OEXT) : $(CPU_TARGET)/dllprt0.as
         $(AS) -o $(UNITTARGETDIRPREFIX)dllprt0$(OEXT) $(CPU_TARGET)/dllprt0.as
 
-openbsd_ident$(OEXT) : $(CPU_TARGET)/openbsd_ident.as
-        $(AS) -o $(UNITTARGETDIRPREFIX)openbsd_ident$(OEXT) $(CPU_TARGET)/openbsd_ident.as
-
 
 #
 # $(SYSINIT_UNITS) Units
 #
-si_prc$(PPUEXT) : si_prc.pp si_intf.inc $(ARCH)/si_prc.inc $(SYSTEMUNIT)$(PPUEXT)
+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 $(ARCH)/si_c.inc $(SYSTEMUNIT)$(PPUEXT)
+si_c$(PPUEXT) : si_c.pp si_intf.inc si_impl.inc $(ARCH)/openbsd_ident.inc $(ARCH)/si_c.inc $(SYSTEMUNIT)$(PPUEXT)
 	$(COMPILER) $<
 
-si_dll$(PPUEXT) : si_dll.pp si_intf.inc $(ARCH)/si_dll.inc $(SYSTEMUNIT)$(PPUEXT)
+si_dll$(PPUEXT) : si_dll.pp si_intf.inc si_impl.inc $(ARCH)/openbsd_ident.inc $(ARCH)/si_dll.inc $(SYSTEMUNIT)$(PPUEXT)
 	$(COMPILER) $<
 
 

+ 0 - 7
rtl/openbsd/i386/openbsd_ident.as

@@ -1,7 +0,0 @@
-	.section ".note.openbsd.ident", "a"
-	.p2align 2
-	.long	8
-	.long	4
-	.long	1
-	.ascii "OpenBSD\0"
-	.long	0

+ 14 - 0
rtl/openbsd/i386/openbsd_ident.inc

@@ -0,0 +1,14 @@
+{$asmmode gas}
+
+procedure OpenBSDIdentTag;nostackframe;assembler;
+  asm
+    .section ".note.openbsd.ident", "a"
+    .p2align 2
+    .long    8
+    .long    4
+    .long    1
+    .asciz   "OpenBSD"
+    .long    0
+
+    .text
+  end;

+ 3 - 1
rtl/openbsd/si_impl.inc

@@ -12,7 +12,9 @@
 
  **********************************************************************}
 
-{$LINK openbsd_ident}
+{$IFNDEF VER3_0}
+  {$I openbsd_ident.inc}
+{$ENDIF VER3_0}
 
 procedure PascalMain; external name 'PASCALMAIN';
 

+ 0 - 7
rtl/openbsd/x86_64/openbsd_ident.as

@@ -1,7 +0,0 @@
-	.section ".note.openbsd.ident", "a"
-	.p2align 2
-	.long	8
-	.long	4
-	.long	1
-	.ascii "OpenBSD\0"
-	.long	0

+ 14 - 0
rtl/openbsd/x86_64/openbsd_ident.inc

@@ -0,0 +1,14 @@
+{$asmmode gas}
+
+procedure OpenBSDIdentTag;nostackframe;assembler;
+  asm
+    .section ".note.openbsd.ident", "a"
+    .p2align 2
+    .long    8
+    .long    4
+    .long    1
+    .asciz   "OpenBSD"
+    .long    0
+
+    .text
+  end;