1851750 Members
2112 Online
104062 Solutions
New Discussion

Re: shared libraries

 
SOLVED
Go to solution
SM_3
Super Advisor

shared libraries

How can I learn more about shared libraries on HP--UX as well as other unix platforms.

Thanks.

7 REPLIES 7
baiju_3
Esteemed Contributor

Re: shared libraries

http://docs.hp.com has some information available .Pls do a search . This subject is out of my scope :)


Thanks,
BL.
Good things Just Got better (Plz,not stolen from advertisement -:) )
baiju_3
Esteemed Contributor

Re: shared libraries

Check this out .

http://users.actcom.co.il/~choo/lupg/tutorials/libraries/unix-c-libraries.html



Thanks,
BL.
Good things Just Got better (Plz,not stolen from advertisement -:) )
A. Clay Stephenson
Acclaimed Contributor

Re: shared libraries

The same way I did - study. The reference manuals that are supplied with your compiler will guide you. You may have hardcopy manuals, PFS, or PS files -- but any of these will suffice. Creating a shared library is very easy. All you need to do is find the compiler option that enables position indepedent code (PIC) and the option that passes a command to the link editor (ld) to produce a shared object rather than an executable. Unlike archive libraries, you do not use the ar command. The man pages for the compiler will get you started.
If it ain't broke, I can fix that.
SM_3
Super Advisor

Re: shared libraries

Thanks.

Arunvijai_4
Honored Contributor

Re: shared libraries

This should help you,
http://docs.hp.com/en/B2355-90655/ch05s07.html

(HP-UX Linker and Libraries User's Guide > Chapter 5. Creating and Using Libraries )

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

Re: shared libraries

morganelan
Trusted Contributor

Re: shared libraries

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.

For more detail see this link:
http://docs.hp.com/en/B2355-90655/ch05.html
Kamal Mirdad