]> Devi Nivas Git - cs3210-lab1.git/commitdiff
Fix kernelmemfs linking
authorAustin Clements <aclements@csail.mit.edu>
Fri, 3 Oct 2014 13:39:09 +0000 (09:39 -0400)
committerAustin Clements <aclements@csail.mit.edu>
Fri, 3 Oct 2014 13:39:09 +0000 (09:39 -0400)
Commit 9aa0337d introduced a linker script for linking the kernel image,
but only changed the kernel target to use it.  kernelmemfs was still
using the old linker command line arguments, which weren't sufficient.

Makefile

index 23b2fba0d1b3de327553748741d7134894195c9c..491382deeabca3858eea6dce532ea24579f2ce4c 100644 (file)
--- a/Makefile
+++ b/Makefile
@@ -124,7 +124,7 @@ kernel: $(OBJS) entry.o entryother initcode kernel.ld
 # needing a scratch disk.
 MEMFSOBJS = $(filter-out ide.o,$(OBJS)) memide.o
 kernelmemfs: $(MEMFSOBJS) entry.o entryother initcode fs.img
-       $(LD) $(LDFLAGS) -Ttext 0x100000 -e main -o kernelmemfs entry.o  $(MEMFSOBJS) -b binary initcode entryother fs.img
+       $(LD) $(LDFLAGS) -T kernel.ld -o kernelmemfs entry.o  $(MEMFSOBJS) -b binary initcode entryother fs.img
        $(OBJDUMP) -S kernelmemfs > kernelmemfs.asm
        $(OBJDUMP) -t kernelmemfs | sed '1,/SYMBOL TABLE/d; s/ .* / /; /^$$/d' > kernelmemfs.sym