X-Git-Url: https://pintos-os.org/cgi-bin/gitweb.cgi?a=blobdiff_plain;f=src%2Fthreads%2Fkernel.lds.S;fp=src%2Fthreads%2Fkernel.lds.S;h=b911b29fa45853714f6e069468c1cdd8b4f20b9d;hb=beddf03109baecfdda77c6e4478ac975e49faf73;hp=b5426e034b8c9c9662fe53c67908b95728a5e9e5;hpb=447755c02e674e65801fbb783823009e32458753;p=pintos-anon diff --git a/src/threads/kernel.lds.S b/src/threads/kernel.lds.S index b5426e0..b911b29 100644 --- a/src/threads/kernel.lds.S +++ b/src/threads/kernel.lds.S @@ -2,17 +2,20 @@ 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 = .; + /* Kernel starts with code, followed by read-only data and writable data. */ .text : { *(.text) } = 0x9090 .rodata : { *(.rodata) *(.rodata.*) } .data : { *(.data) } + /* BSS (zero-initialized data) is after everything else. */ _start_bss = .; .bss : { *(.bss) } _end_bss = .;