[omniORB] Is there any way to get smaller executables on Solaris?

Andrew Stitcher astitcher@orchestream.com
Fri, 03 Sep 1999 17:10:22 +0100


Two points:

1) It would be very useful if the documentation explained exactly 
when you need to link in omniDynamic2 and when you don't need to. 
Since with Unix shared libraries typically if the library is on the 
link line the linker will mark it as needed even if it is not 
actually needed.

2) We have some very important applications that use very large 
stubs. The typical pattern of our interfaces is to have one interface 
which inherits from several other interfaces. Looking at the 
generated symbols in the code, I find that there seem to vast numbers 
of member functions of the various classes implementing the 
interfaces, most of which are not called.

Under Visual C++ 6.0 the linker is capable of removing lots and lots 
of member functions etc which are in fact never used.

Does anyone know of any similar capability for Solaris, or is there 
any other way of getting a similar effect.

For example VC gives a 800k executable (stripped etc) when optimised 
for size
(Dynamically linked). gcc 2.95.1 and binutils 2.9.1 under Solaris 
give an executable of 2M when using -O2 and stripped and dynamically 
linked.

Even allowing for RISC code being bigger than CISC code this is far 
too big. [We have an component that seems to be about 6M under VC and 
30M under Solaris under approximately similar conditions - I just 
haven't investigated this much yet]

Help anyone.

Andrew Stitcher