Generate and extract debug sysmbols for coreboot. *.debug files can be
[coreboot.git] / src / arch / i386 / Makefile.bigbootblock.inc
index 9b0e179e718b9fd12705229895aed2e190774e90..939eea63a3c43387d4949e4ff96b8bc4f1a79872 100644 (file)
@@ -32,4 +32,7 @@ $(obj)/coreboot: $$(initobjs) $(obj)/ldscript.ld
        @printf "    LINK       $(subst $(obj)/,,$(@))\n"
        $(CC) -nostdlib -nostartfiles -static -o $@ -L$(obj) -T $(obj)/ldscript.ld $(initobjs)
        $(NM) -n $(obj)/coreboot | sort > $(obj)/coreboot.map
+       $(OBJCOPY) --only-keep-debug $@ $(obj)/bootblock.debug
+       $(OBJCOPY) --strip-debug $@
+       $(OBJCOPY) --add-gnu-debuglink=$(obj)/bootblock.debug $@