Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 92988
b: refs/heads/master
c: 0d96fb2
h: refs/heads/master
v: v3
  • Loading branch information
Richard Hacker authored and Sam Ravnborg committed Apr 25, 2008
1 parent 09f1536 commit 322d301
Show file tree
Hide file tree
Showing 3 changed files with 17 additions and 2 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: 2d04b5ae1bf527201a7505c9be7526c43ebd2930
refs/heads/master: 0d96fb20b7ed757fc936bb35e26c22251a75b734
9 changes: 8 additions & 1 deletion trunk/Documentation/kbuild/modules.txt
Original file line number Diff line number Diff line change
Expand Up @@ -486,7 +486,7 @@ Module.symvers contains a list of all exported symbols from a kernel build.
Sometimes, an external module uses exported symbols from another
external module. Kbuild needs to have full knowledge on all symbols
to avoid spitting out warnings about undefined symbols.
Two solutions exist to let kbuild know all symbols of more than
Three solutions exist to let kbuild know all symbols of more than
one external module.
The method with a top-level kbuild file is recommended but may be
impractical in certain situations.
Expand Down Expand Up @@ -523,6 +523,13 @@ Module.symvers contains a list of all exported symbols from a kernel build.
containing the sum of all symbols defined and not part of the
kernel.

Use make variable KBUILD_EXTRA_SYMBOLS in the Makefile
If it is impractical to copy Module.symvers from another
module, you can assign a space separated list of files to
KBUILD_EXTRA_SYMBOLS in your Makfile. These files will be
loaded by modpost during the initialisation of its symbol
tables.

=== 8. Tips & Tricks

--- 8.1 Testing for CONFIG_FOO_BAR
Expand Down
8 changes: 8 additions & 0 deletions trunk/scripts/Makefile.modpost
Original file line number Diff line number Diff line change
Expand Up @@ -42,6 +42,13 @@ _modpost: __modpost

include include/config/auto.conf
include scripts/Kbuild.include

ifneq ($(KBUILD_EXTMOD),)
# Include the module's Makefile to find KBUILD_EXTRA_SYMBOLS
include $(if $(wildcard $(KBUILD_EXTMOD)/Kbuild), \
$(KBUILD_EXTMOD)/Kbuild, $(KBUILD_EXTMOD)/Makefile)
endif

include scripts/Makefile.lib

kernelsymfile := $(objtree)/Module.symvers
Expand Down Expand Up @@ -69,6 +76,7 @@ modpost = scripts/mod/modpost \
$(if $(CONFIG_MODULE_SRCVERSION_ALL),-a,) \
$(if $(KBUILD_EXTMOD),-i,-o) $(kernelsymfile) \
$(if $(KBUILD_EXTMOD),-I $(modulesymfile)) \
$(if $(iKBUILD_EXTRA_SYMBOLS), $(patsubst %, -e %,$(EXTRA_SYMBOLS))) \
$(if $(KBUILD_EXTMOD),-o $(modulesymfile)) \
$(if $(CONFIG_DEBUG_SECTION_MISMATCH),,-S) \
$(if $(CONFIG_MARKERS),-K $(kernelmarkersfile)) \
Expand Down

0 comments on commit 322d301

Please sign in to comment.