GDB a VFS module

Jagan jaganra at yahoo.com
Thu Apr 22 22:06:02 GMT 2004


Henrik
       Can I entice you into a VNC session where you
can quickly point out what I am doing wrong.
with best regards
Jagan.

--- 'Jelmer Vernooij' <jelmer at vernstok.nl> wrote:
> Hi Jagan,
> 
> On Thu, Apr 22, 2004 at 01:22:17PM -0700, Jagan
> wrote about 'RE: GDB a VFS module':
> > Thanks Henrik
> >          I did a gcc -shared -Ixxx -LYYY -ldrivers
> -lutils -o abc.so.
> > It worked fine and I did a nm on it and it showed
> no undefined. The actual
> > libraries that I wanted to link are libdrivers.a
> and libutils.a which are in
> > the
> > -L path specified. Then I ran abc.so from vfstest
> and same problem again.
> 
> 
> > Jelmer: I looked at the mysql make and it has a
> configure option hooked onto
> > it. Even then
> > -lmysql is also linking in a .so . In my case I am
> linking in ".a" into a
> > ".so". Is that a legal thing to do at all.
> What kind of 'legal' do you mean ? Valid ? Or
> allowed by license/law?
> 
> If you would like your module to link against a
> static library, just specify
> the path to that static library, e.g. 
> 
> gcc -shared -o abc.so abc.c -Ixxx YYY/libdrivers.a
> 
> (note that the order of the parameters does matter!)
> 
> All libraries your module uses and the module itself
> have to be under a 
> GPL-compatible license, whether they're static or
> not.
> 
> Cheers,
> 
> Jelmer
> 
> > with best regards
> > Jagan.
> 
> > -----Original Message-----
> > From: Henrik Nordstrom
> [mailto:hno at squid-cache.org] 
> > Sent: Thursday, April 22, 2004 3:49 AM
> > To: Jagan
> > Cc: Jelmer Vernooij;
> samba-technical at lists.samba.org
> > Subject: Re: GDB a VFS module
> 
> > On Wed, 21 Apr 2004, Jagan wrote:
> 
> > > * Did the gcc -shared stuff. Didnt help. 
> 
> > It is the -l... stuff you need.
> 
> > > * 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.
> 
> > Because there is no final linking of abc.so taking
> place until it is loaded
> > into the application. These missing symbols are
> simply assumed to be
> > provided by anoter object later on. The compiler
> does not know where unless
> > you instruct it to.
> 
> > By using the -l.. flags when linking the abc.so
> file you record which
> > libraries this file depends on, causing these
> libraries to be loaded at the
> > same time as this file.
> 
> > In the same way you can use the ld -rpath flag or
> LD_RUN_PATH variable to
> > record any additional directories needed in the
> search path for finding the
> > needed libraries at runtime linking without having
> to set LD_LIBRARY_PATH
> > each time when running the application.
> 
> > > In other words the question is how can
> individual modules make sure 
> > > they have no unlinked dependecies on a compile
> from the souce tree.
> 
> > By instructing the compiler to link to the
> libraries they need while
> > building the so file.
> 
> > Regards
> > Henrik
> 
> 
> -- 
> Jelmer Vernooij <jelmer at vernstok.nl> -
> http://jelmer.vernstok.nl/
> Todo: 0
> 

> ATTACHMENT part 2 application/pgp-signature
name=signature.asc




	
		
__________________________________
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