added linker script

git-svn-id: svn://anubis/hos/trunk@12 5b3e749e-e535-0410-8002-a9bb6afbdfca
This commit is contained in:
josh committed 2009-06-24 21:53:32 +00:00
1 parent 09fb19df15
commit 788597b6f4
3 files changed
+31 -7

No files matched your search

+7 -5
View File
@@ -1,14 +1,16 @@
KERNEL = hos
LOAD_ADDRESS = 0x100000
LDTARGET = elf32-i386
LDFLAGS = -Ttext $(LOAD_ADDRESS) --oformat $(LDTARGET)
LDFLAGS = -T link.ld
.PHONY: clean
all:
all: $(KERNEL)
$(KERNEL): boot.o
ld $(LDFLAGS) -o $@ $<
boot.o: boot.asm
nasm -f elf -o boot.o boot.asm
ld $(LDFLAGS) -o $(KERNEL) boot.o
clean:
-rm -f *~ $(KERNEL) *.o