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 :confused: |
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. |
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 |
All times are GMT -5. The time now is 11:53 PM. |