mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
* [PATCH] mark __init code noinline to stop erroneous inclusions
@ 2005-10-17 21:37 Ben Dooks
  2005-10-18  1:03 ` Coywolf Qi Hunt
  0 siblings, 1 reply; 3+ messages in thread
From: Ben Dooks @ 2005-10-17 21:37 UTC (permalink / raw)
  To: linux-kernel

[-- Attachment #1: Type: text/plain, Size: 361 bytes --]

Make __init also have the noinline attribute attached
to it, to stop code marked as __init being included
into non __init code. This not only wastes space, but
also makes it impossible to track down any calls from
non-init code as differing compilers and optimisations
make differing decisions on what to inline.

Signed-off-by: Ben Dooks <ben-linux@fluff.org>

[-- Attachment #2: init-noinline-code.patch --]
[-- Type: text/plain, Size: 643 bytes --]

--- linux-2.6.14-rc4-git4-bjd2/include/linux/init.h	2005-09-01 21:02:39.000000000 +0100
+++ linux-2.6.14-rc4-git4-bjd3/include/linux/init.h	2005-10-17 22:26:48.000000000 +0100
@@ -41,7 +41,7 @@
 
 /* These are for everybody (although not all archs will actually
    discard it in modules) */
-#define __init		__attribute__ ((__section__ (".init.text")))
+#define __init		noinline __attribute__ ((__section__ (".init.text")))
 #define __initdata	__attribute__ ((__section__ (".init.data")))
 #define __exitdata	__attribute__ ((__section__(".exit.data")))
 #define __exit_call	__attribute_used__ __attribute__ ((__section__ (".exitcall.exit")))

^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2005-10-18 10:38 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2005-10-17 21:37 [PATCH] mark __init code noinline to stop erroneous inclusions Ben Dooks
2005-10-18  1:03 ` Coywolf Qi Hunt
2005-10-18 10:38   ` Ben Dooks

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

all inboxes | Powered by JetHome®