LinuxQuestions.org
Download your favorite Linux distribution at LQ ISO.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Software > Linux - Kernel
User Name
Password
Linux - Kernel This forum is for all discussion relating to the Linux kernel.

Notices


Reply
  Search this Thread
Old 08-18-2011, 03:57 AM   #1
minumid
LQ Newbie
 
Registered: Aug 2011
Posts: 4

Rep: Reputation: Disabled
kernel source question


i want to know what file.c first starts to execut... in other words, where is the Main () function located? what file.c?
 
Old 08-18-2011, 04:04 AM   #2
archieval
Member
 
Registered: Apr 2007
Location: Philippines
Distribution: Kubuntu, Ubuntu, CentOS
Posts: 289

Rep: Reputation: 41
I think it is init/main.c
 
Old 08-19-2011, 10:58 PM   #3
minumid
LQ Newbie
 
Registered: Aug 2011
Posts: 4

Original Poster
Rep: Reputation: Disabled
i cant find main() function there (init/main.c)
if the first function that execut isn't something like main() so what function do this, in init/main.c file?
 
Old 08-24-2011, 10:24 PM   #4
reg13
LQ Newbie
 
Registered: Jun 2011
Posts: 19

Rep: Reputation: Disabled
Quote:
Originally Posted by minumid View Post
i cant find main() function there (init/main.c)
if the first function that execut isn't something like main() so what function do this, in init/main.c file?
as far as i know;
kernel execution starts at init/main.c start_kernel() function, line 537 in mine.
kernel execution is not line executing the main() function of another normal executable program. its being loaded to a particular memory location and CPU jumps there and starts execution.
 
1 members found this post helpful.
Old 08-25-2011, 04:45 AM   #5
minumid
LQ Newbie
 
Registered: Aug 2011
Posts: 4

Original Poster
Rep: Reputation: Disabled
i know bootloader load kernel into memory. and can i ask where is bootloader's source file located? if any...
 
  


Reply



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
Another Kernel Source Question skibud2 Mandriva 1 01-07-2007 05:58 PM
Kernel from source Question Jukas Debian 4 08-11-2006 06:52 PM
casting question in kernel source code linetnew Programming 3 04-18-2005 04:55 AM
newer Fedora kernel-source question cdrobsonjr Fedora 1 10-15-2004 07:40 AM
question about kernel source caesarkim Linux - Newbie 2 11-15-2003 07:26 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Software > Linux - Kernel

All times are GMT -5. The time now is 06:33 PM.

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