diff options
| author | Tianhao Wang <shrik3@mailbox.org> | 2024-04-16 13:27:42 +0200 |
|---|---|---|
| committer | Tianhao Wang <shrik3@mailbox.org> | 2024-06-11 15:13:40 +0200 |
| commit | d4f87ec7170103da8b7a23d9547e72898c9bca04 (patch) | |
| tree | 2ad5684924ccfcd40a2d5e0f2e8cd909cf307151 /startup.s | |
| parent | a2284aab8be11c8af0ed35c13f21bcc832380a42 (diff) | |
startup.s: delete c++ related code
in a no-std config, c++ compilers require the several functions to be
provided such as "delete". Also the startup code needs to manually
construct/destruct global objects. Theses are no longer the case for
the rust port.
Diffstat (limited to 'startup.s')
| -rw-r--r-- | startup.s | 53 |
1 files changed, 0 insertions, 53 deletions
@@ -54,10 +54,6 @@ pagetable_end: equ 0x200000 ; functions provided by us [GLOBAL startup] [GLOBAL idt] -[GLOBAL __cxa_pure_virtual] -[GLOBAL _ZdlPv] -[GLOBAL _ZdlPvj] -[GLOBAL _ZdlPvm] ; functions from the C parts of the system [EXTERN _entry] @@ -66,10 +62,6 @@ pagetable_end: equ 0x200000 ; addresses provided by the compiler [EXTERN ___BSS_START__] [EXTERN ___BSS_END__] -[EXTERN __init_array_start] -[EXTERN __init_array_end] -[EXTERN __fini_array_start] -[EXTERN __fini_array_end] [SECTION .text] @@ -219,9 +211,7 @@ clear_bss: ;or rax, 3 << 9 ;set CR4.OSFXSR and CR4.OSXMMEXCPT at the same time ;mov cr4, rax - call _init ; call constructors of global objects call _entry ; call the OS kernel's C / C++ part - call _fini ; call destructors cli ; Usually we should not get here. hlt @@ -378,38 +368,6 @@ reprogram_pics: ret ; -; Run constructors of global objects -; - -_init: - mov rbx, __init_array_start -_init_loop: - cmp rbx, __init_array_end - je _init_done - mov rax, [rbx] - call rax - add rbx, 8 - ja _init_loop -_init_done: - ret - -; -; Run destructors of global objects -; - -_fini: - mov rbx, __fini_array_start -_fini_loop: - cmp rbx, __fini_array_end - je _fini_done - mov rax, [rbx] - call rax - add rbx, 8 - ja _fini_loop -_fini_done: - ret - -; ; Short delay for in/out instructions ; @@ -418,17 +376,6 @@ delay: .L2: ret -; -; Functions for the C++ compiler. These labels must be defined for the linker; -; since OOStuBS does not release/free any memory, they may be empty, however. -; - -__cxa_pure_virtual: ; a "virtual" method without implementation was called -_ZdlPv: ; void operator delete(void*) -_ZdlPvj: ; void operator delete(void*, unsigned int) for g++ 6.x -_ZdlPvm: ; void operator delete(void*, unsigned long) for g++ 6.x - ret - [SECTION .data] ; |
