Operating System - HP-UX
1849326 Members
6775 Online
104042 Solutions
New Discussion

Re: shared objects on hpux 11i

 
SOLVED
Go to solution
Shivkumar
Super Advisor

shared objects on hpux 11i

Dear Sirs,

what are the different kinds of shared objects (dynamic linked library) on hpux ?

How these objects are being created ?

Thanks,
Shiv

9 REPLIES 9
Arunvijai_4
Honored Contributor

Re: shared objects on hpux 11i

Hi Shiv,

You mean, what are the available types ?

In PA, it is always with *.sl

PA-RISC1.1 shared library
PA-RISC2.0 shared library
ELF-64 shared object file - PA-RISC 2.0 (LP64)


-Arun
"A ship in the harbor is safe, but that is not what ships are built for"
Muthukumar_5
Honored Contributor

Re: shared objects on hpux 11i

Shared object file will be differed based on platform as like object (executable) file. View with file command as,

file

or chatr

To create shared library use compiler cc or gcc.

--
Muthu
Easy to suggest when don't know about the problem!
Devender Khatana
Honored Contributor

Re: shared objects on hpux 11i

Hi,

These are based on the CPU architecture version. For ex.


PA-RISC1.1 shared library
PA-RISC2.0 shared library
ELF-64 shared object file -PA-RISC2.0(LP64)

One will never require to create these. These are part of OS and are installed alongwith installation/patching.

HTH,
Devender
Impossible itself mentions "I m possible"
Arunvijai_4
Honored Contributor

Re: shared objects on hpux 11i

Hi Shiv,

In IPF or IA-64, it is with .so extension, and shared libs are in /usr/lib/hpux32 and /usr/lib/hpux64 respectively,

ELF-32 shared object file - IA64
ELF-64 shared object file - IA64

-Arun
"A ship in the harbor is safe, but that is not what ships are built for"
Arunvijai_4
Honored Contributor
Solution

Re: shared objects on hpux 11i

Hi Shiv,

To answer "How these objects are being created ?"

"ld" Link editor is used.

$ cc -Aa -c +z test.c test1.c

$ ld -b -o libtest.sl test.o test1.o

You can refer this doc for more information,

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

[HP-UX Linker and Libraries User's Guide > Chapter 5. Creating and Using Libraries Creating Shared Libraries ]

-Arun
"A ship in the harbor is safe, but that is not what ships are built for"
Muthukumar_5
Honored Contributor

Re: shared objects on hpux 11i

Good one.

http://www.fortran-2000.com/ArnaudRecipes/sharedlib.html

--
Muthu
Easy to suggest when don't know about the problem!
Muthukumar_5
Honored Contributor

Re: shared objects on hpux 11i

Lots of document available in docs.hp.com. Search it out to gain more informations.

sample one:

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

--
Muthu
Easy to suggest when don't know about the problem!
Arunvijai_4
Honored Contributor

Re: shared objects on hpux 11i

Hi Shiv,

This should be useful as well,

http://docs.hp.com/en/B2355-90654/ch04s03.html

-Arun
"A ship in the harbor is safe, but that is not what ships are built for"
Arunvijai_4
Honored Contributor

Re: shared objects on hpux 11i

Some more links,

http://users.actcom.co.il/~choo/lupg/tutorials/libraries/unix-c-libraries.html
[Building And Using Static And Shared "C" Libraries]

http://www.tacc.utexas.edu/services/userguides/intel8/fc/f_ug1/ug1l_create_shared_libs.htm

-Arun
"A ship in the harbor is safe, but that is not what ships are built for"