[Gta04-owner] Linux 3.2-rc3 on GTA04

NeilBrown neilb at suse.de
Tue Nov 29 21:46:32 CET 2011


On Tue, 29 Nov 2011 21:26:04 +0100 Johannes Schauer <j.schauer at email.de>
wrote:

> Hi,
> 
> On Wed, Nov 30, 2011 at 07:03:57AM +1100, NeilBrown wrote:
> > It sounds a bit like a tool-chain problem to me.
> > 
> > What does
> >    objdump -j __versions -s  g_ether.ko
> > report?
> > 
> > I suspect you don't have  that entry or maybe don't have the whole
> > section.
> 
> indeed the whole section is missing... odd :(
> 
> I wonder how to solve it - this didnt happen before.

It is odd.

The version information is added by scripts/mod/modpost which is compiled
from a .c file.

scripts/Makefile.modpost contains:

modpost = scripts/mod/modpost                    \
 $(if $(CONFIG_MODVERSIONS),-m)                  \
 $(if $(CONFIG_MODULE_SRCVERSION_ALL),-a,)       \
 $(if $(KBUILD_EXTMOD),-i,-o) $(kernelsymfile)   \
 $(if $(KBUILD_EXTMOD),-I $(modulesymfile))      \
 $(if $(KBUILD_EXTRA_SYMBOLS), $(patsubst %, -e %,$(KBUILD_EXTRA_SYMBOLS))) \
 $(if $(KBUILD_EXTMOD),-o $(modulesymfile))      \
 $(if $(CONFIG_DEBUG_SECTION_MISMATCH),,-S)      \
 $(if $(KBUILD_EXTMOD)$(KBUILD_MODPOST_WARN),-w) \
 $(if $(cross_build),-c)


The important part here is the '-m' which is added if CONFIG_MODVERSIONS.
This tells modpost to add the __versions section.

It creates  g_ether.mod.c  which you can look at.
I have in it:

static const struct modversion_info ____versions[]
__used
__attribute__((section("__versions"))) = {
        { 0x4db2bff4, "module_layout" },
        { 0x6bb8979e, "device_remove_file" },
 
So you can see the __versions section being created.

Which bit of that is going wrong, I cannot imagine.

NeilBrown
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 828 bytes
Desc: not available
URL: <http://lists.goldelico.com/pipermail/gta04-owner/attachments/20111130/6af279a3/attachment.bin>


More information about the Gta04-owner mailing list