car globals: add "used" attribute
Otherwise clang feels free to optimize away that variable (somewhat) and revive it in a different form inside .bss. They probably have the language lawyery excuse for why that's perfectly legal, so let's play it safe. (relevant URL, sorry ron: http://llvm.org/bugs/show_bug.cgi?id=9520) Change-Id: I603312ceea7207088dd29453cc8fb8f48c31af21 Signed-off-by: Patrick Georgi <patrick@georgi-clan.de> Reviewed-on: http://review.coreboot.org/7357 Reviewed-by: Edward O'Callaghan <eocallaghan@alterapraxis.com> Tested-by: build bot (Jenkins)
This commit is contained in:
parent
5560188849
commit
27cf24727c
|
@ -23,7 +23,7 @@
|
||||||
#ifdef __PRE_RAM__
|
#ifdef __PRE_RAM__
|
||||||
asm(".section .car.global_data,\"w\",@nobits");
|
asm(".section .car.global_data,\"w\",@nobits");
|
||||||
asm(".previous");
|
asm(".previous");
|
||||||
#define CAR_GLOBAL __attribute__((section(".car.global_data")))
|
#define CAR_GLOBAL __attribute__((used,section(".car.global_data")))
|
||||||
#else
|
#else
|
||||||
#define CAR_GLOBAL
|
#define CAR_GLOBAL
|
||||||
#endif
|
#endif
|
||||||
|
|
Loading…
Reference in New Issue