- Community Home
- >
- Servers and Operating Systems
- >
- Operating Systems
- >
- Operating System - HP-UX
- >
- finding which shared libraries aren't used by a bi...
Operating System - HP-UX
1753543
Members
5568
Online
108795
Solutions
Forums
Categories
Company
Local Language
юдл
back
Forums
Discussions
Forums
- Data Protection and Retention
- Entry Storage Systems
- Legacy
- Midrange and Enterprise Storage
- Storage Networking
- HPE Nimble Storage
Discussions
Discussions
Discussions
Forums
Forums
Discussions
юдл
back
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
Discussion Boards
Discussion Boards
Blogs
Information
Community
Resources
Community Language
Language
Forums
Blogs
Go to solution
Topic Options
- 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
тАО03-24-2005 06:05 AM
тАО03-24-2005 06:05 AM
Hello,
We have a very old software project that also runs on HP-UX and that has been maintained and developed for some time by people not very familiar with UNIX. Lots of the Makefiles were just copied from one place to another and edited when a new subproject was added. Thus, lots of the linked libraries don't seem necessary.
We had this problem when building on Solaris, which is another platform we support; we had a problem with a library that we found out we didn't actually need. On Solaris you can give a command line option to the linker and it won't dynamically link any library from those specified with -l if it isn't actually used. Is there something similar for the HP-UX linker? We have aCC A.03.55 on HP-UX 11i (PA-RISC). Or something to tell which shared libraries are actually used?
We have a very old software project that also runs on HP-UX and that has been maintained and developed for some time by people not very familiar with UNIX. Lots of the Makefiles were just copied from one place to another and edited when a new subproject was added. Thus, lots of the linked libraries don't seem necessary.
We had this problem when building on Solaris, which is another platform we support; we had a problem with a library that we found out we didn't actually need. On Solaris you can give a command line option to the linker and it won't dynamically link any library from those specified with -l if it isn't actually used. Is there something similar for the HP-UX linker? We have aCC A.03.55 on HP-UX 11i (PA-RISC). Or something to tell which shared libraries are actually used?
Solved! Go to Solution.
- Tags:
- shlib
3 REPLIES 3
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО03-24-2005 06:09 AM
тАО03-24-2005 06:09 AM
Re: finding which shared libraries aren't used by a binary
ldd "executable"
chatr "executable"
chatr "executable"
There is no substitute to HARDWORK
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО03-24-2005 11:57 PM
тАО03-24-2005 11:57 PM
Re: finding which shared libraries aren't used by a binary
Thanks for replying,
So am I to understand that the libraries in the ldd output that don't show up in the list printed by chatr aren't actually used?
So am I to understand that the libraries in the ldd output that don't show up in the list printed by chatr aren't actually used?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО03-27-2005 05:01 PM
тАО03-27-2005 05:01 PM
Solution
there is no equivalent option as yet with the hpux linker. the loader loads all libraries that were specified in the link line.
you can use ldd with options such as -y, -d and -r to see what symbols are being resolved from what libraries, then grep through the listing to weed out the ones that arent really being used. e.g.
ldd -y a.out | grep "found in .*/libsuspect.sl"
you can get similar information at link time using the linker's -v option.
you can also look at the the lazy load feature (look for +lazyload in the ld(1) manpage). this will make the loader load each library only as and when it is needed, instead of at startup.
--
ranga
[i work for hpe]
you can use ldd with options such as -y, -d and -r to see what symbols are being resolved from what libraries, then grep through the listing to weed out the ones that arent really being used. e.g.
ldd -y a.out | grep "found in .*/libsuspect.sl"
you can get similar information at link time using the linker's -v option.
you can also look at the the lazy load feature (look for +lazyload in the ld(1) manpage). this will make the loader load each library only as and when it is needed, instead of at startup.
--
ranga
[i work for hpe]
The opinions expressed above are the personal opinions of the authors, not of Hewlett Packard Enterprise. By using this site, you accept the Terms of Use and Rules of Participation.
News and Events
Support
© Copyright 2024 Hewlett Packard Enterprise Development LP