From 16abd6aa13814741abe1cbddd1fb53390f365cd3 Mon Sep 17 00:00:00 2001 From: nickysn Date: Thu, 14 Mar 2019 18:06:24 +0000 Subject: [PATCH] + added loader openbsd_ident.as, containing only the .note.openbsd.ident section, required by OpenBSD to identify the ELF binary as OpenBSD-native git-svn-id: trunk@41702 - --- .gitattributes | 2 ++ rtl/openbsd/Makefile | 4 +++- rtl/openbsd/Makefile.fpc | 5 ++++- rtl/openbsd/i386/openbsd_ident.as | 7 +++++++ rtl/openbsd/x86_64/openbsd_ident.as | 7 +++++++ 5 files changed, 23 insertions(+), 2 deletions(-) create mode 100644 rtl/openbsd/i386/openbsd_ident.as create mode 100644 rtl/openbsd/x86_64/openbsd_ident.as diff --git a/.gitattributes b/.gitattributes index 51214dbcfc..c8a957c9f7 100644 --- a/.gitattributes +++ b/.gitattributes @@ -10248,6 +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/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 @@ -10283,6 +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/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 diff --git a/rtl/openbsd/Makefile b/rtl/openbsd/Makefile index 73eea5bca2..d1f35f3569 100644 --- a/rtl/openbsd/Makefile +++ b/rtl/openbsd/Makefile @@ -355,7 +355,7 @@ override FPCOPT+=-Ur endif CPU_UNITS= SYSINIT_UNITS= -LOADERS=prt0 cprt0 dllprt0 +LOADERS=prt0 cprt0 dllprt0 openbsd_ident ifeq ($(ARCH),x86_64) CPU_UNITS=x86 ports cpu SYSINIT_UNITS=si_prc si_c si_dll @@ -3265,6 +3265,8 @@ 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) $(COMPILER) $< si_c$(PPUEXT) : si_c.pp si_intf.inc $(ARCH)/si_c.inc $(SYSTEMUNIT)$(PPUEXT) diff --git a/rtl/openbsd/Makefile.fpc b/rtl/openbsd/Makefile.fpc index ebf838e7f2..1adb884557 100644 --- a/rtl/openbsd/Makefile.fpc +++ b/rtl/openbsd/Makefile.fpc @@ -85,7 +85,7 @@ endif CPU_UNITS= SYSINIT_UNITS= -LOADERS=prt0 cprt0 dllprt0 +LOADERS=prt0 cprt0 dllprt0 openbsd_ident ifeq ($(ARCH),x86_64) CPU_UNITS=x86 ports cpu @@ -141,6 +141,9 @@ 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 diff --git a/rtl/openbsd/i386/openbsd_ident.as b/rtl/openbsd/i386/openbsd_ident.as new file mode 100644 index 0000000000..49707a6f45 --- /dev/null +++ b/rtl/openbsd/i386/openbsd_ident.as @@ -0,0 +1,7 @@ + .section ".note.openbsd.ident", "a" + .p2align 2 + .long 8 + .long 4 + .long 1 + .ascii "OpenBSD\0" + .long 0 diff --git a/rtl/openbsd/x86_64/openbsd_ident.as b/rtl/openbsd/x86_64/openbsd_ident.as new file mode 100644 index 0000000000..49707a6f45 --- /dev/null +++ b/rtl/openbsd/x86_64/openbsd_ident.as @@ -0,0 +1,7 @@ + .section ".note.openbsd.ident", "a" + .p2align 2 + .long 8 + .long 4 + .long 1 + .ascii "OpenBSD\0" + .long 0