kernel module failure for insmod
Hi,
I am trying to do a insmod of a simple hello world program. Compilation goes fine, but on doing insmod, I get "Invalid module format" error. There are no other messages in dmesg or /var/log/messages when the insmod fails. Details below. Someone please help me unblock this.
strings -a hello.ko | grep -i gcc
GCC: (GNU) 4.9.2
GCC: (GNU) 4.9.2
file hello.ko
hello.ko: ELF 64-bit LSB relocatable, x86-64, version 1 (SYSV), BuildID[sha1]=5ca50d7986d0e5708d7087130bd93c2d6ef1be4a, not stripped
OPS#insmod hello.ko
insmod: ERROR: could not insert module hello.ko: Invalid module format
OPS# uname -a
Linux switch 3.9.11 #1 SMP Wed Mar 23 21:56:40 UTC 2016 x86_64 GNU/Linux
OPS# modinfo hello.ko
filename: /home/root/hello.ko
description: A Simple Hello World module
author: Name1
license: GPL
srcversion: F545620F75762B1AAE668ED
depends:
vermagic: 3.9.11 SMP mod_unload
OPS#
dmesg | grep -i gcc
[ 0.000000] Linux version 3.9.11 (jenkins@slave-jk-6.openswitch.net) (gcc version 4.9.2 (GCC) ) #1 SMP Wed Mar 23 21:56:40 UTC 2016
file output for something which is already installed fine:
file /lib/modules/3.9.11/kernel/net/ipv4/ipcomp.ko
/lib/modules/3.9.11/kernel/net/ipv4/ipcomp.ko: ELF 64-bit LSB relocatable, x86-64, version 1 (SYSV), BuildID[sha1]=ec09809676e493b03bac76d6f2d4a0d4194676b3, not stripped
Thanks,
Ganesh
|