From 39ebf2f06855343793fa5635d2c7b26ee2f1a7b8 Mon Sep 17 00:00:00 2001 From: Robert Millan Date: Tue, 11 Nov 2008 23:36:12 +0000 Subject: [PATCH] Signed-off-by: Robert Millan Acked-by: Jordan Crouse git-svn-id: svn://svn.coreboot.org/coreboot/trunk@3748 2b7e53f0-3cfb-0310-b3e9-8179ed1497e1 --- payloads/libpayload/bin/lpgcc | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/payloads/libpayload/bin/lpgcc b/payloads/libpayload/bin/lpgcc index da8b481155..691ec15f43 100755 --- a/payloads/libpayload/bin/lpgcc +++ b/payloads/libpayload/bin/lpgcc @@ -101,8 +101,13 @@ if [ $DOLINK -eq 0 ]; then else _LIBGCC=`$DEFAULT_CC -m32 -print-libgcc-file-name` if [ $DEBUGME -eq 1 ]; then - echo "$DEFAULT_CC $_CFLAGS $_LDFLAGS $CMDLINE $_LIBDIR/i386/head.o $_LIBDIR/libpayload.a $_LIBGCC" + echo "$DEFAULT_CC $_CFLAGS $_LDFLAGS $_LIBDIR/i386/head.o $CMDLINE $_LIBDIR/libpayload.a $_LIBGCC" fi - $DEFAULT_CC $_CFLAGS $_LDFLAGS $CMDLINE $_LIBDIR/i386/head.o $_LIBDIR/libpayload.a $_LIBGCC + # Note: i386/head.o must be the first object being linked, because it + # contains a Multiboot header. The Multiboot standard requires this + # header to be placed below 0x2000 in the resulting image. See: + # http://www.gnu.org/software/grub/manual/multiboot/html_node/OS-image-format.html + + $DEFAULT_CC $_CFLAGS $_LDFLAGS $_LIBDIR/i386/head.o $CMDLINE $_LIBDIR/libpayload.a $_LIBGCC fi