SlackwareThis Forum is for the discussion of Slackware Linux.
Notices
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Get a virtual cloud desktop with the Linux distro that you want in less than five minutes with Shells! With over 10 pre-installed distros to choose from, the worry-free installation life is here! Whether you are a digital nomad or just looking for flexibility, Shells can put your Linux machine on the device that you want to use.
Exclusive for LQ members, get up to 45% off per month. Click here for more info.
For a while I have been building a custom kernel and today i cam across this section mismatch.
Code:
AR arch/x86/lib/lib.a
LD vmlinux.o
MODPOST vmlinux.o
WARNING: vmlinux.o(.cpuinit.data+0x0): Section mismatch in reference from the variable initial_code to the function .init.text:i386_start_kernel()
The variable __cpuinitdata initial_code references
a function __init i386_start_kernel().
If i386_start_kernel is only used by initial_code then
annotate i386_start_kernel with a matching annotation.
Any ideas on what is causing it or how it can be fixed. I found a patch on a third party website but am cautious about using it.
I can't recall the *exact* reason for why the offending code layout leads to a section mismatch error, but after last time I had one or two, I had looked up the reason for them and fixed the code.
What I do remember was that something near the END of the c sourcecode was expected (by the compiler) to be near the beginning of the file.
Examine the patch you have; if it moves something from the bottom of the file to the top, or vice versa, but otherwise does not re-write any code, give it a try. Keep a backup of the original sourcecode though incase of problems.
Either way, section mismatches seem to be more annoying messages than anything else; they don't cause run problems, i.e. the kernel will work fine.
I can't recall the *exact* reason for why the offending code layout leads to a section mismatch error, but after last time I had one or two, I had looked up the reason for them and fixed the code.
What I do remember was that something near the END of the c sourcecode was expected (by the compiler) to be near the beginning of the file.
Examine the patch you have; if it moves something from the bottom of the file to the top, or vice versa, but otherwise does not re-write any code, give it a try. Keep a backup of the original sourcecode though incase of problems.
Either way, section mismatches seem to be more annoying messages than anything else; they don't cause run problems, i.e. the kernel will work fine.
Sasha
Ah, ok thanks!
I understand that they are just annoying messages but still i would rather not have them
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.