Re: How to set LD_LIBRARY_PATH

[email protected] (Jonathan Leffler)
Newsgroups perl.dbi.users,perl.beginners
Message-ID <[email protected]>
On Sun, May 30, 2010 at 10:47 AM, Marilyn Sander <
[email protected]> wrote:

>
>  [...]  My reasoning was that the thing being
> loaded is a shared object (.so file).  The system loader (ld) has to be
> invoked for loading
> a shared object.  That seems to me to require a separate process, with an
> environment
> stack inherited from the Perl process that invokes it.


There's a problem here.  What you describe is not what happens.

The system loader, ld, is used to create executables and shared objects.  It
indeed is a separate program that is most often invoked automatically by a
compiler - GCC for example.

There is a wholly separate module, often with a name such as ld.so.1, which
is the dynamic library loader.  It is actually a part of the program you are
running - Perl in the current context.  It is responsible for loading other
shared libraries into the current process.  Dynamically loading a shared
library adds the code to the current process; it does not invoke a separate
program/process.


-- 
Jonathan Leffler <[email protected]>  #include <disclaimer.h>
Guardian of DBD::Informix - v2008.0513 - http://dbi.perl.org
"Blessed are we who can laugh at ourselves, for we shall never cease to be
amused."
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.