On Sat, 27 May 2000 19:45:14 -0500 (CDT),
Ted Kline <jtk@xxxxxxx> wrote:
>> fs/fs.o: In function `xfs_cleanup':
>> /export/g/nabbasi/download/linux-2.3-xfs/linux/fs/xfs/xfs_vfsops.c:466:
>> undefined reference to `buf_zone'
>
>Somehow, the reference to 'buf_zone' was being resolved, even though
>it was indeed 'static' in another file, when XFS was
>built as a module, which is how all of us have been running.
For backward compatibility with 2.0 kernels, if a module contains
neither EXPORT_SYMBOL() nor EXPORT_NO_SYMBOLS then *all* symbols are
exported, including statics. xfs as a module has all symbols visible
and a module is allowed to satisfy its own external references (to
handle multiple sources) so buf_zone got resolved.
IMNSHO, xfs should explicitly export any symbols required, if no
symbols are required it should EXPORT_NO_SYMBOLS. I sent a mail a few
days ago about getting access to symbols for debugging without using
EXPORT_SYMBOL, I would like to see xfs do EXPORT_NO_SYMBOLS and xfsidbg
use kallsyms to get the data it needs. This approach gives the same
symbol visibility for modules and code that is built into the kernel.
ps. Starting with kernel 2.5 (actually modutils 2.5) the default for
any modules without EXPORT_SYMBOL will be EXPORT_NO_SYMBOLS. That
is, in 2.5 no symbols will be exported unless you make it explicit.
Keith Owens, modutils maintainer.
|