- Community Home
- >
- Servers and Operating Systems
- >
- Operating Systems
- >
- Operating System - HP-UX
- >
- Shared libraries- What are these used for?
Categories
Company
Local Language
Forums
Discussions
Forums
- Data Protection and Retention
- Entry Storage Systems
- Legacy
- Midrange and Enterprise Storage
- Storage Networking
- HPE Nimble Storage
Discussions
Forums
Discussions
Discussions
Discussions
Forums
Discussions
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
- BladeSystem Infrastructure and Application Solutions
- Appliance Servers
- Alpha Servers
- BackOffice Products
- Internet Products
- HPE 9000 and HPE e3000 Servers
- Networking
- Netservers
- Secure OS Software for Linux
- Server Management (Insight Manager 7)
- Windows Server 2003
- Operating System - Tru64 Unix
- ProLiant Deployment and Provisioning
- Linux-Based Community / Regional
- Microsoft System Center Integration
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Community
Resources
Forums
Blogs
- Subscribe to RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Bookmark
- Subscribe
- Printer Friendly Page
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
10-01-2003 12:52 AM
10-01-2003 12:52 AM
What are shared libraries?
What are the used for?
Do we have to create these?
Can you give an example?
Thanks
Solved! Go to Solution.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
10-01-2003 01:11 AM
10-01-2003 01:11 AM
SolutionExcellent article on unix libraries:
http://www.linuxjournal.com/article.php?sid=6463
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
10-01-2003 01:16 AM
10-01-2003 01:16 AM
Re: Shared libraries- What are these used for?
http://docs.hp.com/hpux/onlinedocs/B2355-90655/B2355-90655.html
U can also see more info at man pages of
chatr , ld , dld.sl for more info.
Thanks,
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
10-01-2003 01:42 AM
10-01-2003 01:42 AM
Re: Shared libraries- What are these used for?
dld.sl is another example.
Where these shared module hide usually is in the SHLIB_PATH.
A typical SHLIB_PATH might be
$ORACLE_HOME/lib:$PH_USR/lib:/lib
You will not likely create these, unless you are a developer.
Tim
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
10-01-2003 01:43 AM
10-01-2003 01:43 AM
Re: Shared libraries- What are these used for?
I can spell but the key ssssssssstick..
Tim
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
10-01-2003 02:00 AM
10-01-2003 02:00 AM
Re: Shared libraries- What are these used for?
They are used to reduce the size of the executables, when changed they wont break the existing code unless it does by purpose. Each library has its version to be identified with.
Yes we have to create them specially. The code should be compiled as Position Independent Code . The following created PIC object file.
cc -Ae +z a.c -o a.o
cc -b -o liba.sl a.o
creates a shared library out of a.o
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
10-01-2003 02:19 AM
10-01-2003 02:19 AM
Re: Shared libraries- What are these used for?
For example the most important libary on your hp-ux system is the libc.(/usr/lib/linc.2).
Shared libary vs. static labary
A shared libary is loaded at startup of a program. So it is "outside" the main program.
A big advantage of shared libaries are, they can be replaced if there is a newer one or because of a bug in the lib.
If your program use static libaries, then these libaries are "inside" the program.
A disadvantage is, if a libary must be replaced you must recompile the hole program. But somtime it is better to use static libs. ie for security reasons (/sbin/passwd).
an example for a dynamic and a static program on your hp-ux box is "ls".
Do an ldd on
/sbin/ls
/usr/bin/ls
see what happens !!
HTH
Roland