Bug 11567 - KBUILD_EXTRA_SYMBOLS is not working
Summary: KBUILD_EXTRA_SYMBOLS is not working
Status: RESOLVED CODE_FIX
Alias: None
Product: Other
Classification: Unclassified
Component: Other (show other bugs)
Hardware: All Linux
: P1 normal
Assignee: other_other
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2008-09-14 03:17 UTC by Peter Volkov
Modified: 2010-01-12 19:22 UTC (History)
1 user (show)

See Also:
Kernel Version: 2.6.26
Subsystem:
Regression: No
Bisected commit-id:


Attachments
linux-2.6-KBUILD_EXTRA_SYMBOLS.patch (616 bytes, patch)
2008-09-14 03:18 UTC, Peter Volkov
Details | Diff

Description Peter Volkov 2008-09-14 03:17:18 UTC
If you even define KBUILD_EXTRA_SYMBOLS in Makefile it will not be expanded into command line argument for modpost.
Comment 1 Peter Volkov 2008-09-14 03:18:24 UTC
Created attachment 17772 [details]
linux-2.6-KBUILD_EXTRA_SYMBOLS.patch

This patch fixes the issue.
Comment 2 Andrew Morton 2008-09-22 17:15:42 UTC
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.
Comment 3 Andrew Morton 2008-09-23 13:08:26 UTC
Added kbuild-fix-kbuild_extra_symbols.patch to -mm.
Comment 4 Peter Volkov 2008-09-24 01:53:10 UTC
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?
Comment 5 Reuben 2009-12-30 16:34:08 UTC
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
Comment 6 Peter Volkov 2010-01-12 09:04:35 UTC
Reuben, to get help, tell us what you need and what went wrong.
Comment 7 Reuben 2010-01-12 16:27:55 UTC
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
Comment 8 Peter Volkov 2010-01-12 19:22:57 UTC
It does not work with relative paths. Use 
KBUILD_EXTRA_SYMBOLS := $(TOPDIR)/ksocket/src/Module.symvers

Note You need to log in before you can comment on or make changes to this bug.