Article 5M2TN load driver with insmod get :disagrees about version of symbol module_layout

load driver with insmod get :disagrees about version of symbol module_layout

by
yntnm
from LinuxQuestions.org on (#5M2TN)
I compiled simple drive for Linux kernel for ARM system:

Code:$ uname -a Quote:
Linux CR5 4.4.171-cr5 #2 Tue Mar 10 11:49:00 CET 2020 armv7l GNU/Linux
To compile i used the config file from the up ruining system located at:

Quote:
/proc/config.gz
i downloaded a vanilla kernel, checkout to tag 4.4.5, replace the config file ,compile the kernel, and then compile the drive with the tool-chine for arm

Quote:
gcc-linaro-7.2.1-2017.11-i686_arm-linux-gnueabi
The drive contain simple code

Code:#include <linux/module.h>
#include <linux/kernel.h>

int init_module(void) {
printk(KERN_INFO "Hello world.\n");
return 0;
}

void cleanup_module(void) {
printk(KERN_INFO "Goodbye world.\n");
}i used insmod to load the driver but the err message to terminal is:

Quote:
insmod: ERROR: could not insert module test_module.ko: Invalid module format
at the dmesg i get this message

Quote:
test_module: disagrees about version of symbol module_layout

However, when i compere between running module in the system with my module with readelf -a

The ELF Header are the same and the File Attributes are the same.

what can i check more?
Maybe the module loading was blocked by kernel? how can i check that?
some one hes a lead for my what i can do next?


p.s
- simple c program is ruining fine, so i guess the tool-chine is fine
- insmod -f not work as well

Thankslatest?d=yIl2AUoC8zA latest?i=Me61hMwGRZw:LTa_B7eBH18:F7zBnMy latest?i=Me61hMwGRZw:LTa_B7eBH18:V_sGLiP latest?d=qj6IDK7rITs latest?i=Me61hMwGRZw:LTa_B7eBH18:gIN9vFwMe61hMwGRZw
External Content
Source RSS or Atom Feed
Feed Location https://feeds.feedburner.com/linuxquestions/latest
Feed Title LinuxQuestions.org
Feed Link https://www.linuxquestions.org/questions/
Reply 0 comments