GDB a VFS module
Jagan
jaganra at yahoo.com
Fri Apr 23 02:16:17 GMT 2004
Jelmer/Henrik
Solved it by changing dlopen in
do_smb_load_module in lib/module.c with a flag
RTLD_NOW rather than RTLD_LAZY which forces the
dlopen(abc.so) to resolve all library references
immediately. I am surprised noone has hit it yet. In
fact code says LAZY is there with a purpose. In fact
the comment that wanted it to be lazy doesnt sound
right. Who should I follow up this problem with.
Jelmer: vfstest is a great tool for testing the vfs
module abc.so. However I am unable to create a file
through the tool. I can open already existing files
etc. but cannot open/create a new one. Any reason.
with best regards
Jagan.
--- Jagan <jaganra at yahoo.com> wrote:
> Jelmer
>
> * Did the gcc -shared stuff. Didnt help.
> * If individual modules are responsible for linking
> their own libraries then why does a compile of
> abc.so
> not complain at all. Also ldd of abc.so does not
> reveal any unlinked dependencies.
> In other words the question is how can individual
> modules make sure they have no unlinked dependecies
> on
> a compile from the souce tree.
>
> Jagan.
>
> --- Jelmer Vernooij <jelmer at vernstok.nl> wrote:
> > Hi,
> >
> > On Wed, Apr 21, 2004 at 06:32:07PM -0700, Jagan
> > wrote about 'GDB a VFS module':
> > > I was able to gdb my vfs module in vfstest.
> > However a
> > > peculiar thing happened. I am compiling
> > > The module abc.so with some libraries of my own.
> > On a
> > > make modules from samba/source the make
> > > Went through smoothly but the libraries never
> got
> > > linked. On a run from vfstest ? function foo in
> > abc.so
> > > makes a
> > > Call to function ?bar? which was never linked
> in.
> > I am
> > > wondering how the .so?s for vfs modules don?t
> > track
> > > Library dependencies. Does it just assume that
> > > everything will be dynamically linked in.
> > You need to link abc.so against your libraries.
> >
> > e.g.
> > gcc -shared -o abc.so foo.c bar.c -lmylib
> >
> > > Question 2: How does vfstest have its
> > LD_LIBRARY_PATH
> > > linked in??
> > It's the responsibility of the specific modules to
> > link against the
> > libraries they need.
> >
> > Cheers,
> >
> > Jelmer
> >
> > --
> > Jelmer Vernooij <jelmer at vernstok.nl> -
> > http://jelmer.vernstok.nl/
> > Todo: 0
>
>
>
>
>
> __________________________________
> Do you Yahoo!?
> Yahoo! Photos: High-quality 4x6 digital prints for
> 25¢
> http://photos.yahoo.com/ph/print_splash
>
__________________________________
Do you Yahoo!?
Yahoo! Photos: High-quality 4x6 digital prints for 25¢
http://photos.yahoo.com/ph/print_splash
More information about the samba-technical
mailing list