summaryrefslogtreecommitdiff
path: root/payloads
diff options
context:
space:
mode:
authorUlf Jordan <jordan@chalmers.se>2009-02-10 21:12:35 +0000
committerMyles Watson <mylesgw@gmail.com>2009-02-10 21:12:35 +0000
commit6818a3236753f47aa7cb5a345ee097075010e3a5 (patch)
tree0a098fe843e9d48ca8b46accf080f982e19dd3a6 /payloads
parent3ba0ce5f58265e95d5b667ab7ec8a3a180bff4d0 (diff)
downloadcoreboot-6818a3236753f47aa7cb5a345ee097075010e3a5.tar.xz
Fix bayou payload execution.
Bayou must link with its own ldscript to end up at a load address that doesn't interfere with payloads. Make Bayou's ldscript MB compatible, so the link with libpayload/lib/i386/head.o succeeds. Signed-off-by: Ulf Jordan <jordan@chalmers.se> Acked-by: Jordan Crouse <jordan@cosmicpenguin.net> git-svn-id: svn://svn.coreboot.org/coreboot/trunk@3935 2b7e53f0-3cfb-0310-b3e9-8179ed1497e1
Diffstat (limited to 'payloads')
-rwxr-xr-xpayloads/libpayload/bin/lpgcc9
1 files changed, 8 insertions, 1 deletions
diff --git a/payloads/libpayload/bin/lpgcc b/payloads/libpayload/bin/lpgcc
index 691ec15f43..35cc470e68 100755
--- a/payloads/libpayload/bin/lpgcc
+++ b/payloads/libpayload/bin/lpgcc
@@ -39,6 +39,8 @@ BASE=`dirname $0`
# This will set the _LIBDIR and _INCDIR variables used below
. $BASE/lp.functions
+_LDSCRIPT="-Wl,-T,$_LIBDIR/libpayload.ldscript"
+
trygccoption() {
$DEFAULT_CC $1 -S -xc /dev/null -o .$$.tmp &> /dev/null
RET=$?
@@ -73,6 +75,11 @@ while [ $# -gt 0 ]; do
shift
continue
;;
+ -Wl,-T,*)
+ _LDSCRIPT="$1"
+ shift
+ continue
+ ;;
*)
;;
esac
@@ -90,7 +97,7 @@ trygccoption -fno-stack-protector
_CFLAGS="$_CFLAGS -I`$DEFAULT_CC -m32 -print-search-dirs | head -n 1 | cut -d' ' -f2`include"
-_LDFLAGS="-Wl,-T,$_LIBDIR/libpayload.ldscript -static"
+_LDFLAGS="$_LDSCRIPT -static"
if [ $DOLINK -eq 0 ]; then
if [ $DEBUGME -eq 1 ]; then