summaryrefslogtreecommitdiff
path: root/src/arch/i386/Makefile.bootblock.inc
diff options
context:
space:
mode:
authorMarc Jones <marcj303@gmail.com>2010-09-23 15:38:55 +0000
committerMarc Jones <marc.jones@amd.com>2010-09-23 15:38:55 +0000
commit5c3126936d0387df5308817f63f25f170e2c5cb0 (patch)
tree5968d7e8acdd545d27e1cedf0fdb30888407254c /src/arch/i386/Makefile.bootblock.inc
parenta34a0b1876948d34c8f7d49f224998a6dfc7755a (diff)
Generate and extract debug sysmbols for coreboot. *.debug files can be
used for source level debug. Signed-off-by: Marc Jones <marcj303@gmail.com> Acked-by: Peter Stuge <peter@stuge.se> git-svn-id: svn://svn.coreboot.org/coreboot/trunk@5827 2b7e53f0-3cfb-0310-b3e9-8179ed1497e1
Diffstat (limited to 'src/arch/i386/Makefile.bootblock.inc')
-rw-r--r--src/arch/i386/Makefile.bootblock.inc6
1 files changed, 6 insertions, 0 deletions
diff --git a/src/arch/i386/Makefile.bootblock.inc b/src/arch/i386/Makefile.bootblock.inc
index 9fb78c57b7..52a529c1d7 100644
--- a/src/arch/i386/Makefile.bootblock.inc
+++ b/src/arch/i386/Makefile.bootblock.inc
@@ -75,6 +75,9 @@ $(obj)/bootblock.elf: $(obj)/mainboard/$(MAINBOARDDIR)/bootblock.o $(obj)/bootbl
@printf " LINK $(subst $(obj)/,,$(@))\n"
$(CC) -nostdlib -nostartfiles -static -o $@ -L$(obj) -T $(obj)/bootblock/ldscript.ld $<
$(NM) -n $(obj)/bootblock.elf | sort > $(obj)/bootblock.map
+ $(OBJCOPY) --only-keep-debug $@ $(obj)/bootblock.debug
+ $(OBJCOPY) --strip-debug $@
+ $(OBJCOPY) --add-gnu-debuglink=$(obj)/bootblock.debug $@
#######################################################################
# Build the romstage
@@ -89,6 +92,9 @@ $(obj)/coreboot.romstage: $(obj)/coreboot.pre1 $$(initobjs) $(obj)/romstage/ldsc
printf ';\nAUTO_XIP_ROM_BASE = CONFIG_ROMBASE & ~(CONFIG_XIP_ROM_SIZE - 1);\n' >> $(obj)/location.ld
$(CC) -nostdlib -nostartfiles -static -o $(obj)/romstage.elf -L$(obj) -T $(obj)/romstage/ldscript.ld $(initobjs)
$(NM) -n $(obj)/romstage.elf | sort > $(obj)/romstage.map
+ $(OBJCOPY) --only-keep-debug $(obj)/romstage.elf $(obj)/romstage.debug
+ $(OBJCOPY) --strip-debug $(obj)/romstage.elf
+ $(OBJCOPY) --add-gnu-debuglink=$(obj)/romstage.debug $(obj)/romstage.elf
$(OBJCOPY) -O binary $(obj)/romstage.elf $@
$(obj)/romstage/ldscript.ld: $$(ldscripts) $(obj)/ldoptions