aboutsummaryrefslogtreecommitdiff
path: root/linker.ld
diff options
context:
space:
mode:
authorWojtek Kosior <kwojtus@protonmail.com>2019-12-26 18:21:29 +0100
committerWojtek Kosior <kwojtus@protonmail.com>2019-12-26 18:21:29 +0100
commit93a1c704c99a48803d118f66ac4fe08510fb4b89 (patch)
tree3fc6991345bec979ccae1c68925f47a791a204ae /linker.ld
parent6a5684927d5a6d201b407ff30340307fe9813677 (diff)
downloadrpi-MMU-example-93a1c704c99a48803d118f66ac4fe08510fb4b89.tar.gz
rpi-MMU-example-93a1c704c99a48803d118f66ac4fe08510fb4b89.zip
simplify linker script; rely on initially-zero memory to be included in binary image (no bss zeroing in assembly code)
Diffstat (limited to 'linker.ld')
-rw-r--r--linker.ld36
1 files changed, 7 insertions, 29 deletions
diff --git a/linker.ld b/linker.ld
index 60387bf..ed40054 100644
--- a/linker.ld
+++ b/linker.ld
@@ -18,40 +18,18 @@ SECTIONS
/* For AArch64, use . = 0x80000 */
__start = .;
- __text_start = .;
- .text :
+ .boot :
{
- KEEP(*(.text.boot))
- *(EXCLUDE_FILE (libkernel.o) .text)
+ boot.o
}
- . = ALIGN(4096); /* align to page size */
- __text_end = .;
-
- __rodata_start = .;
- .rodata :
- {
- *(EXCLUDE_FILE (libkernel.o) .rodata)
- }
- . = ALIGN(4096); /* align to page size */
- __rodata_end = .;
-
- __data_start = .;
- .data :
- {
- *(EXCLUDE_FILE (libkernel.o) .data)
- }
- . = ALIGN(4096); /* align to page size */
- __data_end = .;
-
- __bss_start = .;
- .bss :
+ __kernel_start = .;
+ .kernel :
{
- bss = .;
- *(EXCLUDE_FILE (libkernel.o) .bss)
+ *(EXCLUDE_FILE (libkernel.o interrupt_vector.o interrupts.o) *)
}
. = ALIGN(4096); /* align to page size */
- __bss_end = .;
- __bss_size = __bss_end - __bss_start;
+ __kernel_end = .;
+ __kernel_size = __kernel_end - __kernel_start;
/* libkernel */