mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
* [PATCH] Richard Henderson for President!
@ 2003-01-17  4:49 Rusty Russell
  0 siblings, 0 replies; only message in thread
From: Rusty Russell @ 2003-01-17  4:49 UTC (permalink / raw)
  To: torvalds; +Cc: linux-kernel, rth

Linus, please apply.  Makes symbol_get work if !CONFIG_MODULE.

Name: symbol_get fix
Author: Rusty Russell
Status: Trivial

D: Make symbol_get() use undefined weak symbols if !CONFIG_MODULE.
D: Many thanks to RTH for introducing undef weak symbols to me.

diff -urpN --exclude TAGS -X /home/rusty/devel/kernel/kernel-patches/current-dontdiff --minimal .932-linux-2.5-bk/include/linux/module.h .932-linux-2.5-bk.updated/include/linux/module.h
--- .932-linux-2.5-bk/include/linux/module.h	2003-01-17 12:59:22.000000000 +1100
+++ .932-linux-2.5-bk.updated/include/linux/module.h	2003-01-17 15:44:57.000000000 +1100
@@ -344,7 +344,7 @@ static inline int module_text_address(un
 }
 
 /* Get/put a kernel symbol (calls should be symmetric) */
-#define symbol_get(x) (&(x))
+#define symbol_get(x) ({ extern typeof(x) x __attribute__((weak)); &(x); })
 #define symbol_put(x) do { } while(0)
 #define symbol_put_addr(x) do { } while(0)
 

--
  Anyone who quotes me in their sig is an idiot. -- Rusty Russell.

^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2003-01-17  4:41 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2003-01-17  4:49 [PATCH] Richard Henderson for President! Rusty Russell

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®