diff options
author | Rusty Russell <rusty@rustcorp.com.au> | 2002-12-01 02:15:26 -0800 |
---|---|---|
committer | James Bottomley <jejb@raven.il.steeleye.com> | 2002-12-01 02:15:26 -0800 |
commit | c99f5cea7036f066e9cdefade80a85f0c4f13d93 (patch) | |
tree | 9f22f0cd5b16e8da9930261325903546351c0595 /lib | |
parent | 1504317a0d85ff9cbf729d9d4ff3886aacc7a695 (diff) | |
download | history-c99f5cea7036f066e9cdefade80a85f0c4f13d93.tar.gz |
[PATCH] module names fix
By Kai Germaschewski:
"Well, I have another solution, which doesn't need additional Makefile
magic or anything.
I just put the module name into each .o file where <linux/module.h> is
included. Putting it into the section .gnu.linkonce.modname has the effect
that even for multi-part modules, we only end up with one copy of the
name.
Caveat: I'm using the preprocessor macro KBUILD_MODNAME to know what to
put into .gnu.linkonce.modname. The following used to happen:
(drivers/isdn/eicon/Makefile)
divas-objs := common.o Divas_mod.o ...
eicon-objs := common.o eicon_mod.o ...
Divas_mod.o is compiled with -DKBUILD_MODNAME=divas
eicon_mod.o is compiled with -DKBUILD_MODNAME=eicon
common.o is compiled with -DKBUILD_MODNAME=divas_eicon
So in the case above, both divas.o and eicon.o would end up with
a .gnu.linkonce.modname section containing "divas_eicon"
My fix to this is to not define KBUILD_MODNAME when compiling an object
whilch will be linked into more than one module - so common.o gets no
.gnu.linkonce.modname section at all. Works fine here.
Now, doing this I remove one of the reasons why we would need modules
linked as '.ko' ;), but it seems much cleaner than generating a temporary
file, using objcopy etc."
Diffstat (limited to 'lib')
-rw-r--r-- | lib/zlib_deflate/deflate_syms.c | 2 | ||||
-rw-r--r-- | lib/zlib_inflate/inflate_syms.c | 2 |
2 files changed, 0 insertions, 4 deletions
diff --git a/lib/zlib_deflate/deflate_syms.c b/lib/zlib_deflate/deflate_syms.c index 080fa4166f28e6..5985b28c8e307b 100644 --- a/lib/zlib_deflate/deflate_syms.c +++ b/lib/zlib_deflate/deflate_syms.c @@ -19,5 +19,3 @@ EXPORT_SYMBOL(zlib_deflateReset); EXPORT_SYMBOL(zlib_deflateCopy); EXPORT_SYMBOL(zlib_deflateParams); MODULE_LICENSE("GPL"); - -no_module_init; diff --git a/lib/zlib_inflate/inflate_syms.c b/lib/zlib_inflate/inflate_syms.c index 7b8f309350a2ae..aa1b081891219d 100644 --- a/lib/zlib_inflate/inflate_syms.c +++ b/lib/zlib_inflate/inflate_syms.c @@ -20,5 +20,3 @@ EXPORT_SYMBOL(zlib_inflateReset); EXPORT_SYMBOL(zlib_inflateSyncPoint); EXPORT_SYMBOL(zlib_inflateIncomp); MODULE_LICENSE("GPL"); - -no_module_init; |