I've got a binary only module build for kernel 22.214.171.124-76.fc9.i686, and I would like to use it on a '126.96.36.199-57.fc8.i686' kernel.
When I try to "insmod" the module, I've got the following error:
version magic '188.8.131.52-76.fc9.i686 SMP mod_unload 686 4KSTACKS ' should be '184.108.40.206-57.fc8 SMP mod_unload 686 4KSTACKS '
If I make a "modinfo -F vermagic" on one of the driver I'm using on my system, I've got:
220.127.116.11-57.fc8 SMP mod_unload 686 4KSTACKS
and on the driver I want to use:
18.104.22.168-76.fc9.i686 SMP mod_unload 686 4KSTACKS
So to change this vermagic, I:
-create a file with the closed module .modsection contents,
-into this file I'm changing the vermagic with thhe target one
-then I "objcopy" like this:
objcopy --remove-section=.modinfo --add-section .modinfo=modinfo_file $MODULE
Then when I try to insmod the module, I've got an "Invalid module format" error, but dmesg say nothing more...
If I make an "objdump -h" on the module I can see that the .modinfo section now have following info:
10 .modinfo 00000072 00000000 00000000 0000165a 2**0
but the original driver have:
4 .modinfo 00000077 00000000 00000000 0000044c 2**2
CONTENTS, ALLOC, LOAD, READONLY, DATA
I think that why I'm not able to load the modified module, but after some googling, I can't found any way how to adjust these section parameters. Can anybody tell me if:
-it's possible to do what I want to do since the kernels version are really close
-if it's the good way to do this
-how I can specify the section information to force its index, its offset, the alignment and add the "ALLOC", "LOAD", and "DATA" parameters...