[LC++]Unresolved symbol when loading module

Jack Lloyd lloyd at acm.jhu.edu
Wed Jul 14 05:36:01 UTC 2004


getcwd is a user-space bit of code. In theory you could call the syscall that
implements getcwd, but the result wouldn't make any sense, because the cwd is a
per-process attribute, and the kernel isn't exactly a process (to be specific,
the kernel has no cwd).

I presume what you want to do is get the cwd of a particular process? That is
doable, though I forget how it's done ATM. Probably it's a char* included in
the process struct.

-Jack

On Tue, Jul 13, 2004 at 02:30:26PM -0700, Krishna Monian wrote:
> Hi, 
> I am trying to load a module in which I have used the
> getcwd system call. It compiles fine, however when I
> load the module using insmod it gives me this error
> 
> mymodule.o: unresolved symbol getcwd
> 
> When I remove the getcwd call, it loads and works
> fine. 
> 
> Are there any flags I have to specify during
> compilation or when loading the module?
> 
> Thanks
> Krishna Monian 
> 
> 
> 	
> 		
> __________________________________
> Do you Yahoo!?
> New and Improved Yahoo! Mail - 100MB free storage!
> http://promotions.yahoo.com/new_mail 
> _______________________________________________
> This is the Linux C++ Programming List
> : http://lists.linux.org.au/listinfo/tuxcpprogramming List



More information about the tuxCPProgramming mailing list