Share your knowledge at the LQ Wiki.
Go Back > Forums > Linux Forums > Linux - Newbie
User Name
Linux - Newbie This Linux forum is for members that are new to Linux.
Just starting out and have a question? If it is not in the man pages or the how-to's this is the place!


  Search this Thread
Old 01-02-2009, 03:10 AM   #1
LQ Newbie
Registered: Jan 2009
Posts: 1

Rep: Reputation: 0
Lightbulb linking .o files built in user space against kernel module using kbuild

Hi All,

I have a relocatable obj file built in user space which does not depennd on any kernel symbols.

I want to build a kernel module which needs to call the APIs defined in the .o file(user-space). I am able to link it with warning ".filename.o.cmd" missing.

Now when I want to insmod the .ko file, it gives the following message.
overflow in relocattion type 10 val ffffffff8835fc10
"module" likely not compiled with -mcmodel=kernel

Waiting for your replies.Thanks a lot.

Last edited by santigopal_mondal; 01-02-2009 at 04:23 AM.
Old 01-03-2009, 03:42 PM   #2
LQ Guru
Registered: Mar 2004
Distribution: SusE 8.2
Posts: 5,863
Blog Entries: 1

Rep: Reputation: Disabled
Hi -

1. It doesn't, of course, matter where you build your module.

2. It matters very much, however, that a kernel module be specially built *as* a kernel module. Here is a link on compiling kernel modules:

3. It's also essential that you *not* call user-space runtime library functions (like "printf()") from a kernel module.



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
how to send events from kernel module to user space process yugandhar Linux - Kernel 2 02-21-2011 11:39 AM
Kernel Module to send Message to User Space Application hnshashi Linux - Newbie 2 08-22-2008 01:48 AM
Kernel compilation: Is it posiible to change built-in[] option to module<> ravime Linux - Kernel 4 07-30-2007 09:12 AM
Linking precompile archive/object files with kernel module possible? Mechanic Linux - General 0 08-25-2006 03:08 PM
iptables - module, or built into kernel? dunkyb Linux - General 3 02-16-2003 07:04 PM > Forums > Linux Forums > Linux - Newbie

All times are GMT -5. The time now is 04:26 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
Open Source Consulting | Domain Registration