linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: David Mosberger <davidm@napali.hpl.hp.com>
To: akpm@osdl.org
Cc: linux-kernel@vger.kernel.org
Subject: make gcc 3.4 compilation work
Date: Mon, 12 Jan 2004 17:43:22 -0800	[thread overview]
Message-ID: <16387.19770.848804.921771@napali.hpl.hp.com> (raw)

I still need the attached "attribute((used))" declarations to get
"make modules_install" to work with the GCC pre-3.4.
Patch is relative to 2.6.1.

	--david

# This is a BitKeeper generated diff -Nru style patch.
#
# ChangeSet
#   2004/01/12 17:40:34-08:00 davidm@tiger.hpl.hp.com 
#   Add back __attribute_unused__ declarations which really are needed.
# 
# include/linux/moduleparam.h
#   2004/01/12 17:40:28-08:00 davidm@tiger.hpl.hp.com +1 -0
#   Add back __attribute_unused__ declarations which really are needed.
# 
# include/linux/module.h
#   2004/01/12 17:40:28-08:00 davidm@tiger.hpl.hp.com +3 -0
#   Add back __attribute_unused__ declarations which really are needed.
# 
diff -Nru a/include/linux/module.h b/include/linux/module.h
--- a/include/linux/module.h	Mon Jan 12 17:41:33 2004
+++ b/include/linux/module.h	Mon Jan 12 17:41:33 2004
@@ -60,6 +60,7 @@
 #define __module_cat(a,b) ___module_cat(a,b)
 #define __MODULE_INFO(tag, name, info)					  \
 static const char __module_cat(name,__LINE__)[]				  \
+  __attribute_used__							  \
   __attribute__((section(".modinfo"),unused)) = __stringify(tag) "=" info
 
 #define MODULE_GENERIC_TABLE(gtype,name)			\
@@ -142,6 +143,7 @@
 #define __CRC_SYMBOL(sym, sec)					\
 	extern void *__crc_##sym __attribute__((weak));		\
 	static const unsigned long __kcrctab_##sym		\
+	__attribute_used__					\
 	__attribute__((section("__kcrctab" sec), unused))	\
 	= (unsigned long) &__crc_##sym;
 #else
@@ -155,6 +157,7 @@
 	__attribute__((section("__ksymtab_strings")))		\
 	= MODULE_SYMBOL_PREFIX #sym;                    	\
 	static const struct kernel_symbol __ksymtab_##sym	\
+	__attribute_used__					\
 	__attribute__((section("__ksymtab" sec), unused))	\
 	= { (unsigned long)&sym, __kstrtab_##sym }
 
diff -Nru a/include/linux/moduleparam.h b/include/linux/moduleparam.h
--- a/include/linux/moduleparam.h	Mon Jan 12 17:41:33 2004
+++ b/include/linux/moduleparam.h	Mon Jan 12 17:41:33 2004
@@ -52,6 +52,7 @@
 #define __module_param_call(prefix, name, set, get, arg, perm)		\
 	static char __param_str_##name[] __initdata = prefix #name;	\
 	static struct kernel_param const __param_##name			\
+	__attribute_used__						\
     __attribute__ ((unused,__section__ ("__param"),aligned(sizeof(void *)))) \
 	= { __param_str_##name, perm, set, get, arg }
 

                 reply	other threads:[~2004-01-13  1:43 UTC|newest]

Thread overview: [no followups] expand[flat|nested]  mbox.gz  Atom feed

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=16387.19770.848804.921771@napali.hpl.hp.com \
    --to=davidm@napali.hpl.hp.com \
    --cc=akpm@osdl.org \
    --cc=davidm@hpl.hp.com \
    --cc=linux-kernel@vger.kernel.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;
as well as URLs for NNTP newsgroup(s).