LinuxQuestions.org
Visit Jeremy's Blog.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Software
User Name
Password
Linux - Software This forum is for Software issues.
Having a problem installing a new program? Want to know which application is best for the job? Post your question in this forum.

Notices

Reply
 
Search this Thread
Old 07-11-2004, 05:22 PM   #1
pwangee
LQ Newbie
 
Registered: Mar 2004
Posts: 19

Rep: Reputation: 0
how to use c functions in linux kernel mode


Hi,

I used some c functions in my program such as pow, log, puts. When I try to make the program work as a module, it gives some errors.

% /usr/local/sbin/click-install wp-wire-dem.click
/usr/local/lib/click.o: unresolved symbol pow
/usr/local/lib/click.o: unresolved symbol log
/usr/local/lib/click.o: unresolved symbol puts
/usr/local/lib/click.o: unresolved symbol printf
click-install: /sbin/insmod /usr/local/lib/click.o failed

Can I use the c functions in the kernel program? If can, how to use it? Thanks

Peng
 
Old 07-11-2004, 10:47 PM   #2
paulsm4
Guru
 
Registered: Mar 2004
Distribution: SusE 8.2
Posts: 5,863
Blog Entries: 1

Rep: Reputation: Disabled
No - you generally cannot use standard C library functions in kernel code.

I'm not sure if the math functions "pow" or "log" can be made to work safely; the stdlib functions "puts" and "printf" absolutely cannot be used in kernel code.
 
Old 07-12-2004, 12:23 AM   #3
pwangee
LQ Newbie
 
Registered: Mar 2004
Posts: 19

Original Poster
Rep: Reputation: 0
hi,

I think that "pow" and "log" can't be used in kernel. So I have to write it by myself. But do you know how to implement them? or do you know where I can get the source code?

Thanks
Peng
 
  


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
searching functions in emacs dire mode tacca Linux - Software 2 07-03-2005 04:49 PM
kernel functions sunfzam Linux - Software 14 04-10-2005 01:27 AM
UML--->compiling user mode linux in kernel 2.6 waqasgujjar Red Hat 0 12-18-2004 04:20 PM
how to use c functions in linux kernel mode pwangee Linux - General 5 07-12-2004 11:21 PM
Multihead Text mode in Linux Kernel 2.6 RicheBright Linux - General 0 05-30-2004 10:50 PM


All times are GMT -5. The time now is 06:48 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
identi.ca: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration