X-Git-Url: https://pintos-os.org/cgi-bin/gitweb.cgi?a=blobdiff_plain;f=src%2Fthreads%2Fkernel.lds.S;h=6154d08dd93bec35c0e2db890b5766e81484ec58;hb=19becec31c5704572a3575336c57364d72fd572b;hp=b5426e034b8c9c9662fe53c67908b95728a5e9e5;hpb=4199abedf1dbf20ebd5abe9cebca55d40e9103f0;p=pintos-anon diff --git a/src/threads/kernel.lds.S b/src/threads/kernel.lds.S index b5426e0..6154d08 100644 --- a/src/threads/kernel.lds.S +++ b/src/threads/kernel.lds.S @@ -1,18 +1,23 @@ -#include "loader.h" +#include "threads/loader.h" OUTPUT_FORMAT("elf32-i386") OUTPUT_ARCH("i386") -ENTRY(start) +ENTRY(start) /* Kernel starts at "start" symbol. */ SECTIONS { + /* Specifies the virtual address for the kernel base. */ . = LOADER_PHYS_BASE + LOADER_KERN_BASE; _start = .; - .text : { *(.text) } = 0x9090 - .rodata : { *(.rodata) *(.rodata.*) } + /* Kernel starts with code, followed by read-only data and writable data. */ + .text : { *(.start) *(.text) } = 0x90 + .rodata : { *(.rodata) *(.rodata.*) + . = ALIGN(0x1000); + _end_kernel_text = .; } .data : { *(.data) } + /* BSS (zero-initialized data) is after everything else. */ _start_bss = .; .bss : { *(.bss) } _end_bss = .;