Re: warnings while compiling 2.1.81

Michael Elizabeth Chastain (mec@shout.net)
Wed, 28 Jan 1998 10:31:39 -0600


Hi Bryn,

> Erm, bsd_comp, and ppp_deflate are always built as modules, because of
> pattent issues in bsd_comp's case, and I assume that ppp_deflate is just
> followning bsd_comp's lead ;).

That's right. ppp_deflate has an init_module function, but does not
have any means to call ppp_register_compressor if ppp_deflate.o is
built as part of the resident (no initialization function).

> Basically if you slap a #ifdef CONFIG_MODULES arround them, you can't
> use compressors when ppp is builtin.

That's wrong. There *is* a difference between CONFIG_MODULES and MODULE.
CONFIG_MODULES is true when the resident kernel supports loadable modules,
MODULE is true when the file being built is a module. So CONFIG_MODULES
is the right test, and gcc has exactly the right warnings.
(When CONFIG_MODULES is enabled, EXPORT_SYMBOL(foo) is a use of foo,
and when CONFIG_MODULES is disabled, EXPORT_SYMBOL(foo) is empty and
is *not* a use of foo).

Before I published my patch, I built a kernel with CONFIG_MODULES=y and
CONFIG_PPP=y and verified that ppp_register_compressor and
ppp_unregister_compressor are present in the symbol table and that they
have ksymtab and kstrtab entries too.

I'm pretty sure I'm right about this but I am open to evidence. Go for it,
build a kernel with the problem as you see it and send me the .config
file and some evidence. I'll hold onto my patch for a while.

Regards,

Michael Chastain
<mailto:mec@shout.net>
"love without fear"