On Thu, 2007-10-25 14:25:40 +0530, kaka <share.kt@xxxxxxxxx> wrote: > > Thanks for the overhelming responses. > I was able to remove the problem of Unknown symbols by linking the proper > libraries. Now the problem got reduced to the following messages. > > # insmod brcmstfb.ko > brcmstfb: Unknown symbol printf > brcmstfb: Unknown symbol malloc > brcmstfb: Unknown symbol free > insmod: cannot insert `brcmstfb.ko': Unknown symbol in module (2): No such > file or directory > # You cannot use printf(), malloc() and free() in your driver. This is kernel code, not userland. Kernel has similar functions (printk(), various memory-allocating functions and kfree()), but keep in mind that they may behave a bit differently. > for the above problem i had tried to link "libgcc.a " but those symbols are > also undefined in it also. This may not be correct for all cases. libgcc.a is compiled for the target the compiler is targeted to. In unfortunate cases, there may be opcodes used in libgcc that are not available in your CPU... > RECAP: > While running the cross compiled directFB example on MIPS chip,* > We tried to install the framebuffer driver(command given above) after > creating the node fb0. You'd post your driver's sources. That way, we'd suggest improvements to correctly adapt it to Linux's APIs. > APPROACH: > Actually the code of frambuffer driver consists of usual kernel framebuffer > code and properitiary graphics lib code. > The properitiary graphics lib code is using malloc,print and free from < > stdlib.h> and that is why those symbols are coming undefined. stdlib.h functionality is not per se available. You either need to implement the missing parts, or rework the stuff to use the proper kernel interfaces (which is what I recommend.) MfG, JBG -- Jan-Benedict Glaw jbglaw@xxxxxxxxxx +49-172-7608481 Signature of: Ich hatte in letzter Zeit ein bißchen viel Realitycheck. the second : Langsam möchte ich mal wieder weiterträumen können. -- Maximilian Wilhelm (18. Mai 2006, #lug-owl.de)
Attachment:
signature.asc
Description: Digital signature