[kernel] Run global constructors
Look up the global constructor list that the linker outputs, and run them all. Required creation of the `kutil::no_construct` template for objects that are constructed before the global constructors are run. Also split the `memory_initialize` function into two - one for just those objects that need to happen before the global ctors, and one after. Tags: memory c++
This commit is contained in:
@@ -20,6 +20,12 @@ SECTIONS
|
||||
*(.rodata)
|
||||
}
|
||||
|
||||
.ctors : ALIGN(8) {
|
||||
__ctors = .;
|
||||
KEEP(*(.ctors))
|
||||
__ctors_end = .;
|
||||
}
|
||||
|
||||
.bss ALIGN(4096) : {
|
||||
__bss_start = .;
|
||||
*(.bss)
|
||||
|
||||
Reference in New Issue
Block a user