I was trying to make virtualbox kernel modules builtin, I'm almost completed here, but at the final step, it stopped compiling, because kernel seems to treat all vbox* modules as a single one:
drivers/vboxnetadp/built-in.o: In function `cleanup_module':
(.exit.text+0x0): multiple definition of `cleanup_module'
drivers/vboxdrv/built-in.o:(.exit.text+0x0): first defined here
drivers/vboxnetadp/built-in.o: In function `init_module':
(.init.text+0x0): multiple definition of `init_module'
.. suppressed output ...
make[1]: *** [drivers/built-in.o] Error 1
make: *** [drivers] Error 2
Any thoughts ? Here's how I got that:
I copied all module sources into drivers folder, edit the makefile, put a obj-y += vbox/, and edit all Makefile of vbox modules, change obj-m to obj-y to make them builtin, pretty dirty hack, but worked.
EDIT
Why need to do that ? I need to disable module loading on my machine, so no modules should be present, I've made all modules wrote by myself builtin, only thing left is vbox's ones now