[LC++]Unresolved symbol when loading module
k_tutorials at yahoo.com
Wed Jul 14 05:49:01 UTC 2004
I basically need the working directory of the process
that calls particular system calls(open for example)
that I am rerouting.
I have seen this being done in code earlier. However I
am not too sure how exactly it was done.
How else can I get the working directory of the
calling process? I do not have a process struct that
comes in when the call is made. I only have the
filename, flags and mode.
--- Jack Lloyd <lloyd at acm.jhu.edu> wrote:
> 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.
> 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
> > getcwd system call. It compiles fine, however when
> > load the module using insmod it gives me this
> > 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
> > :
Do you Yahoo!?
Yahoo! Mail Address AutoComplete - You start. We finish.
More information about the tuxCPProgramming