Skip to content

Commit

Permalink
[ARM] Ensure machine information structures aren't optimised away
Browse files Browse the repository at this point in the history
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 <rmk+kernel@arm.linux.org.uk>
  • Loading branch information
Russell King authored and Russell King committed Oct 29, 2005
1 parent 8a212ab commit fb31690
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions include/asm-arm/mach/arch.h
Original file line number Diff line number Diff line change
Expand Up @@ -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,
Expand Down

0 comments on commit fb31690

Please sign in to comment.