From: Russell King Date: Sat, 29 Oct 2005 12:15:10 +0000 (+0100) Subject: [ARM] Ensure machine information structures aren't optimised away X-Git-Tag: v2.6.15-rc1~731^2^2~14 X-Git-Url: https://err.no/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=fb31690fbac6f4055c1765522752e4746759f5de;p=linux-2.6 [ARM] Ensure machine information structures aren't optimised away Since the machine information structures are now static, the compiler might optimise them away. Mark them with __attribute_used__ to prevent this occuring. Signed-off-by: Russell King --- diff --git a/include/asm-arm/mach/arch.h b/include/asm-arm/mach/arch.h index 7273c6fd95..eb262e078c 100644 --- a/include/asm-arm/mach/arch.h +++ b/include/asm-arm/mach/arch.h @@ -50,6 +50,7 @@ struct machine_desc { */ #define MACHINE_START(_type,_name) \ static const struct machine_desc __mach_desc_##_type \ + __attribute_used__ \ __attribute__((__section__(".arch.info.init"))) = { \ .nr = MACH_TYPE_##_type, \ .name = _name,