On Mon, Oct 16, 2000 at 08:17:02PM +0200, Thomas Paoloni wrote:
> This module have not inside the resolved symbols for the DevOpenDriver,
> DevExitBoard, ecc... functions.
> If I link my object to the cifAPI.o object, I can have the previous
> symbols resolved but a I have new symbols unresolved: memset, fprintf,
> ecc ... used by cifAPI.o
> What can I do now ?
> What objects I need to link to my one in order to have all symbols
> solved ?

        memset(), fprintf() and others are libc functions.  What you need to
do is change your module to use kernel specific functions (since the kernel
can't call user-space functions without some trickery . . .).  For example,
change fprintf() to rtl_printf(), and use rtl_printf() just like regular
printf (ie do not specify a filestream to write to).
        Also, there is a memset() function in the kernel, just include 
asm/string.h in your module to get access to it and other string functions 
native to the kernel.
        If you want to get really snazzy and make this piece of code work in
user-space or as a module, try using defines, ie

#ifdef  MODULE
#define fprintf(stream, format, args...)        rtl_printf(format, ## args)
#else   /* not a module */
#define fprintf(stream, format, args...)        fprintf(stream, format, \
                                                        ## args)
#endif  /* MODULE */

Although you will probably run into other more complicated problems with
making it run in both user-space and kernel.

-- 
Nathan Paul Simons, Junior Software Engineer for FSMLabs
http://www.fsmlabs.com/
-- [rtl] ---
To unsubscribe:
echo "unsubscribe rtl" | mail [EMAIL PROTECTED] OR
echo "unsubscribe rtl <Your_email>" | mail [EMAIL PROTECTED]
---
For more information on Real-Time Linux see:
http://www.rtlinux.org/rtlinux/

Reply via email to