From b6d2ef12ad295d302e263bb542a711db2c7d7af3 Mon Sep 17 00:00:00 2001 From: nickysn Date: Fri, 22 Mar 2019 01:08:37 +0000 Subject: [PATCH] - removed OpenBSD loaders that are not needed for bootstrapping with FPC 3.0.4 git-svn-id: trunk@41765 - --- .gitattributes | 4 - rtl/openbsd/Makefile | 5 +- rtl/openbsd/Makefile.fpc | 5 +- rtl/openbsd/i386/dllprt0.as | 209 --------------------------- rtl/openbsd/x86_64/crt0.s | 209 --------------------------- rtl/openbsd/x86_64/dllprt0.as | 256 ---------------------------------- rtl/openbsd/x86_64/gprt0.as | 244 -------------------------------- 7 files changed, 3 insertions(+), 929 deletions(-) delete mode 100644 rtl/openbsd/i386/dllprt0.as delete mode 100644 rtl/openbsd/x86_64/crt0.s delete mode 100644 rtl/openbsd/x86_64/dllprt0.as delete mode 100644 rtl/openbsd/x86_64/gprt0.as diff --git a/.gitattributes b/.gitattributes index c3bdfa89de..f6372a9c0f 100644 --- a/.gitattributes +++ b/.gitattributes @@ -10247,7 +10247,6 @@ 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/dllprt0.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 @@ -10283,9 +10282,6 @@ rtl/openbsd/unxfunc.inc svneol=native#text/plain rtl/openbsd/unxsysc.inc svneol=native#text/plain rtl/openbsd/x86_64/bsyscall.inc svneol=native#text/plain 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.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 diff --git a/rtl/openbsd/Makefile b/rtl/openbsd/Makefile index d748e9c366..1892ac6ed6 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 ifeq ($(ARCH),x86_64) CPU_UNITS=x86 ports cpu SYSINIT_UNITS=si_prc si_c si_dll si_g @@ -3104,6 +3104,7 @@ ifdef CLEAN_FILES -$(DEL) $(CLEAN_FILES) endif -$(DELTREE) units + -$(DELTREE) bin -$(DEL) *$(OEXT) *$(PPUEXT) *$(RSTEXT) *$(ASMEXT) *$(STATICLIBEXT) *$(SHAREDLIBEXT) *$(PPLEXT) ifneq ($(PPUEXT),.ppu) -$(DEL) *.o *.ppu *.a @@ -3263,8 +3264,6 @@ 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 -dllprt0$(OEXT) : $(CPU_TARGET)/dllprt0.as - $(AS) -o $(UNITTARGETDIRPREFIX)dllprt0$(OEXT) $(CPU_TARGET)/dllprt0.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) diff --git a/rtl/openbsd/Makefile.fpc b/rtl/openbsd/Makefile.fpc index 99041f5ed1..98436b7e6f 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 ifeq ($(ARCH),x86_64) CPU_UNITS=x86 ports cpu @@ -138,9 +138,6 @@ 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 - # # $(SYSINIT_UNITS) Units diff --git a/rtl/openbsd/i386/dllprt0.as b/rtl/openbsd/i386/dllprt0.as deleted file mode 100644 index 5c6c1ae60e..0000000000 --- a/rtl/openbsd/i386/dllprt0.as +++ /dev/null @@ -1,209 +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.: - .globl __progname - .section .rodata -.LC0: - .string "" - .section .data.rel.local,"aw",@progbits - .align 4 - .type __progname, @object - .size __progname, 4 -__progname: - .long .LC0 -#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 - .globl ___start - .type ___start, @function -___start: - pushl %ebp - movl %esp, %ebp - pushl %ebx - subl $36, %esp - call __i686.get_pc_thunk.bx - addl $_GLOBAL_OFFSET_TABLE_, %ebx - movl environ@GOT(%ebx), %edx - movl 16(%ebp), %eax - movl %eax, (%edx) - movl operatingsystem_parameter_envp@GOT(%ebx), %edx - movl 16(%ebp), %eax - movl %eax, (%edx) - movl operatingsystem_parameter_argc@GOT(%ebx), %edx - movl 8(%ebp), %eax - movl %eax, (%edx) - movl operatingsystem_parameter_argv@GOT(%ebx), %edx - movl 12(%ebp), %eax - movl %eax, (%edx) - movl 12(%ebp), %eax - movl (%eax), %eax - movl %eax, -8(%ebp) - cmpl $0, -8(%ebp) - je .L2 - movl $47, 4(%esp) - movl -8(%ebp), %eax - movl %eax, (%esp) - call _strrchr - movl %eax, %edx - movl __progname@GOT(%ebx), %eax - movl %edx, (%eax) - movl __progname@GOT(%ebx), %eax - movl (%eax), %eax - testl %eax, %eax - jne .L4 - movl __progname@GOT(%ebx), %edx - movl -8(%ebp), %eax - movl %eax, (%edx) - jmp .L6 -.L4: - movl __progname@GOT(%ebx), %eax - movl (%eax), %eax - leal 1(%eax), %edx - movl __progname@GOT(%ebx), %eax - movl %edx, (%eax) -.L6: - movl __progname_storage@GOT(%ebx), %eax - movl %eax, -12(%ebp) - jmp .L7 -.L8: - movl __progname@GOT(%ebx), %eax - movl (%eax), %ecx - movzbl (%ecx), %edx - movl -12(%ebp), %eax - movb %dl, (%eax) - addl $1, -12(%ebp) - leal 1(%ecx), %edx - movl __progname@GOT(%ebx), %eax - movl %edx, (%eax) -.L7: - movl __progname@GOT(%ebx), %eax - movl (%eax), %eax - movzbl (%eax), %eax - testb %al, %al - je .L9 - movl __progname_storage@GOT(%ebx), %eax - leal 255(%eax), %eax - cmpl %eax, -12(%ebp) - jb .L8 -.L9: - movl -12(%ebp), %eax - movb $0, (%eax) - movl __progname@GOT(%ebx), %edx - movl __progname_storage@GOT(%ebx), %eax - movl %eax, (%edx) -.L2: - call __init@PLT - movl environ@GOT(%ebx), %eax - movl (%eax), %eax - movl %eax, 8(%esp) - movl 12(%ebp), %eax - movl %eax, 4(%esp) - movl 8(%ebp), %eax - movl %eax, (%esp) - call main@PLT -# pushl environ -# pushl %esi -# pushl 8(%ebp) - finit - fwait - fldcw ___fpucw - xorl %ebp,%ebp - call main - pushl %eax - call exit - .p2align 2,0x90 - -# movl %eax, (%esp) -# call exit@PLT - .size ___start, .-___start - -.globl _haltproc -.type _haltproc,@function - -_haltproc: - mov $1,%eax - call __i686.get_pc_thunk.bx - addl $_GLOBAL_OFFSET_TABLE_, %ebx - movl operatingsystem_result@GOT(%ebx), %esi - movzwl (%esi),%edx - pushl %edx - call .Lactualsyscall - addl $4,%esp - jmp _haltproc - -.Lactualsyscall: - int $0x80 - jb .LErrorcode - xor %ebx,%ebx - ret -.LErrorcode: - mov %eax,%ebx - mov $-1,%eax - ret - .type _strrchr, @function -_strrchr: - pushl %ebp - movl %esp, %ebp - subl $12, %esp - movl 12(%ebp), %eax - movb %al, -9(%ebp) - movl $0, -4(%ebp) -.L13: - movl 8(%ebp), %edx - movzbl (%edx), %eax - cmpb -9(%ebp), %al - jne .L14 - movl 8(%ebp), %eax - movl %eax, -4(%ebp) -.L14: - movl 8(%ebp), %edx - movzbl (%edx), %eax - testb %al, %al - jne .L16 - movl -4(%ebp), %eax - movl %eax, -8(%ebp) - jmp .L12 -.L16: - addl $1, 8(%ebp) - jmp .L13 -.L12: - movl -8(%ebp), %eax - leave - ret - .size _strrchr, .-_strrchr - .comm environ,4,4 - .comm operatingsystem_parameter_envp,4,4 - .comm operatingsystem_parameter_argc,4,4 - .comm operatingsystem_parameter_argv,4,4 - .comm __progname_storage,256,32 - .ident "GCC: (GNU) 4.2.1 20070719 " - .section .gnu.linkonce.t.__i686.get_pc_thunk.bx,"ax",@progbits - .globl __i686.get_pc_thunk.bx - .hidden __i686.get_pc_thunk.bx - .type __i686.get_pc_thunk.bx, @function -__i686.get_pc_thunk.bx: - movl (%esp), %ebx - ret diff --git a/rtl/openbsd/x86_64/crt0.s b/rtl/openbsd/x86_64/crt0.s deleted file mode 100644 index c841c0d2b5..0000000000 --- a/rtl/openbsd/x86_64/crt0.s +++ /dev/null @@ -1,209 +0,0 @@ - .file "crt0.c" - .globl __progname - .section .rodata -.LC0: - .string "" - .section .data.rel.local,"aw",@progbits - .align 8 - .type __progname, @object - .size __progname, 8 -__progname: - .quad .LC0 -#APP - .text ; .align 8 ; .globl __start ; .globl _start ;_start: ;__start: ; movq %rbx,%r9 ; movq %rcx,%r8 ; movq %rdx,%rcx ; movq (%rsp),%rdi ; leaq 16(%rsp,%rdi,8),%rdx ; leaq 8(%rsp),%rsi ; subq $8,%rsp ; andq $~15,%rsp ; addq $8,%rsp ; jmp ___start ; -#NO_APP - .text - .globl ___start - .type ___start, @function -___start: -.LFB9: - pushq %rbp -.LCFI0: - movq %rsp, %rbp -.LCFI1: - subq $64, %rsp -.LCFI2: - movl %edi, -20(%rbp) - movq %rsi, -32(%rbp) - movq %rdx, -40(%rbp) - movq %rcx, -48(%rbp) - movq %r8, -56(%rbp) - movq %r9, -64(%rbp) - movq environ@GOTPCREL(%rip), %rdx - movq -40(%rbp), %rax - movq %rax, (%rdx) - movq operatingsystem_parameter_envp@GOTPCREL(%rip), %rdx - movq -40(%rbp), %rax - movq %rax, (%rdx) - movl -20(%rbp), %eax - movslq %eax,%rdx - movq operatingsystem_parameter_argc@GOTPCREL(%rip), %rax - movq %rdx, (%rax) - movq operatingsystem_parameter_argv@GOTPCREL(%rip), %rdx - movq -32(%rbp), %rax - movq %rax, (%rdx) - movq -32(%rbp), %rax - movq (%rax), %rax - movq %rax, -8(%rbp) - cmpq $0, -8(%rbp) - je .L2 - movq -8(%rbp), %rdi - movl $47, %esi - call _strrchr - movq %rax, %rdx - movq __progname@GOTPCREL(%rip), %rax - movq %rdx, (%rax) - movq __progname@GOTPCREL(%rip), %rax - movq (%rax), %rax - testq %rax, %rax - jne .L4 - movq __progname@GOTPCREL(%rip), %rdx - movq -8(%rbp), %rax - movq %rax, (%rdx) - jmp .L6 -.L4: - movq __progname@GOTPCREL(%rip), %rax - movq (%rax), %rax - leaq 1(%rax), %rdx - movq __progname@GOTPCREL(%rip), %rax - movq %rdx, (%rax) -.L6: - movq __progname_storage@GOTPCREL(%rip), %rax - movq %rax, -16(%rbp) - jmp .L7 -.L8: - movq __progname@GOTPCREL(%rip), %rax - movq (%rax), %rcx - movzbl (%rcx), %edx - movq -16(%rbp), %rax - movb %dl, (%rax) - addq $1, -16(%rbp) - leaq 1(%rcx), %rdx - movq __progname@GOTPCREL(%rip), %rax - movq %rdx, (%rax) -.L7: - movq __progname@GOTPCREL(%rip), %rax - movq (%rax), %rax - movzbl (%rax), %eax - testb %al, %al - je .L9 - movq __progname_storage@GOTPCREL(%rip), %rax - leaq 255(%rax), %rax - cmpq %rax, -16(%rbp) - jb .L8 -.L9: - movq -16(%rbp), %rax - movb $0, (%rax) - movq __progname@GOTPCREL(%rip), %rdx - movq __progname_storage@GOTPCREL(%rip), %rax - movq %rax, (%rdx) -.L2: - movl $0, %eax - call __init@PLT - movq environ@GOTPCREL(%rip), %rax - movq (%rax), %rdx - movq -32(%rbp), %rsi - movl -20(%rbp), %edi - movl $0, %eax - call main@PLT - movl %eax, %edi - call exit@PLT -.LFE9: - .size ___start, .-___start - .type _strrchr, @function -_strrchr: -.LFB10: - pushq %rbp -.LCFI3: - movq %rsp, %rbp -.LCFI4: - movq %rdi, -24(%rbp) - movb %sil, -25(%rbp) - movq $0, -8(%rbp) -.L13: - movq -24(%rbp), %rdx - movzbl (%rdx), %eax - cmpb -25(%rbp), %al - jne .L14 - movq -24(%rbp), %rax - movq %rax, -8(%rbp) -.L14: - movq -24(%rbp), %rdx - movzbl (%rdx), %eax - testb %al, %al - jne .L16 - movq -8(%rbp), %rax - movq %rax, -16(%rbp) - jmp .L12 -.L16: - addq $1, -24(%rbp) - jmp .L13 -.L12: - movq -16(%rbp), %rax - leave - ret -.LFE10: - .size _strrchr, .-_strrchr - .comm environ,8,8 - .comm operatingsystem_parameter_envp,8,8 - .comm operatingsystem_parameter_argc,8,8 - .comm operatingsystem_parameter_argv,8,8 - .comm __progname_storage,256,32 - .section .eh_frame,"a",@progbits -.Lframe1: - .long .LECIE1-.LSCIE1 -.LSCIE1: - .long 0x0 - .byte 0x1 - .string "zR" - .uleb128 0x1 - .sleb128 -8 - .byte 0x10 - .uleb128 0x1 - .byte 0x1b - .byte 0xc - .uleb128 0x7 - .uleb128 0x8 - .byte 0x90 - .uleb128 0x1 - .align 8 -.LECIE1: -.LSFDE1: - .long .LEFDE1-.LASFDE1 -.LASFDE1: - .long .LASFDE1-.Lframe1 - .long .LFB9-. - .long .LFE9-.LFB9 - .uleb128 0x0 - .byte 0x4 - .long .LCFI0-.LFB9 - .byte 0xe - .uleb128 0x10 - .byte 0x86 - .uleb128 0x2 - .byte 0x4 - .long .LCFI1-.LCFI0 - .byte 0xd - .uleb128 0x6 - .align 8 -.LEFDE1: -.LSFDE3: - .long .LEFDE3-.LASFDE3 -.LASFDE3: - .long .LASFDE3-.Lframe1 - .long .LFB10-. - .long .LFE10-.LFB10 - .uleb128 0x0 - .byte 0x4 - .long .LCFI3-.LFB10 - .byte 0xe - .uleb128 0x10 - .byte 0x86 - .uleb128 0x2 - .byte 0x4 - .long .LCFI4-.LCFI3 - .byte 0xd - .uleb128 0x6 - .align 8 -.LEFDE3: - .ident "GCC: (GNU) 4.2.1 20070719 " diff --git a/rtl/openbsd/x86_64/dllprt0.as b/rtl/openbsd/x86_64/dllprt0.as deleted file mode 100644 index d4febf48a0..0000000000 --- a/rtl/openbsd/x86_64/dllprt0.as +++ /dev/null @@ -1,256 +0,0 @@ - .section ".note.openbsd.ident", "a" - .p2align 2 - .long 8 - .long 4 - .long 1 - .ascii "OpenBSD\0" - .long 0 - .previous - .file "crt0.c" - .globl __progname - .section .rodata -.LC0: - .string "" - .section .data.rel.local,"aw",@progbits - .align 8 - .type __progname, @object - .size __progname, 8 -__progname: - .quad .LC0 -#APP - .text - .align 8 - .globl __start - .globl _start -_start: -__start: - movq %rbx,%r9 - movq %rcx,%r8 - movq %rdx,%rcx - movq (%rsp),%rdi - leaq 16(%rsp,%rdi,8),%rdx - leaq 8(%rsp),%rsi - subq $8,%rsp - andq $~15,%rsp - addq $8,%rsp - jmp ___start -#NO_APP - .text - .globl ___start - .type ___start, @function -___start: -.LFB9: - pushq %rbp -.LCFI0: - movq %rsp, %rbp -.LCFI1: - subq $64, %rsp -.LCFI2: - movl %edi, -20(%rbp) - movq %rsi, -32(%rbp) - movq %rdx, -40(%rbp) - movq %rcx, -48(%rbp) - movq %r8, -56(%rbp) - movq %r9, -64(%rbp) - movq environ@GOTPCREL(%rip), %rdx - movq -40(%rbp), %rax - movq %rax, (%rdx) - movq operatingsystem_parameter_envp@GOTPCREL(%rip), %rdx - movq -40(%rbp), %rax - movq %rax, (%rdx) - movl -20(%rbp), %eax - movslq %eax,%rdx - movq operatingsystem_parameter_argc@GOTPCREL(%rip), %rax - movq %rdx, (%rax) - movq operatingsystem_parameter_argv@GOTPCREL(%rip), %rdx - movq -32(%rbp), %rax - movq %rax, (%rdx) - movq -32(%rbp), %rax - movq (%rax), %rax - movq %rax, -8(%rbp) - cmpq $0, -8(%rbp) - je .L2 - movq -8(%rbp), %rdi - movl $47, %esi - call _strrchr - movq %rax, %rdx - movq __progname@GOTPCREL(%rip), %rax - movq %rdx, (%rax) - movq __progname@GOTPCREL(%rip), %rax - movq (%rax), %rax - testq %rax, %rax - jne .L4 - movq __progname@GOTPCREL(%rip), %rdx - movq -8(%rbp), %rax - movq %rax, (%rdx) - jmp .L6 -.L4: - movq __progname@GOTPCREL(%rip), %rax - movq (%rax), %rax - leaq 1(%rax), %rdx - movq __progname@GOTPCREL(%rip), %rax - movq %rdx, (%rax) -.L6: - movq __progname_storage@GOTPCREL(%rip), %rax - movq %rax, -16(%rbp) - jmp .L7 -.L8: - movq __progname@GOTPCREL(%rip), %rax - movq (%rax), %rcx - movzbl (%rcx), %edx - movq -16(%rbp), %rax - movb %dl, (%rax) - addq $1, -16(%rbp) - leaq 1(%rcx), %rdx - movq __progname@GOTPCREL(%rip), %rax - movq %rdx, (%rax) -.L7: - movq __progname@GOTPCREL(%rip), %rax - movq (%rax), %rax - movzbl (%rax), %eax - testb %al, %al - je .L9 - movq __progname_storage@GOTPCREL(%rip), %rax - leaq 255(%rax), %rax - cmpq %rax, -16(%rbp) - jb .L8 -.L9: - movq -16(%rbp), %rax - movb $0, (%rax) - movq __progname@GOTPCREL(%rip), %rdx - movq __progname_storage@GOTPCREL(%rip), %rax - movq %rax, (%rdx) -.L2: - movl $0, %eax - call _init@PLT - movq environ@GOTPCREL(%rip), %rax - movq (%rax), %rdx - movq -32(%rbp), %rsi - movl -20(%rbp), %edi - movl $0, %eax - call main@PLT - # movl %eax, %edi - # call exit - jmp _haltproc@PLT - .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: - movq %rax,%rbx - movq $-1,%rax - ret - -.LFE9: - .size ___start, .-___start - .type _strrchr, @function -_strrchr: -.LFB10: - pushq %rbp -.LCFI3: - movq %rsp, %rbp -.LCFI4: - movq %rdi, -24(%rbp) - movb %sil, -25(%rbp) - movq $0, -8(%rbp) -.L13: - movq -24(%rbp), %rdx - movzbl (%rdx), %eax - cmpb -25(%rbp), %al - jne .L14 - movq -24(%rbp), %rax - movq %rax, -8(%rbp) -.L14: - movq -24(%rbp), %rdx - movzbl (%rdx), %eax - testb %al, %al - jne .L16 - movq -8(%rbp), %rax - movq %rax, -16(%rbp) - jmp .L12 -.L16: - addq $1, -24(%rbp) - jmp .L13 -.L12: - movq -16(%rbp), %rax - leave - ret -.LFE10: - .size _strrchr, .-_strrchr - .comm environ,8,8 - .comm operatingsystem_parameter_envp,8,8 - .comm operatingsystem_parameter_argc,8,8 - .comm operatingsystem_parameter_argv,8,8 - .comm __progname_storage,256,32 - .section .eh_frame,"a",@progbits -.Lframe1: - .long .LECIE1-.LSCIE1 -.LSCIE1: - .long 0x0 - .byte 0x1 - .string "zR" - .uleb128 0x1 - .sleb128 -8 - .byte 0x10 - .uleb128 0x1 - .byte 0x1b - .byte 0xc - .uleb128 0x7 - .uleb128 0x8 - .byte 0x90 - .uleb128 0x1 - .align 8 -.LECIE1: -.LSFDE1: - .long .LEFDE1-.LASFDE1 -.LASFDE1: - .long .LASFDE1-.Lframe1 - .long .LFB9-. - .long .LFE9-.LFB9 - .uleb128 0x0 - .byte 0x4 - .long .LCFI0-.LFB9 - .byte 0xe - .uleb128 0x10 - .byte 0x86 - .uleb128 0x2 - .byte 0x4 - .long .LCFI1-.LCFI0 - .byte 0xd - .uleb128 0x6 - .align 8 -.LEFDE1: -.LSFDE3: - .long .LEFDE3-.LASFDE3 -.LASFDE3: - .long .LASFDE3-.Lframe1 - .long .LFB10-. - .long .LFE10-.LFB10 - .uleb128 0x0 - .byte 0x4 - .long .LCFI3-.LFB10 - .byte 0xe - .uleb128 0x10 - .byte 0x86 - .uleb128 0x2 - .byte 0x4 - .long .LCFI4-.LCFI3 - .byte 0xd - .uleb128 0x6 - .align 8 -.LEFDE3: - .ident "GCC: (GNU) 4.2.1 20070719 " diff --git a/rtl/openbsd/x86_64/gprt0.as b/rtl/openbsd/x86_64/gprt0.as deleted file mode 100644 index 43fffbacff..0000000000 --- a/rtl/openbsd/x86_64/gprt0.as +++ /dev/null @@ -1,244 +0,0 @@ - .section ".note.openbsd.ident", "a" - .p2align 2 - .long 8 - .long 4 - .long 1 - .ascii "OpenBSD\0" - .long 0 - .previous - .file "crt0.c" - .globl __progname - .section .rodata -.LC0: - .string "" - .data - .align 8 - .type __progname, @object - .size __progname, 8 -__progname: - .quad .LC0 -#APP - .text - .align 8 - .globl __start - .globl _start -_start: -__start: - movq %rbx,%r9 - movq %rcx,%r8 - movq %rdx,%rcx - movq (%rsp),%rdi - leaq 16(%rsp,%rdi,8),%rdx - leaq 8(%rsp),%rsi - subq $8,%rsp - andq $~15,%rsp - addq $8,%rsp - jmp ___start - -#NO_APP - .text - .globl ___start - .type ___start, @function -___start: -.LFB9: - pushq %rbp -.LCFI0: - movq %rsp, %rbp -.LCFI1: - subq $64, %rsp -.LCFI2: - movl %edi, -20(%rbp) - movq %rsi, -32(%rbp) - movq %rdx, -40(%rbp) - movq %rcx, -48(%rbp) - movq %r8, -56(%rbp) - movq %r9, -64(%rbp) - movq -40(%rbp), %rax - movq %rax, environ(%rip) - movq %rax,operatingsystem_parameter_envp - movq -32(%rbp), %rax - movq (%rax), %rax - movq %rax, -8(%rbp) - cmpq $0, -8(%rbp) - je .L2 - movq -8(%rbp), %rdi - movl $47, %esi - call _strrchr - movq %rax, __progname(%rip) - movq __progname(%rip), %rax - testq %rax, %rax - jne .L4 - movq -8(%rbp), %rax - movq %rax, __progname(%rip) - jmp .L6 -.L4: - movq __progname(%rip), %rax - addq $1, %rax - movq %rax, __progname(%rip) -.L6: - movq $__progname_storage, -16(%rbp) - jmp .L7 -.L8: - movq __progname(%rip), %rcx - movzbl (%rcx), %edx - movq -16(%rbp), %rax - movb %dl, (%rax) - addq $1, -16(%rbp) - leaq 1(%rcx), %rax - movq %rax, __progname(%rip) -.L7: - movq __progname(%rip), %rax - movzbl (%rax), %eax - testb %al, %al - je .L9 - movl $__progname_storage+255, %eax - cmpq %rax, -16(%rbp) - jb .L8 -.L9: - movq -16(%rbp), %rax - movb $0, (%rax) - movq $__progname_storage, __progname(%rip) -.L2: - movl $_mcleanup, %edi - call atexit - movl $_etext, %eax - movq %rax, %rsi - movl $_eprol, %eax - movq %rax, %rdi - call monstartup - movl $0, %eax - call __init - movq environ(%rip), %rdx - movq -32(%rbp), %rsi - movl -20(%rbp), %edi - movq %rdi,operatingsystem_parameter_argc - movq %rsi,operatingsystem_parameter_argv - movl $0, %eax - call main - # movl %eax, %edi - # call exit - jmp _haltproc - .p2align 2,0x90 - -.globl _haltproc -.type _haltproc,@function - -_haltproc: - movq $1,%rax - movzwq operatingsystem_result,%rbx - pushq %rbx - call .Lactualsyscall - addq $8,%rsp - jmp _haltproc - -.Lactualsyscall: - int $0x80 - jb .LErrorcode - xor %rbx,%rbx - ret -.LErrorcode: - movq %rax,%rbx - movq $-1,%rax -.LFE9: - .size ___start, .-___start - .type _strrchr, @function -_strrchr: -.LFB10: - pushq %rbp -.LCFI3: - movq %rsp, %rbp -.LCFI4: - movq %rdi, -24(%rbp) - movb %sil, -25(%rbp) - movq $0, -8(%rbp) -.L13: - movq -24(%rbp), %rdx - movzbl (%rdx), %eax - cmpb -25(%rbp), %al - jne .L14 - movq -24(%rbp), %rax - movq %rax, -8(%rbp) -.L14: - movq -24(%rbp), %rdx - movzbl (%rdx), %eax - testb %al, %al - jne .L16 - movq -8(%rbp), %rax - movq %rax, -16(%rbp) - jmp .L12 -.L16: - addq $1, -24(%rbp) - jmp .L13 -.L12: - movq -16(%rbp), %rax - leave - ret -.LFE10: - .size _strrchr, .-_strrchr -#APP - .text - _eprol: -#NO_APP - .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 - .section .eh_frame,"a",@progbits -.Lframe1: - .long .LECIE1-.LSCIE1 -.LSCIE1: - .long 0x0 - .byte 0x1 - .string "zR" - .uleb128 0x1 - .sleb128 -8 - .byte 0x10 - .uleb128 0x1 - .byte 0x3 - .byte 0xc - .uleb128 0x7 - .uleb128 0x8 - .byte 0x90 - .uleb128 0x1 - .align 8 -.LECIE1: -.LSFDE1: - .long .LEFDE1-.LASFDE1 -.LASFDE1: - .long .LASFDE1-.Lframe1 - .long .LFB9 - .long .LFE9-.LFB9 - .uleb128 0x0 - .byte 0x4 - .long .LCFI0-.LFB9 - .byte 0xe - .uleb128 0x10 - .byte 0x86 - .uleb128 0x2 - .byte 0x4 - .long .LCFI1-.LCFI0 - .byte 0xd - .uleb128 0x6 - .align 8 -.LEFDE1: -.LSFDE3: - .long .LEFDE3-.LASFDE3 -.LASFDE3: - .long .LASFDE3-.Lframe1 - .long .LFB10 - .long .LFE10-.LFB10 - .uleb128 0x0 - .byte 0x4 - .long .LCFI3-.LFB10 - .byte 0xe - .uleb128 0x10 - .byte 0x86 - .uleb128 0x2 - .byte 0x4 - .long .LCFI4-.LCFI3 - .byte 0xd - .uleb128 0x6 - .align 8 -.LEFDE3: - .ident "GCC: (GNU) 4.2.1 20070719 "