aboutsummaryrefslogtreecommitdiff
path: root/linker.ld
diff options
context:
space:
mode:
authorAqua-sama <aqua@iserlohn-fortress.net>2021-03-10 19:39:30 +0200
committerAqua-sama <aqua@iserlohn-fortress.net>2021-03-10 19:39:30 +0200
commita302ef42887a1a349d9918d5d1471bbea8f59c2b (patch)
treece655d3c31574c6cb77bc437abedf66d32ac9d90 /linker.ld
parentMove elf and iso to builddir (diff)
downloadkernel.cpp-a302ef42887a1a349d9918d5d1471bbea8f59c2b.tar.xz
vmm: display segment map info
Diffstat (limited to 'linker.ld')
-rw-r--r--linker.ld16
1 files changed, 12 insertions, 4 deletions
diff --git a/linker.ld b/linker.ld
index 5ff3b62..e9f1d73 100644
--- a/linker.ld
+++ b/linker.ld
@@ -20,32 +20,40 @@ SECTIONS
. = VADDR_BASE + 1M;
.text ALIGN(4K) : AT(ADDR(.text) - VADDR_BASE) {
+ begin_text = .;
*(.text*)
+ end_text = .;
}
/* Read-only data. */
.rodata ALIGN(4K) : AT(ADDR(.rodata) - VADDR_BASE) {
+ begin_rodata = .;
*(.rodata*)
+ end_rodata = .;
}
/* Read-write data (initialized) */
.data ALIGN(4K) : AT(ADDR(.data) - VADDR_BASE) {
- begin_ctors = .;
- KEEP(*(.init_array)); /* global constructors */
- end_ctors = .;
-
begin_constinit = .;
*(.constinit)
end_constinit = .;
+ begin_ctors = .;
+ KEEP(*(.init_array)); /* global constructors */
+ end_ctors = .;
+
+ begin_data = .;
*(.data)
+ end_data = .;
}
/* Read-write data (uninitialized) and stack */
.bss ALIGN(4K) : AT(ADDR(.bss) - VADDR_BASE) {
+ begin_bss = .;
*(.pages)
*(.bss)
*(.stack)
+ end_bss = .;
}
_kernel_end = .;
}