LinuxQuestions.org
Latest LQ Deal: Latest LQ Deals
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie
User Name
Password
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!

Notices


Reply
  Search this Thread
Old 01-02-2009, 02:10 AM   #1
santigopal_mondal
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 03:23 AM.
 
Old 01-03-2009, 02:42 PM   #2
paulsm4
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:
http://www.faqs.org/docs/kernel/x204.html

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


Reply

Tags
linking



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

LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie

All times are GMT -5. The time now is 01:22 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