generate kernel.sym for debug

This commit is contained in:
Mathieu Maret 2022-03-21 21:50:42 +01:00 committed by Mathieu Maret
parent 3f3fb3b138
commit 1fcf63409c
2 changed files with 4 additions and 3 deletions

View File

@ -20,8 +20,9 @@ all:$(KERNEL)
kernel.elf: $(cobj) $(gasmobj) font_psf.o $(LDSCRIPT)
$(LD) $(LDFLAGS) -o $@ $(gasmobj) $(cobj) font_psf.o -T$(LDSCRIPT) -Map kernel.map
$(KERNEL): kernel.elf
$(CROSS)objcopy -O binary $< $@
$(KERNEL) kernel.sym &: kernel.elf
$(CROSS)objcopy -O binary $< $(KERNEL)
$(CROSS)objcopy --only-keep-debug $< kernel.sym
font_psf.o: font.psf
$(LD) -r -b binary -o font_psf.o font.psf

View File

@ -1,3 +1,3 @@
#add-symbol-file kernel.map
add-symbol-file kernel.sym
file kernel.elf
target remote | qemu-system-aarch64 -machine raspi3b -S -gdb stdio -kernel kernel.bin