diff options
author | Tom <tomut@yahoo.com> | 2020-08-10 09:44:35 -0600 |
---|---|---|
committer | Andreas Kling <kling@serenityos.org> | 2020-08-10 20:05:18 +0200 |
commit | 08ff25f4efeb3a676d9607b440b12915c94bf060 (patch) | |
tree | 9fb9dc86444806fbec1e518ba8311a17d655c743 /Kernel/linker.ld | |
parent | de5e5429307e62a6e4ae7980d383c749a66b167f (diff) | |
download | serenity-08ff25f4efeb3a676d9607b440b12915c94bf060.zip |
Kernel: Invoke heap constructors separately early on
By having a separate list of constructors for the kernel heap
code, we can properly use constructors without re-running them
after the heap was already initialized. This solves some problems
where values were wiped out because they were overwritten by
running their constructors later in the initialization process.
Diffstat (limited to 'Kernel/linker.ld')
-rw-r--r-- | Kernel/linker.ld | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/Kernel/linker.ld b/Kernel/linker.ld index ce3e125db4..73ebbbd4de 100644 --- a/Kernel/linker.ld +++ b/Kernel/linker.ld @@ -18,6 +18,10 @@ SECTIONS .rodata ALIGN(4K) : AT (ADDR(.rodata) - 0xc0000000) { + start_heap_ctors = .; + *libkernel_heap.a:*(.ctors) + end_heap_ctors = .; + start_ctors = .; *(.ctors) end_ctors = .; |