aboutsummaryrefslogtreecommitdiff
path: root/linker.ld
diff options
context:
space:
mode:
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 = .;
}