Operating System - HP-UX
1752650 Members
5306 Online
108788 Solutions
New Discussion юеВ

Libraries linked to an executable

 
Anand_30
Regular Advisor

Libraries linked to an executable

Is there any way to find out what are the libraries linked to an executable. i am working in HP-UX-10.20.

Anand
6 REPLIES 6
Jean-Luc Oudart
Honored Contributor

Re: Libraries linked to an executable

use the chatr command

example :
chatr ls
ls:
shared executable
shared library dynamic path search:
SHLIB_PATH disabled second
embedded path disabled first Not Defined
shared library list:
dynamic /usr/lib/libcurses.1
dynamic /usr/lib/libc.2
shared library binding:
deferred
global hash table disabled
plabel caching disabled
shared vtable support disabled
static branch prediction disabled
executable from stack: D (default)
kernel assisted branch prediction enabled
lazy swap allocation disabled
text segment locking disabled
data segment locking disabled
third quadrant private data space disabled
fourth quadrant private data space disabled
data page size: D (default)
instruction page size: D (default)


Rgds,
Jean-Luc
fiat lux

Re: Libraries linked to an executable

Well in HP-UX11.00 you use

chatr

e.g.

chatr oracle
oracle:
shared executable
shared library dynamic path search:
SHLIB_PATH enabled first
embedded path disabled second Not Defined
shared library list:
dynamic /all/oracle/product/8.1.7/lib/libjox8.sl
dynamic /all/oracle/product/8.1.7/lib/libobk.sl
dynamic /usr/lib/librt.2
dynamic /usr/lib/libpthread.1
dynamic /usr/lib/libnss_dns.1
dynamic /usr/lib/libdld.2
dynamic /usr/lib/libm.2
dynamic /usr/lib/libc.2
shared library binding:
deferred
global hash table disabled
plabel caching disabled
global hash array size:1103
global hash array nbuckets:3
shared vtable support disabled
static branch prediction enabled
executable from stack: D (default)
kernel assisted branch prediction enabled
lazy swap allocation disabled
text segment locking disabled
data segment locking disabled
third quadrant private data space disabled
fourth quadrant private data space disabled
data page size: D (default)
instruction page size: D (default)



I don't remember it being any different in 10.20...


HTH

Duncan

I am an HPE Employee
Accept or Kudo
Virgil Chereches_2
Frequent Advisor

Re: Libraries linked to an executable

As far as I know the ldd do the same trick:
# ldd /bin/ls
/usr/lib/libc.2 => /usr/lib/libc.2
/usr/lib/libdld.2 => /usr/lib/libdld.2
/usr/lib/libc.2 => /usr/lib/libc.2
/usr/lib/libcurses.1 => /usr/lib/libcurses.1
The output is different (much poorer in ldd case) but you have the information regarding the dinamic libraries.
Radim Jarosek
Regular Advisor

Re: Libraries linked to an executable

Hi,

here is document, where can you find some detail information about software development on HP-UX.


HTH

Radim
Hein van den Heuvel
Honored Contributor

Re: Libraries linked to an executable

Hello Radim,

You seem to have forgotten the attachment/pointer?

Perhaps you wanted to poitn us to:

http://docs.hp.com/hpux/onlinedocs/dev/B2355-90730/B2355-90730.html#RN.CVT.NN134

this is the chapter "Viewing library dependencies with ldd(1)" in "HP-UX Linker and Libraries User's Guide".

hth,
Hein.

ranganath ramachandra
Esteemed Contributor

Re: Libraries linked to an executable

no ldd on 10.20, i guess. while chatr prints out the recorded list of libraries needed by the application, "odump -sllibloadlist" should give you a list of the paths where the libraries are actually getting loaded from.

i'm not sure if this is implemented on 10.20 :
_HP_DLDOPTS="-ldd" a.out

(run a.out with _HP_DLDOPTS set to "-ldd").
 
--
ranga
[i work for hpe]

Accept or Kudo