mirror of
https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git
synced 2024-08-27 19:29:37 +00:00
[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 <rmk+kernel@arm.linux.org.uk>
This commit is contained in:
parent
8a212ab6b8
commit
fb31690fba
1 changed files with 1 additions and 0 deletions
|
@ -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,
|
||||
|
|
Loading…
Reference in a new issue