which gcc is my kernel compiled with
Is there a command to tell me which gcc my kernel was compiled with? I didn't compile the kernel myself - just installed it. I'm running Ubuntu 9.10. uname command output:
$uname -a $Linux connie 2.6.31-21-generic #59-Ubuntu SMP Wed Mar 24 07:28:56 UTC 2010 i686 GNU/Linux Thanks |
Hi -
AFAIK, No: there isn't any command that tells you which version of GCC a kernel was compiled with. But out of curiousity: *why*? PS: One (perhaps useful, perhaps not ;)) bit of trivia: When you start compiling your own kernels, you can specify "CONFIG_IKCONFIG_PROC". This will create a file "/proc/config.gz", so you can always see exactly what options were specified in building the kernel. |
I have read on the web that to load a .ko the OS, kernel, and GCC on the machine I am trying to load on must be the same as the compiler machine.
I would like to load a module that was not compiled on my machine. When I try to load the module I get: insmod: error inserting './example.ko': -1 Invalid module format From the syslog I get: example: disagrees about version of symbol module_layout Thanks for any suggestions |
You can use an editor with a small module, e.g.
/lib/modules/2.6.xx.xx/kernel/drivers/pci/pci-stub.ko (5.9 kB) .. and read the GCC version. ( Or do 'zcat pci-stub.ko.gz') But gcc alone is not a guaranty for any compatibility. Must also be the same OS, same version, same kernel. .. |
All times are GMT -5. The time now is 03:25 PM. |