From ad4fa21705e66a0f350597da043c845aa79bce99 Mon Sep 17 00:00:00 2001 From: Martin Roth Date: Thu, 22 Jan 2015 19:10:10 -0700 Subject: Get rid of .car.global_data warnings for GCC build The "used" attribute was added in commit 27cf2472 which caused these warnings to start appearing when using the standard coreboot GCC toolchain: {standard input}: Assembler messages: {standard input}:96: Warning: ignoring changed section type for .car.global_data {standard input}:96: Warning: ignoring changed section attributes for .car.global_data The # at the end of the section name causes the assembler to ignore everything following the name. I verified that the resulting binaries are the same with and without the #. Change-Id: Iaac8042533842ed887f33895f083b613a18f496a Signed-off-by: Martin Roth Reviewed-on: http://review.coreboot.org/8301 Reviewed-by: Paul Menzel Tested-by: build bot (Jenkins) Reviewed-by: Aaron Durbin --- src/arch/x86/include/arch/early_variables.h | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'src/arch/x86') diff --git a/src/arch/x86/include/arch/early_variables.h b/src/arch/x86/include/arch/early_variables.h index 2d5ae859ff..5394af342a 100644 --- a/src/arch/x86/include/arch/early_variables.h +++ b/src/arch/x86/include/arch/early_variables.h @@ -23,8 +23,12 @@ #ifdef __PRE_RAM__ asm(".section .car.global_data,\"w\",@nobits"); asm(".previous"); +#ifdef __clang__ #define CAR_GLOBAL __attribute__((used,section(".car.global_data"))) #else +#define CAR_GLOBAL __attribute__((used,section(".car.global_data#"))) +#endif /* __clang__ */ +#else #define CAR_GLOBAL #endif -- cgit v1.2.3