If you even define KBUILD_EXTRA_SYMBOLS in Makefile it will not be expanded into command line argument for modpost.
Created attachment 17772 [details] linux-2.6-KBUILD_EXTRA_SYMBOLS.patch This patch fixes the issue.
Please send the patch via email to Sam Ravnborg <sam@ravnborg.org> Andrew Morton <akpm@linux-foundation.org> linux-kernel@vger.kernel.org as per Documentation/SubmittingPatches, thanks.
Added kbuild-fix-kbuild_extra_symbols.patch to -mm.
Thank you Andrew and sorry for delay. To make this patch available in Linus tree should I still send patch to linux-kernel@vger.kernel.org?
Hi, Is this still broken in 2.6.31? I'm using Ubuntu and I'm not able to successfully build a kernel module using KBUILD_EXTRA_SYMBOLS. I have to copy the Module.symvers in manually so my modules will build with no warnings and load into the kernel. Thanks in advance
Reuben, to get help, tell us what you need and what went wrong.
Hi, I have two modules, one depends on the other. Both modules are in their own directory like so... ksocket/src/... kradvd/... If I build kradvd with KBUILD_EXTRA_SYMBOLS := ../ksocket/src/Module.symvers I get undefined symbols from ksocket and kradvd.ko will not load. If I do this form kradvd... cp ../ksocket/src/Module.symvers . and remove KBUILD_EXTRA_SYMBOLS from the makefile, kradvd builds and loads successfully. KBUILD_EXTRA_SYMBOLS is broken. Thanks, Reuben
It does not work with relative paths. Use KBUILD_EXTRA_SYMBOLS := $(TOPDIR)/ksocket/src/Module.symvers