All of lore.kernel.org
 help / color / mirror / Atom feed
From: Gerd Knorr <kraxel@bytesex.org>
To: Jeff Dike <jdike@addtoit.com>
Cc: uml devel <user-mode-linux-devel@lists.sourceforge.net>
Subject: [uml-devel] Re: [patch] module symbol fix
Date: Fri, 27 Feb 2004 10:26:56 +0100	[thread overview]
Message-ID: <20040227092656.GA12168@bytesex.org> (raw)
In-Reply-To: <20040226212655.GA5191@bytesex.org>

On Thu, Feb 26, 2004 at 10:26:55PM +0100, Gerd Knorr wrote:
>   Hi,
> 
> recent gcc versions need this one ...

Another one of this kind (without this gcc may optimizes away the static
declared but unreferenced stuff, resulting in initrd= and --help options
not working any more for example ...).

  Gerd

--- linux-um-2.6.3/arch/um/include/init.h.used	2004-02-27 09:34:57.874205081 +0100
+++ linux-um-2.6.3/arch/um/include/init.h	2004-02-27 09:44:32.415275725 +0100
@@ -40,9 +40,9 @@
 typedef int (*initcall_t)(void);
 typedef void (*exitcall_t)(void);
 
-#define __init          __attribute__ ((__section__ (".text.init")))
+#define __init          __attribute__ ((used,__section__ (".text.init")))
 #define __exit          __attribute__ ((unused, __section__(".text.exit")))
-#define __initdata      __attribute__ ((__section__ (".data.init")))
+#define __initdata      __attribute__ ((used,__section__ (".data.init")))
 
 #endif
 
@@ -94,11 +94,11 @@
  * Mark functions and data as being only used at initialization
  * or exit time.
  */
-#define __uml_init_setup	__attribute__ ((unused,__section__ (".uml.setup.init")))
-#define __uml_setup_help	__attribute__ ((unused,__section__ (".uml.help.init")))
-#define __uml_init_call		__attribute__ ((unused,__section__ (".uml.initcall.init")))
-#define __uml_postsetup_call	__attribute__ ((unused,__section__ (".uml.postsetup.init")))
-#define __uml_exit_call		__attribute__ ((unused,__section__ (".uml.exitcall.exit")))
+#define __uml_init_setup	__attribute__ ((used,__section__ (".uml.setup.init")))
+#define __uml_setup_help	__attribute__ ((used,__section__ (".uml.help.init")))
+#define __uml_init_call		__attribute__ ((used,__section__ (".uml.initcall.init")))
+#define __uml_postsetup_call	__attribute__ ((used,__section__ (".uml.postsetup.init")))
+#define __uml_exit_call		__attribute__ ((used,__section__ (".uml.exitcall.exit")))
 
 #endif /* _LINUX_UML_INIT_H */
 


-------------------------------------------------------
SF.Net is sponsored by: Speed Start Your Linux Apps Now.
Build and deploy apps & Web services for Linux with
a free DVD software kit from IBM. Click Now!
http://ads.osdn.com/?ad_id=1356&alloc_id=3438&op=click
_______________________________________________
User-mode-linux-devel mailing list
User-mode-linux-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/user-mode-linux-devel

  reply	other threads:[~2004-02-27  9:50 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2004-02-26 21:26 [uml-devel] [patch] module symbol fix Gerd Knorr
2004-02-27  9:26 ` Gerd Knorr [this message]
2004-02-28 16:32   ` [uml-devel] " BlaisorBlade

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=20040227092656.GA12168@bytesex.org \
    --to=kraxel@bytesex.org \
    --cc=jdike@addtoit.com \
    --cc=user-mode-linux-devel@lists.sourceforge.net \
    /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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.