pkhyder@hub.ucsb.edu (12/20/88)
For those of you that are behind on reading the latest in Sun manuals and figured, as I had, that shared libraries were an interesting addition in SunOS4.0 that could be examined later when you wanted to use them... see the manual page for ld. Turns out that dynamic binding is the default. It really helps to read the section in "Programming Utilities & Libraries" on "Shared Libraries". Pay particular attention to the section on "Dynamic vs. Static Binding Semantics", pp 56 in my copy. The potential for multiple resolution of entry points is the feature that caught me. (Yep, I'm guilty of only previously reading the man page for cc, it lists the option but not the default.) Caused some very unexpected core dumps. Adding the cc -Bstatic flag was the short term fix. On the good side the difference in size of things that use these libraries is astounding. The compiler, debugger and testing linkages are also excellent. Swap space and associated memory reductions are very real in cases where multiple executing jobs have linked into large shared libraries, like multiple window tools. REQUEST FOR INFORMATION: I'm wondering just how different execution speeds are with the dynamic vs. static libraries. I'd like time information from large code modules that make a timeable single pass AND do lots of calls to library functions that are in the dynamic libraries - libc,libkvm,libpixrect,libsuntool, libresolve, and libsunwindow. If you have such a beast and time before 25Dec88, please do the following. [TIA :{) } Time a run compiled normally then recompile with the cc flag "-Bstatic" and time the second run. EMAIL the times to me and I'll post a synopsis around the first of the year. (You don't even need to tell me what the code is, please keep messages short, I pay the phone bill.) Paul Hyder pkhyder@hub.ucsb.edu ...ucbvax!ucsbcsl!blueox!hyder