2 CXXFLAGS += -fno-omit-frame-pointer -march=i686
4 $(BUILDDIR)/kernel: $(OBJS) $(DIR)linker-script
5 @echo $(COMP): Linking kernel: $@
7 @$(CXX) $(OBJS) -lgcc -lsupc++ -nostdlib -o "$@" -Wl,-T$(DIR)linker-script
9 # GRUB refuses to use the addresses in the multiboot header if it
10 # finds a valid ELF header, so the dd hacks a zero into the high byte
11 # of the physical address field. I tried using AT() in the linker
12 # script to properly generate separate physical and virtual
13 # addresses, but that caused the strip command to issue a warning and
14 # wipe out the BSS (setting memsz to filesz).
16 $(BUILDDIR)/kernel.stripped: $(BUILDDIR)/kernel
17 @echo $(COMP): Stripping kernel: $@
18 @$(STRIP) $(BUILDDIR)/kernel -o "$@"
19 @dd if=/dev/zero of=$(BUILDDIR)/kernel.stripped conv=notrunc \