summaryrefslogtreecommitdiff
path: root/src/arch/i386/Makefile.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.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.inc')
-rw-r--r--src/arch/i386/Makefile.inc6
1 files changed, 6 insertions, 0 deletions
diff --git a/src/arch/i386/Makefile.inc b/src/arch/i386/Makefile.inc
index 13ecd2f2f0..ba6489030f 100644
--- a/src/arch/i386/Makefile.inc
+++ b/src/arch/i386/Makefile.inc
@@ -107,6 +107,9 @@ $(obj)/coreboot_ram: $(obj)/coreboot_ram.o $(src)/arch/i386/coreboot_ram.ld #ldo
@printf " CC $(subst $(obj)/,,$(@))\n"
$(CC) -nostdlib -nostartfiles -static -o $@ -L$(obj) -T $(src)/arch/i386/coreboot_ram.ld $(obj)/coreboot_ram.o
$(NM) -n $(obj)/coreboot_ram | sort > $(obj)/coreboot_ram.map
+ $(OBJCOPY) --only-keep-debug $@ $(obj)/coreboot_ram.debug
+ $(OBJCOPY) --strip-debug $@
+ $(OBJCOPY) --add-gnu-debuglink=$(obj)/coreboot_ram.debug $@
$(obj)/coreboot_ram.o: $(obj)/arch/i386/lib/c_start.o $$(drivers) $(obj)/coreboot.a $(LIBGCC_FILE_NAME)
@printf " CC $(subst $(obj)/,,$(@))\n"
@@ -125,6 +128,9 @@ ifeq ($(CONFIG_AP_CODE_IN_CAR),y)
$(obj)/coreboot_ap: $(obj)/mainboard/$(MAINBOARDDIR)/ap_romstage.o
@printf " CC $(subst $(obj)/,,$(@))\n"
$(CC) -nostdlib -nostartfiles -static -o $@ -L$(obj) -T $(src)/arch/i386/init/ldscript_apc.lb $^
+ $(OBJCOPY) --only-keep-debug $@ $(obj)/coreboot_ap.debug
+ $(OBJCOPY) --strip-debug $@
+ $(OBJCOPY) --add-gnu-debuglink=$(obj)/coreboot_ap.debug $@
$(NM) -n $(obj)/coreboot_ap | sort > $(obj)/coreboot_ap.map