summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJoursoir <chat@joursoir.net>2021-10-07 20:39:00 +0000
committerJoursoir <chat@joursoir.net>2021-10-07 20:39:00 +0000
commitb6ce3db0609318907cb2d34d8dde52fe17c31b5c (patch)
treee2a6bc6156b5c6c2b29fb21e6bafab70693f6f5e
parent1312235319486dbc00eafba2e4b4d18ddc9bfa24 (diff)
downloadmfsos-b6ce3db0609318907cb2d34d8dde52fe17c31b5c.tar.gz
mfsos-b6ce3db0609318907cb2d34d8dde52fe17c31b5c.tar.bz2
mfsos-b6ce3db0609318907cb2d34d8dde52fe17c31b5c.zip
add objdump targets for boot and kernel
-rw-r--r--Makefile9
1 files changed, 8 insertions, 1 deletions
diff --git a/Makefile b/Makefile
index bd50bdd..07343b1 100644
--- a/Makefile
+++ b/Makefile
@@ -22,7 +22,7 @@ C_SOURCES = \
drivers/video/console/vgacon.c
OBJECTS = ${C_SOURCES:.c=.o}
-.PHONY: all qemu clean
+.PHONY: all qemu objdump-boot objdump-kernel clean
all: $(OSBIN)
@@ -52,6 +52,13 @@ $(KERNBIN): $(ARCH_BOOT)/head.o $(OBJECTS)
qemu: $(OSBIN)
qemu-system-i386 -kernel $(OSBIN)
+objdump-boot: $(BOOTBIN)
+ $(MAKE) -C $(ARCH_BOOT) objdump-bootsect objdump-setup
+
+objdump-kernel: $(KERNBIN)
+ $(OBJDUMP) -D -m i386 -b binary \
+ --adjust-vma=0x1000 -Maddr32,data32 $<
+
clean:
$(MAKE) -C $(ARCH_BOOT) clean
rm -rf $(ARCH_BOOT)/head.o kernel/main.o