[coreboot-gerrit] New patch to review for coreboot: 4364669 car globals: add "used" attribute

Patrick Georgi (pgeorgi@google.com) gerrit at coreboot.org
Sat Nov 8 13:18:40 CET 2014


Patrick Georgi (pgeorgi at google.com) just uploaded a new patch set to gerrit, which you can find at http://review.coreboot.org/7357

-gerrit

commit 43646692b0f18cd45206e16f6c316bec01a6bf9f
Author: Patrick Georgi <patrick at georgi-clan.de>
Date:   Sat Nov 8 13:16:46 2014 +0100

    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 at georgi-clan.de>
---
 src/arch/x86/include/arch/early_variables.h | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/src/arch/x86/include/arch/early_variables.h b/src/arch/x86/include/arch/early_variables.h
index ea57d89..c850a84 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\", at 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



More information about the coreboot-gerrit mailing list