I've recently committed a series of changes which affect the way modules are built. Since I can't test *every* module, please let me know immediately if you run into problems with modules refusing to load due to undefined symbols, or not working "quite right". I've tried hard to make sure it's all correct, but bugs and errors are inevitable.
Some overview of what this achieves: Previously, there have been two symbol namespaces in the kernel; the global symbols namespace and the per-source-file namespace. To build a module with more than one source file, one typically had to expose some symbols to the global namespace, risking accidental collisions with other modules. The common workaround for this has been to prefix all exported symbols with a few characters identifying the module, but as we accumulate more modules, this mechanism is becoming less reliable. In order to deal with this problem, I have changed the module build process so that symbols global to the module are converted to local symbols when the module is linked into the .kld/,ko file. In order to allow modules that intentionally export symbols to continue to do so, a new module makefile variable 'EXPORT_SYMS' has been implemented. This variable may take three values; "YES" will revert to the traditional behaviour of exporting all globals. It should typically only be used when converting a module from 4.x, or to quickly verify that a problem is due to a failure to export a symbol. A list of symbol names may be given, and these symbols will be exported. And thirdly, the name of a file may be given, and this file will be read for the list of symbols to export. Note that it is not an error to list a symbol not found in the module object. This allows modules to be built with different options without requiring different export lists. Looking to the near future, this technique will be extended to the building of monolithic kernels as well. The .kld files generated during a module build can be linked with a monolithic kernel, and thus much of the duplicate building of kernel source can be eliminated. Once this conversion is complete, the per-module namespace will behave consistently within the kernel as well. Questions and comments welcome. Regards, Mike To Unsubscribe: send mail to [EMAIL PROTECTED] with "unsubscribe freebsd-current" in the body of the message