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)
This commit is contained in:
committed by
Patrick Georgi
parent
fb6d25faa0
commit
d777d86ab2
@@ -37,6 +37,7 @@ SECTIONS
|
||||
. = ALIGN(16);
|
||||
_car_migrate_start = .;
|
||||
*(.car.migrate);
|
||||
LONG(0);
|
||||
_car_migrate_end = .;
|
||||
. = ALIGN(16);
|
||||
_erom = .;
|
||||
|
||||
Reference in New Issue
Block a user