LINUX.IE, website of the Irish Linux Users' Group
Tux rules!

   
Home
New Users
Articles
Download
Projects
Community
Vendors

  Print Version
Email to...
 
Archives:


planetILUG

Recent News

News Archive


Join the
ILUG
on FaceBook


Join the
ILUG
on LinkedIn


Join the
ILUG SETI
Group



















 
 :: Mailing Lists

[ILUG] kernel <-> gcc

[ILUG] kernel <-> gcc

Darragh Bailey felix at compsoc.nuigalway.ie
Fri Sep 15 12:25:58 IST 2006


Been working with redhat kernels for a while now and I've noticed that
the VERMAGIC_STRING only ever specifies the first two numbers from the
gcc version number. So I assumed that that was all that was relevant to
the kernel and therefore you could compile a kernel with gcc 3.4.4 and
external module with gcc 3.4.5 and there wouldn't be a problem. 

What I've noticed is that in some cases where you take the same kernel
and recompile it and then compile external modules against that kernel, 
you see messages about "struct_module" version not matching.

Currently I suspect that when I've seen those messages it's because the
kernel was originally compiled with the older version of gcc and the
additional modules were compiled against the kernel that was recompiled 
with the newer version of gcc.

So both gcc 3.4.4 and gcc 3.4.6 will just have gcc 3.4 in the vermagic
field of the modinfo data of every module compiled with those versions
of gcc against a particular kernel.

Looking at the header file that defines "struct module"
(include/linux/module.h), which is what the export symbol of struct_module
is, there doesn't appear to be anything that the gcc version should
affect.


Since we regular recompile kernels its useful to understand everything
that can affect the result. Where we need to prep a kernel tree of a
kernel that is already in use, in order to recompile some external
modules, we would use the same environment which would prevent the
problem if it is only caused by gcc changes. if it's not, I still need
to work out where it originates.


I'm sure I'll get around to doing enough tests at some stage to be
certain of what causes the struct_module mismatch, but any pointers
would be appreciated.


I've already confirmed that if you have the devel package from the
kernel that was built with the slightly older gcc, there's no problems.
It appears to be limited to where the symbols are regenerated in a
slightly newer environment. (i.e. RHEL4 Update 3 v Update 2).


-- 
Darragh

"Nothing is foolproof to a sufficently talented fool."



More information about the ILUG mailing list
Read this without the formatting.
                                                                                                    

 

Hosted by HEAnet


Maintained by the ILUG website team. The aim of Linux.ie is to support and help commercial and private users of Linux in Ireland. You can display ILUG news in your own webpages, read backend information to find out how. Networking services kindly provided by HEAnet, server kindly donated by Dell. Linux is a trademark of Linus Torvalds, used with permission. No penguins were harmed in the production or maintenance of this highly praised website. Looking for the Indian Linux Users' Group? Try here. If you've read all this and aren't a lawyer: you should be!
RSS Version
Powered by Dell