summaryrefslogtreecommitdiffstats
path: root/arch/x86/boot
diff options
context:
space:
mode:
authorDavid Woodhouse <David.Woodhouse@intel.com>2014-01-08 11:21:21 +0000
committerH. Peter Anvin <hpa@linux.intel.com>2014-01-22 04:21:45 -0800
commit9b3965f7401b0cc3ed2c228085a4c13b1c9243b1 (patch)
tree7f83f65c885883114f7583f913e24931ad726b47 /arch/x86/boot
parent1c678da3bd1339299ab667af68cad5032367fb1c (diff)
downloadop-kernel-dev-9b3965f7401b0cc3ed2c228085a4c13b1c9243b1.zip
op-kernel-dev-9b3965f7401b0cc3ed2c228085a4c13b1c9243b1.tar.gz
x86, boot: Use __attribute__((used)) to ensure videocard structs are emitted
It looks like GCC will always emit an object that is marked with an explicit section, although the documentation doesn't say that and we possibly shouldn't be relying on it. Clang does *not* do so, so add __attribute__((used)) to make sure. Signed-off-by: David Woodhouse <David.Woodhouse@intel.com> Link: http://lkml.kernel.org/r/1389180083-23249-2-git-send-email-David.Woodhouse@intel.com Signed-off-by: H. Peter Anvin <hpa@linux.intel.com>
Diffstat (limited to 'arch/x86/boot')
-rw-r--r--arch/x86/boot/video.h2
1 files changed, 1 insertions, 1 deletions
diff --git a/arch/x86/boot/video.h b/arch/x86/boot/video.h
index ff339c5..0bb2549 100644
--- a/arch/x86/boot/video.h
+++ b/arch/x86/boot/video.h
@@ -80,7 +80,7 @@ struct card_info {
u16 xmode_n; /* Size of unprobed mode range */
};
-#define __videocard struct card_info __attribute__((section(".videocards")))
+#define __videocard struct card_info __attribute__((used,section(".videocards")))
extern struct card_info video_cards[], video_cards_end[];
int mode_defined(u16 mode); /* video.c */
OpenPOWER on IntegriCloud