From 60aba051ffe9778e81a76871c09dab01989dcdf6 Mon Sep 17 00:00:00 2001 From: dbstream Date: Thu, 5 Jan 2023 15:35:08 +0100 Subject: [PATCH] linker: Add a comment regarding .bss placement. --- kernel/linker.ld | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/kernel/linker.ld b/kernel/linker.ld index 3645258..529a4dd 100644 --- a/kernel/linker.ld +++ b/kernel/linker.ld @@ -40,6 +40,10 @@ SECTIONS *(.data .data.*) } :data + /* NOTE: .bss needs to be the last thing mapped to :data, otherwise lots of */ + /* unnecessary zeros will be written to the binary. */ + /* If you need, for example, .init_array and .fini_array, those should be placed */ + /* above this. */ .bss : { *(COMMON) *(.bss .bss.*)