mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: tip-bot for David Woodhouse <tipbot@zytor.com>
To: linux-tip-commits@vger.kernel.org
Cc: linux-kernel@vger.kernel.org, hpa@zytor.com, mingo@kernel.org,
	tglx@linutronix.de, hpa@linux.intel.com,
	David.Woodhouse@intel.com
Subject: [tip:x86/build] x86, boot: Use __attribute__((used)) to ensure videocard structs are emitted
Date: Tue, 21 Jan 2014 18:03:52 -0800	[thread overview]
Message-ID: <tip-2852657a9cf18a3bdb5842a13261bb1cc971572a@git.kernel.org> (raw)
In-Reply-To: <1389180083-23249-2-git-send-email-David.Woodhouse@intel.com>

Commit-ID:  2852657a9cf18a3bdb5842a13261bb1cc971572a
Gitweb:     http://git.kernel.org/tip/2852657a9cf18a3bdb5842a13261bb1cc971572a
Author:     David Woodhouse <David.Woodhouse@intel.com>
AuthorDate: Wed, 8 Jan 2014 11:21:21 +0000
Committer:  H. Peter Anvin <hpa@linux.intel.com>
CommitDate: Tue, 21 Jan 2014 17:59:33 -0800

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>
---
 arch/x86/boot/video.h | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

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 */

  reply	other threads:[~2014-01-22  2:04 UTC|newest]

Thread overview: 19+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-01-08 11:21 [PATCH 1/4] x86: Remove duplication of 16-bit CFLAGS David Woodhouse
2014-01-08 11:21 ` [PATCH 2/4] x86, boot: Use __attribute__((used)) to ensure videocard structs are emitted David Woodhouse
2014-01-22  2:03   ` tip-bot for David Woodhouse [this message]
2014-01-22 12:25   ` [tip:x86/build] " tip-bot for David Woodhouse
2014-01-08 11:21 ` [PATCH 3/4] x86: Allow building 16-bit code with -m16 with toolchains that support it David Woodhouse
2014-01-14 19:14   ` [llvmlinux] " Jan-Simon Möller
2014-01-14 23:59     ` Woodhouse, David
2014-01-22  0:54   ` David Woodhouse
2014-01-29 12:11   ` [PATCH] x86: Build 16-bit code with -m16 where possible David Woodhouse
2014-01-29 12:16     ` [PATCH v2] " David Woodhouse
2014-01-29 17:51       ` [tip:x86/build] x86, build: " tip-bot for David Woodhouse
2014-01-29 17:57       ` tip-bot for David Woodhouse
2014-01-30 16:10       ` tip-bot for David Woodhouse
2014-01-31 10:23     ` [PATCH] x86: " Pavel Machek
2014-01-08 11:21 ` [PATCH 4/4] x86, boot: Work around clang PR18415 David Woodhouse
2014-01-08 12:04   ` [llvmlinux] " PaX Team
2014-01-08 13:03 ` [llvmlinux] [PATCH 1/4] x86: Remove duplication of 16-bit CFLAGS Jan-Simon Möller
2014-01-22  2:03 ` [tip:x86/build] " tip-bot for David Woodhouse
2014-01-22 12:25 ` tip-bot for David Woodhouse

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=tip-2852657a9cf18a3bdb5842a13261bb1cc971572a@git.kernel.org \
    --to=tipbot@zytor.com \
    --cc=David.Woodhouse@intel.com \
    --cc=hpa@linux.intel.com \
    --cc=hpa@zytor.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-tip-commits@vger.kernel.org \
    --cc=mingo@kernel.org \
    --cc=tglx@linutronix.de \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

Powered by JetHome