1820592 Members
1684 Online
109626 Solutions
New Discussion юеВ

Re: SHLIB path

 
SOLVED
Go to solution
Shivkumar
Super Advisor

SHLIB path

What is the significance of SHLIB path ?

Thanks,
Shiv
6 REPLIES 6
Joseph Loo
Honored Contributor

Re: SHLIB path

hi,

i like this statement about SHLIB_PATH:

SHLIB_PATH is analogous to the LD_LIBRARY_PATH in most other OSes. Actually, HPUX uses both but uses LD_LIBRARY_PATH for 64-bits only (this according to the ld man page). It uses these variables to locate shared libraries that are needed by the program.

taken from:

http://forums1.itrc.hp.com/service/forums/questionanswer.do?threadId=104860

regards.
what you do not see does not mean you should not believe
Vibhor Kumar Agarwal
Esteemed Contributor

Re: SHLIB path

In other words:

SHLIB is the path which OS uses to search for libraries when a program is running.
This is the runtime path of a executable.
Vibhor Kumar Agarwal
Indira Aramandla
Honored Contributor

Re: SHLIB path

Hi Shiv,

On HP-UX 10.20 and 11 (32 bit), LD_LIBRARY_PATH is not checked by the dynamic
loader when locating shared libraries required to start an executable. These versions of HP-UX will check the environment variable SHLIB_PATH instead.

On HP-UX 11 (64 bit), however, both LD_LIBRARY_PATH and SHLIB_PATH are valid. The use of these environment variables can be enabled/disabled dynamically (ie, do not require a relink).

The 'chatr' command will verify if these environment variables are used. 'chatr' is similar to the 'ldd' command found on SVR4 UNIX.

Attached document explains the use of LD_LIBRARY_PATH and SHLIB_PATH on HP-UX.


IA
Never give up, Keep Trying
morganelan
Trusted Contributor
Solution

Re: SHLIB path

A shared library is a collection of object modules. However, when the linker scans a shared library, it does not copy modules into the application's code section. Instead, the linker preserves information in the application's code section about which unresolved references were resolved in each shared library. At run time, the loader copies the referenced modules from the shared library into memory. If multiple applications linked with a common shared library execute simultaneously, they will all share (or be attached to) the same physical copy of the library in memory (hence the name shared library). The shared library improves the efficiency of memory use and allows smaller application binaries.
Kamal Mirdad
Devender Khatana
Honored Contributor

Re: SHLIB path

Hi Shiv,

Here is the guide describing all the terms mentioned above.

http://docs.hp.com/en/B2355-90655/ch05.html

HTH,
Devender
Impossible itself mentions "I m possible"
Mahesh Kumar Malik
Honored Contributor

Re: SHLIB path

Hi Shiv

The SHLIB_PATH environment variable tells the shell on HP-UX systems which directories to search for dynamic-link libraries. This is used, for example, with the INTERSOLV DataDirect ODBC Driver. You must specify the full pathname for the directory where you installed the product.

e.g. setenv--SHLIB_PATH--$PATH:----pathname

On Solaris systems, it is LD_LIBRARY_PATH. On AIX systems it is LIBPATH

Regards
Mahesh