Visit Jeremy's Blog.
Go Back > Forums > Non-*NIX Forums > Programming
User Name
Programming This forum is for all programming questions.
The question does not have to be directly related to Linux and any language is fair game.


  Search this Thread
Old 12-05-2011, 03:29 AM   #16
Senior Member
Registered: Apr 2007
Location: Portland, OR
Distribution: Debian, Android, LFS
Posts: 1,168

Rep: Reputation: 210Reputation: 210Reputation: 210

There are actually a lot more than two files generated, but never mind that for now.

The situation is analogous to compiling any user space code. First, a .c file is transformed into object code, in a .o. Next, the .o code is linked together to produce a library or executable.

The situation is no different with Linux, except that the linker links against a custom linker script, and names its file .ko instead.
1 members found this post helpful.
Old 12-09-2011, 10:02 AM   #17
Senior Member
Registered: Mar 2008
Location: Cyberspace
Distribution: Dynebolic, Ubuntu 10.10
Posts: 1,340

Rep: Reputation: 62
What exactly does "links against a custom linker script" mean?
Old 09-24-2012, 08:54 AM   #18
LQ Newbie
Registered: Sep 2012
Posts: 1

Rep: Reputation: Disabled
Thumbs up Thank you

I am new to kernel programming and I was trying to manually specify /usr/src header files using gcc and it just wouldnt work! I did not know these basics. Thank you so much!
1 members found this post helpful.
Old 02-21-2013, 04:14 PM   #19
LQ Newbie
Registered: Feb 2013
Posts: 1

Rep: Reputation: Disabled
I m not able to see message in dmesg log

Hello Experts... Can somebody help me what would be the problem that "Hello World" is not logged in dmesg.

Below is my module it compiled with out errors.... after inserting the module with command insmod hello.ko, and run dmesg to check the message "Hello world".. i am not able to see the message....

i have checked the command lsmod, i can see hello module in the list of modules.....


static int hello_init(void)
printk(KERN_ALERT "Hello World\n");
return 0;

static void hello_exit(void)
printk(KERN_ALERT "Hello World, bye\n");


With Regards


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
[SOLVED] partport module is seing my parallel port but lp module doesn´t found any device... fcintron Linux - Hardware 3 03-07-2011 10:45 AM
Compile and load kernel module automatically after boot? (Intel NIC module) touser Linux - Newbie 3 08-29-2009 09:45 PM
error: -1 Invalid module format when using insmod with module cross-compiled for arm AndrewShanks Linux - Embedded & Single-board computer 4 10-15-2007 04:50 AM
kcmshell module, Background&Screensaver Module can't be launch (but works @LookNFeeL) bobbyjoe Linux - Software 0 01-08-2005 05:48 AM
'Invalid module format' loading simple module on Suse Linux Professional 9.1 rocketdude Linux - Distributions 3 07-28-2004 12:40 AM > Forums > Non-*NIX Forums > Programming

All times are GMT -5. The time now is 01:32 PM.

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