mirror of
https://github.com/fergalmoran/ladybird.git
synced 2025-12-31 13:48:25 +00:00
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 :)
35 lines
358 B
Plaintext
35 lines
358 B
Plaintext
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)
|
|
}
|
|
}
|