GDB a VFS module
hno at squid-cache.org
Thu Apr 22 10:49:04 GMT 2004
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.
More information about the samba-technical