mirror of
https://github.com/RGBCube/serenity
synced 2025-07-27 08:17:35 +00:00
Kernel: Add bare minimum for global constructors (#707)
Add text.startup to the .text block, add .ctors as well. Use them in init.cpp to call global constructors after gtd and idt init. That way any funky constructors should be ok. Also defines some Itanium C++ ABI methods that probably shouldn't be, but without them the linker gets very angry. If the code ever actually tries to use __dso_handle or call __cxa_atexit, there's bigger problems with the kernel. Bit of a hack would be an understatement but hey. It works :)
This commit is contained in:
parent
d0c11bbcc3
commit
233ea7eb1d
2 changed files with 25 additions and 0 deletions
|
@ -9,10 +9,15 @@ SECTIONS
|
|||
Arch/i386/Boot/boot.ao
|
||||
*(.multiboot)
|
||||
*(.text)
|
||||
*(.text.startup)
|
||||
}
|
||||
|
||||
.rodata BLOCK(4K) : ALIGN(4K)
|
||||
{
|
||||
start_ctors = .;
|
||||
*(.ctors)
|
||||
end_ctors = .;
|
||||
|
||||
*(.rodata)
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue