Operating System - HP-UX
1748282 Members
4021 Online
108761 Solutions
New Discussion юеВ

Re: understanding fastbind(1)

 
SOLVED
Go to solution
Stefan Hirsch_2
Occasional Advisor

understanding fastbind(1)

Hi,

I try to understand fastbind(1). If I'm running it on some binary, it records some information within the binary (confirmed by doing a ls -l before and after the run). But, it does not show any effect. I tusc'd one process before and after fastbinding it and the trace showed exactly the same sequence of finding and loading the shared libraries. I expected that after fastbind only the actual shared libraries would be loaded.
What do I miss here?

Thanks for any clarifications.
BR
Stefan Hirsch
2 REPLIES 2
Tom Schroll
Frequent Advisor

Re: understanding fastbind(1)

Stefan,

Did you try running "fastbind -n" (which removes all fastbind information) on the same executable and then run tusc to see if the dynamic loader search method changed?

Are the shared libraries system libraries (default HP-UX) or freeware libraries?

I'm guessing that fastbind is meant to optimize the speed at which the dynamic loader finds shared libraries. In my experience, it doesn't seem to resolve certain hit/miss searching in all cases. Especially when some shared libraries need to open other shared libraries as dependencies. Also, I think fastbind was designed for older systems back in the day when shared libraries took a long time to search and open...it may have dropped off the radar since those old days and perhaps lacks some functionality and intellegence?

I wish I knew more. Hopefully someone else who knows a bit about the internals of fastbind may know more and reply.

If it ain't broke, it needs optimized.
Mike Stroyan
Honored Contributor
Solution

Re: understanding fastbind(1)

fastbind records which library provides each symbol. It reduces the time required to do the lookup of each symbol string among the available shared libraries. It can have a significant effect for short duration executables that use many shared libraries with many shared symbols. Its benefit has been reduced by the implementation of +gst global symbol table option. The +gst option can also reduce the time spent resolving symbols. The +gst option has the advantage that is does not require rerunning any command when shared libraries are updated. You just need to use it when building libraries and excutables. (You can use it on just an exectuable, but get more improvement by using on shared libraries as well.)