LinuxQuestions.org
Download your favorite Linux distribution at LQ ISO.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Slackware
User Name
Password
Slackware This Forum is for the discussion of Slackware Linux.

Notices


Reply
  Search this Thread
Old 06-18-2009, 10:14 PM   #1
C-Sniper
Member
 
Registered: Dec 2006
Distribution: Slackware
Posts: 507

Rep: Reputation: 33
Kernel Section Mismatch with regards to i386


Hi all,

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.

Thanks
 
Old 06-18-2009, 10:44 PM   #2
GrapefruiTgirl
LQ Guru
 
Registered: Dec 2006
Location: underground
Distribution: Slackware64
Posts: 7,594

Rep: Reputation: 555Reputation: 555Reputation: 555Reputation: 555Reputation: 555Reputation: 555
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
 
Old 06-19-2009, 12:12 AM   #3
C-Sniper
Member
 
Registered: Dec 2006
Distribution: Slackware
Posts: 507

Original Poster
Rep: Reputation: 33
Quote:
Originally Posted by GrapefruiTgirl View Post
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
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
Compile linux kernel error: WARNING: modpost: Found 1 section mismatch(es) xmzhu Linux - Kernel 9 04-29-2011 02:14 AM
What is a kernel section mismatch C-Sniper Linux - Kernel 4 08-10-2008 12:09 AM
WARNING: drivers/... - Section mismatch: dasoberdick Slackware 1 06-15-2007 01:55 PM
MD5SUM mismatch for debian-40r0-i386-CD-1.iso gregben Debian 4 06-04-2007 12:25 PM
Problems compiling 2.6.18: Section mismatch [newbie] Shioni Linux - General 7 09-23-2006 09:54 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Slackware

All times are GMT -5. The time now is 01:08 AM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration