Linux insmod problem

Linux insmod problem

Post by 孟德 » Sun, 23 Mar 2003 22:40:21



In linux, I've got an object "bt.o", I use insert module and there is
> error message as following:

>>bt.o: unresolved symbol strftime
>>bt.o: unresolved symbol time
>>bt.o: unresolved symbol fopen
>>bt.o: unresolved symbol fgets
>>bt.o: unresolved symbol fprintf
>>bt.o: unresolved symbol localtime
>>bt.o: unresolved symbol fscanf
>>bt.o: unresolved symbol mkdir
>>bt.o: unresolved symbol strncpy
>>bt.o: unresolved symbol fclose
>>bt.o: unresolved symbol printf
> all this are standard functions in C but can't be resolved, is it the
> problem of "link", I don't konw how to use "link", anyone can help me?

 
 
 

Linux insmod problem

Post by Kevin Easto » Sun, 23 Mar 2003 23:33:12



> In linux, I've got an object "bt.o", I use insert module and there is
>> error message as following:


>>>bt.o: unresolved symbol strftime
>>>bt.o: unresolved symbol time
>>>bt.o: unresolved symbol fopen
>>>bt.o: unresolved symbol fgets
>>>bt.o: unresolved symbol fprintf
>>>bt.o: unresolved symbol localtime
>>>bt.o: unresolved symbol fscanf
>>>bt.o: unresolved symbol mkdir
>>>bt.o: unresolved symbol strncpy
>>>bt.o: unresolved symbol fclose
>>>bt.o: unresolved symbol printf

>> all this are standard functions in C but can't be resolved, is it the
>> problem of "link", I don't konw how to use "link", anyone can help me?

The kernel isn't a hosted C environment, it doesn't provide those
functions.

        - Kevin.

 
 
 

Linux insmod problem

Post by Jens.Toerr.. » Sun, 23 Mar 2003 23:38:04



> In linux, I've got an object "bt.o", I use insert module and there is
>> error message as following:

>>>bt.o: unresolved symbol strftime
>>>bt.o: unresolved symbol time
>>>bt.o: unresolved symbol fopen
>>>bt.o: unresolved symbol fgets
>>>bt.o: unresolved symbol fprintf
>>>bt.o: unresolved symbol localtime
>>>bt.o: unresolved symbol fscanf
>>>bt.o: unresolved symbol mkdir
>>>bt.o: unresolved symbol strncpy
>>>bt.o: unresolved symbol fclose
>>>bt.o: unresolved symbol printf
>> all this are standard functions in C but can't be resolved, is it the
>> problem of "link", I don't konw how to use "link", anyone can help me?

Assuming that bt.o is supposed to be a module then it is written
completely wrong. Modules don't get linked, especially not against
the standard C library. They get plugged into the kernel and are
only allowed to use functions that are defined in the kernel. But
none of the above functions are in the kernel. So you probably better
get yourself a good book about writing modules (i.e. "Linux Device
Drivers" by Rubini and Corbet and published by O'Reilly, they also
have a PDF version on their site) to find out which functions you
may use. It's quite a bit different from normal programming in C.
Are you sure that what you want to do really requires a module? Or
would it perhaps be better to split things up into a module and a
userland library?
                                 Regards, Jens
--
      _  _____  _____

  _  | |  | |    | |
 | |_| |  | |    | |          http://www.physik.fu-berlin.de/~toerring
  \___/ens|_|homs|_|oerring
 
 
 

1. insmod: ipv6.o: insmod net-pf-10 failed

I just installed Debian Woody 3.0r1 and then downloaded kernel 2.4.20,
configed, compiled rebooted.  Everything is great except I keep
getting this message in my logs:

insmod: /lib/modules/2.4.19/kernel/net/ipv6/ipv6.o: insmod net-pf-10
failed

I didn't configure any IPv6 stuff.  And don't particularly want this.
How do I get rid of it?

-j

2. PLEASE HELP

3. linux tcp/ip stack as a module...insmod problems

4. 2.2.1 kernel

5. Problem in Module <insmod, rmmod>

6. HELP!!!!!!!

7. insmod problem

8. Xlock on RS/6000s

9. insmod problems

10. Problems with insmod ftape

11. Stupid problem-- need to run insmod manually...

12. insmod problems

13. insmod problems in Mandrake 6.1