summaryrefslogtreecommitdiff
path: root/src/arch
diff options
context:
space:
mode:
authorPatrick Georgi <patrick@georgi-clan.de>2014-11-08 13:16:46 +0100
committerPatrick Georgi <pgeorgi@google.com>2014-11-09 12:25:58 +0100
commit27cf24727c26874cbe61734d01074f6da077d1b9 (patch)
tree317c5f9e350942aadcd7e7b63b2c629f0496091f /src/arch
parent55601888490fd440e6db961ce56fc04cd9bff34c (diff)
downloadcoreboot-27cf24727c26874cbe61734d01074f6da077d1b9.tar.xz
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)
Diffstat (limited to 'src/arch')
-rw-r--r--src/arch/x86/include/arch/early_variables.h2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/arch/x86/include/arch/early_variables.h b/src/arch/x86/include/arch/early_variables.h
index ea57d89de8..c850a8427d 100644
--- a/src/arch/x86/include/arch/early_variables.h
+++ b/src/arch/x86/include/arch/early_variables.h
@@ -23,7 +23,7 @@
#ifdef __PRE_RAM__
asm(".section .car.global_data,\"w\",@nobits");
asm(".previous");
-#define CAR_GLOBAL __attribute__((section(".car.global_data")))
+#define CAR_GLOBAL __attribute__((used,section(".car.global_data")))
#else
#define CAR_GLOBAL
#endif