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