public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: Al Viro <viro@ftp.linux.org.uk>
To: Linus Torvalds <torvalds@osdl.org>
Cc: Russell King <rmk@arm.linux.org.uk>, linux-kernel@vger.kernel.org
Subject: [PATCH] MACHINE_START fix
Date: Sat, 29 Oct 2005 06:43:01 +0100	[thread overview]
Message-ID: <20051029054301.GZ7992@ftp.linux.org.uk> (raw)

	unreferenced static variables can be killed by cc(1), so when
we want them to survive (we collect these suckers in array in special
section), we'd better not make them static.

Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
----
diff -urN RC14-base/include/asm-arm/mach/arch.h current/include/asm-arm/mach/arch.h
--- RC14-base/include/asm-arm/mach/arch.h	2005-10-28 18:17:09.000000000 -0400
+++ current/include/asm-arm/mach/arch.h	2005-10-28 20:25:09.000000000 -0400
@@ -49,7 +49,7 @@
  * a table by the linker.
  */
 #define MACHINE_START(_type,_name)			\
-static const struct machine_desc __mach_desc_##_type	\
+const struct machine_desc __mach_desc_##_type	\
  __attribute__((__section__(".arch.info.init"))) = {	\
 	.nr		= MACH_TYPE_##_type,		\
 	.name		= _name,

             reply	other threads:[~2005-10-29  5:43 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2005-10-29  5:43 Al Viro [this message]
2005-10-29  8:52 ` [PATCH] MACHINE_START fix Andreas Schwab
2005-10-29  8:54 ` Russell King

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=20051029054301.GZ7992@ftp.linux.org.uk \
    --to=viro@ftp.linux.org.uk \
    --cc=linux-kernel@vger.kernel.org \
    --cc=rmk@arm.linux.org.uk \
    --cc=torvalds@osdl.org \
    /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