[coreboot] [v2] r4326 - in trunk/coreboot-v2/src: arch/ppc/lib config
svn at coreboot.org
svn at coreboot.org
Sat May 30 17:12:34 CEST 2009
Author: stepan
Date: 2009-05-30 17:12:33 +0200 (Sat, 30 May 2009)
New Revision: 4326
Added:
trunk/coreboot-v2/src/arch/ppc/lib/abort.c
Modified:
trunk/coreboot-v2/src/arch/ppc/lib/Config.lb
trunk/coreboot-v2/src/config/Config.lb
Log:
Many Kudos go to Segher Boessenkool and Patrick Georgi for figuring this one
out. Fix the libgcc dependency on abort() due to nested functions.
Signed-off-by: Stefan Reinauer <stepan at coresystems.de>
Acked-by: Stefan Reinauer <stepan at coresystems.de>
Modified: trunk/coreboot-v2/src/arch/ppc/lib/Config.lb
===================================================================
--- trunk/coreboot-v2/src/arch/ppc/lib/Config.lb 2009-05-29 18:41:09 UTC (rev 4325)
+++ trunk/coreboot-v2/src/arch/ppc/lib/Config.lb 2009-05-30 15:12:33 UTC (rev 4326)
@@ -8,6 +8,7 @@
object timebase.S
object floats.S
object div64.S
+object abort.o
initobject pci_dev.o
initobject printk_init.o
initobject timebase.S
@@ -15,3 +16,4 @@
initobject floats.S
initobject div64.S
initobject ppc.o
+initobject abort.o
Added: trunk/coreboot-v2/src/arch/ppc/lib/abort.c
===================================================================
--- trunk/coreboot-v2/src/arch/ppc/lib/abort.c (rev 0)
+++ trunk/coreboot-v2/src/arch/ppc/lib/abort.c 2009-05-30 15:12:33 UTC (rev 4326)
@@ -0,0 +1,32 @@
+/*
+ * This file is part of the coreboot project.
+ *
+ * Copyright (C) 2009 coresystems GmbH
+ *
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; version 2 of the License.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
+ */
+
+/* gcc produces calls to an abort function in their trampoline code on powerpc
+ * 32bit platforms.
+ * This trampoline code is emitted for example in nested functions.
+ */
+
+void abort(void)
+{
+ /* We would want to call die() here, but it might not be available at
+ * this point, so for now we have to die silently.
+ */
+ for (;;) ;
+}
+
Modified: trunk/coreboot-v2/src/config/Config.lb
===================================================================
--- trunk/coreboot-v2/src/config/Config.lb 2009-05-29 18:41:09 UTC (rev 4325)
+++ trunk/coreboot-v2/src/config/Config.lb 2009-05-30 15:12:33 UTC (rev 4326)
@@ -47,7 +47,7 @@
makerule coreboot_ram.o
depends "src/arch/$(ARCH)/lib/c_start.o $(DRIVER) coreboot.a $(LIBGCC_FILE_NAME)"
- action "$(CC) $(DISTRO_LFLAGS) -nostdlib -r -o $@ $^"
+ action "$(CC) $(DISTRO_LFLAGS) -nostdlib -r -o $@ src/arch/$(ARCH)/lib/c_start.o $(DRIVER) -Wl,-\( coreboot.a $(LIBGCC_FILE_NAME) -Wl,-\)"
end
makerule coreboot_ram
More information about the coreboot
mailing list