On Thu, May 17, 2007 at 04:51:30PM -0400, Robert P. J. Day wrote: > > i just noticed something about building multiple modules i never > realized before, and want to verify that it's actually a feature. > > if i build a single module that refers to something that will be > available in the kernel address space when that module is loaded, i'll > get an "undefined reference" warning during the build, but the module > will still build, of course, since that reference won't be satisfied > until the module is loaded. > > however, if i'm building two modules in the same directory, and one > of them defines that symbol and EXPORTs it, then i don't get the > warning when the other module is being built since, as i read it, the > build process is collecting symbols in Module.symvers that it uses to > check references. > > note that, even if i build two modules using the same Makefile, > there's nothing to say they're even *remotely* related, but the build > process appears to collect exported symbols just in case and uses that > information to deal with potential warnings. > > is that deliberate? it's not like it's a big deal, and doesn't > affect the final build in any way, i had just never noticed that > before. I believe that someone asked the list a question about getting rid of these undefined ref warnings. IIRC the answer was to do what you just described, and build them in the same directory so that the build process can pick up the symbols of the other module. I assume that it must be a feature. Ethan -- To unsubscribe from this list: send an email with "unsubscribe kernelnewbies" to ecartis@xxxxxxxxxxxx Please read the FAQ at http://kernelnewbies.org/FAQ