diff options
Diffstat (limited to 'crt')
-rw-r--r-- | crt/nt32/crte.s | 24 | ||||
-rw-r--r-- | crt/nt32/crti.s | 40 | ||||
-rw-r--r-- | crt/nt64/crte.s | 22 | ||||
-rw-r--r-- | crt/nt64/crti.s | 69 | ||||
-rw-r--r-- | crt/nt64/crtn.s | 15 |
5 files changed, 103 insertions, 67 deletions
diff --git a/crt/nt32/crte.s b/crt/nt32/crte.s index 8f2573d..0f7ef82 100644 --- a/crt/nt32/crte.s +++ b/crt/nt32/crte.s @@ -14,7 +14,25 @@ ___dso_main_routine: .set _dso_main_routine,___dso_main_routine .section .midipix - .long _dso_main_routine .long __so_entry_point - .long __init - .long __fini + .long _dso_main_routine + .long 0 + .long 0 + + # void *reserved[16]; + .long 0x0 + .long 0x1 + .long 0x2 + .long 0x3 + .long 0x4 + .long 0x5 + .long 0x6 + .long 0x7 + .long 0x8 + .long 0x9 + .long 0xa + .long 0xb + .long 0xc + .long 0xd + .long 0xe + .long 0xf diff --git a/crt/nt32/crti.s b/crt/nt32/crti.s index 1b484b0..09e51e0 100644 --- a/crt/nt32/crti.s +++ b/crt/nt32/crti.s @@ -28,14 +28,32 @@ __fini: nop .section .midipix - .ascii "e35ed272" - .ascii "9e55" - .ascii "46c1" - .ascii "8251" - .ascii "022a59e6c480" - .long 0 - .long 1 - .long 0 - .long 0 - .long __CTOR_LIST__ - .long __DTOR_LIST__ + .ascii "e35ed272" + .ascii "9e55" + .ascii "46c1" + .ascii "8251" + .ascii "022a59e6c480" + .long 0 + .long 1 + .long 0 + .long 0 + .long __CTOR_LIST__ + .long __DTOR_LIST__ + + # void *reserved[16]; + .long 0x0 + .long 0x1 + .long 0x2 + .long 0x3 + .long 0x4 + .long 0x5 + .long 0x6 + .long 0x7 + .long 0x8 + .long 0x9 + .long 0xa + .long 0xb + .long 0xc + .long 0xd + .long 0xe + .long 0xf diff --git a/crt/nt64/crte.s b/crt/nt64/crte.s index 118c8e9..152004e 100644 --- a/crt/nt64/crte.s +++ b/crt/nt64/crte.s @@ -14,5 +14,25 @@ __dso_main_routine: .set dso_main_routine,__dso_main_routine .section .midipix - .quad dso_main_routine .quad _so_entry_point + .quad dso_main_routine + .quad 0 + .quad 0 + + # void *reserved[16]; + .quad 0x0 + .quad 0x1 + .quad 0x2 + .quad 0x3 + .quad 0x4 + .quad 0x5 + .quad 0x6 + .quad 0x7 + .quad 0x8 + .quad 0x9 + .quad 0xa + .quad 0xb + .quad 0xc + .quad 0xd + .quad 0xe + .quad 0xf diff --git a/crt/nt64/crti.s b/crt/nt64/crti.s index 44ecc61..9fe0b69 100644 --- a/crt/nt64/crti.s +++ b/crt/nt64/crti.s @@ -1,41 +1,30 @@ -.text -.globl _pei386_runtime_relocator -_pei386_runtime_relocator: - ret - -.globl _init -_init: - jmp .init - -.globl _fini -_fini: - jmp .fini - -.section .init - xor %rax,%rax - push %rax - push %rcx - push %rdx - nop - nop - -.section .fini - xor %rax,%rax - push %rax - push %rcx - push %rdx - nop - nop - .section .midipix - .ascii "e35ed272" - .ascii "9e55" - .ascii "46c1" - .ascii "8251" - .ascii "022a59e6c480" - .long 0 - .long 1 - .long 0 - .long 0 - .quad __CTOR_LIST__ - .quad __DTOR_LIST__ + .ascii "e35ed272" + .ascii "9e55" + .ascii "46c1" + .ascii "8251" + .ascii "022a59e6c480" + .long 0 + .long 1 + .long 0 + .long 0 + .quad __CTOR_LIST__ + .quad __DTOR_LIST__ + + # void *reserved[16]; + .quad 0x0 + .quad 0x1 + .quad 0x2 + .quad 0x3 + .quad 0x4 + .quad 0x5 + .quad 0x6 + .quad 0x7 + .quad 0x8 + .quad 0x9 + .quad 0xa + .quad 0xb + .quad 0xc + .quad 0xd + .quad 0xe + .quad 0xf diff --git a/crt/nt64/crtn.s b/crt/nt64/crtn.s index 6e28aac..5259fd7 100644 --- a/crt/nt64/crtn.s +++ b/crt/nt64/crtn.s @@ -1,15 +1,6 @@ -.section .init - pop %rdx - pop %rcx - pop %r10 - or %r10,%rax - ret - -.section .fini - pop %rdx - pop %rcx - pop %r10 - or %r10,%rax +.text +.globl _pei386_runtime_relocator +_pei386_runtime_relocator: ret .section .got$_pei386_runtime_relocator,"r" |