LinuxQuestions.org
Review your favorite Linux distribution.
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, 04: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, 09:47 PM   #2
paulsm4
LQ 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-11-2004, 11:23 PM   #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 03:49 PM
kernel functions sunfzam Linux - Software 14 04-10-2005 12:27 AM
UML--->compiling user mode linux in kernel 2.6 waqasgujjar Red Hat 0 12-18-2004 03:20 PM
how to use c functions in linux kernel mode pwangee Linux - General 5 07-12-2004 10:21 PM
Multihead Text mode in Linux Kernel 2.6 RicheBright Linux - General 0 05-30-2004 09:50 PM

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

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