summaryrefslogtreecommitdiff
path: root/src/arch/x86/init
diff options
context:
space:
mode:
authorEdward O'Callaghan <eocallaghan@alterapraxis.com>2014-02-20 05:10:09 +1100
committerPatrick Georgi <patrick@georgi-clan.de>2014-02-24 13:54:02 +0100
commitd777d86ab2afc03c0a1d98f136e05ef9c64aa5ed (patch)
tree950c87d1e8c75b2305dae02090ec24e1466c7a2c /src/arch/x86/init
parentfb6d25faa05c43a46da5a2f5307c35b97e08e7cb (diff)
CAR_GLOBAL: enforce compiler to check if _start != _end
There are some fun rules C compilers can use to optimize their code. One of them is the assumption that two symbols point to two different addresses. In this case this wasn't true, resulting in unintended code execution (and later, a crash) with a clang build. Change-Id: I1496b22e1d1869ed0610e321b6ec6a83252e9d8b Signed-off-by: Patrick Georgi <patrick@georgi-clan.de> Signed-off-by: Edward O'Callaghan <eocallaghan@alterapraxis.com> Reviewed-on: http://review.coreboot.org/4719 Tested-by: build bot (Jenkins)
Diffstat (limited to 'src/arch/x86/init')
-rw-r--r--src/arch/x86/init/romstage.ld1
1 files changed, 1 insertions, 0 deletions
diff --git a/src/arch/x86/init/romstage.ld b/src/arch/x86/init/romstage.ld
index f44185f24e..5458cfc23d 100644
--- a/src/arch/x86/init/romstage.ld
+++ b/src/arch/x86/init/romstage.ld
@@ -37,6 +37,7 @@ SECTIONS
. = ALIGN(16);
_car_migrate_start = .;
*(.car.migrate);
+ LONG(0);
_car_migrate_end = .;
. = ALIGN(16);
_erom = .;