[ARM] Ensure machine information structures aren't optimised away
[powerpc.git] / include / asm-arm / mach / arch.h
index 56c6bf4..eb262e0 100644 (file)
@@ -48,10 +48,11 @@ struct machine_desc {
  * Set of macros to define architecture features.  This is built into
  * a table by the linker.
  */
-#define MACHINE_START(_type,_name)             \
-const struct machine_desc __mach_desc_##_type  \
- __attribute__((__section__(".arch.info"))) = {        \
-       .nr             = MACH_TYPE_##_type,    \
+#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,
 
 #define MACHINE_END                            \