mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2024-11-26 17:40:27 +00:00
233ea7eb1d
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 :)
34 lines
358 B
Text
34 lines
358 B
Text
ENTRY(start)
|
|
|
|
SECTIONS
|
|
{
|
|
. = 0x10000;
|
|
|
|
.text BLOCK(4K) : ALIGN(4K)
|
|
{
|
|
Arch/i386/Boot/boot.ao
|
|
*(.multiboot)
|
|
*(.text)
|
|
*(.text.startup)
|
|
}
|
|
|
|
.rodata BLOCK(4K) : ALIGN(4K)
|
|
{
|
|
start_ctors = .;
|
|
*(.ctors)
|
|
end_ctors = .;
|
|
|
|
*(.rodata)
|
|
}
|
|
|
|
.data BLOCK(4K) : ALIGN(4K)
|
|
{
|
|
*(.data)
|
|
}
|
|
|
|
.bss BLOCK(4K) : ALIGN(4K)
|
|
{
|
|
*(COMMON)
|
|
*(.bss)
|
|
}
|
|
}
|