Re: Very Large Size of Pro*C executables

From: Erik E. Graversen <crieeg_at_halcyon.com>
Date: 28 Sep 1993 00:45:33 -0700
Message-ID: <288q2t$q82_at_nwfocus.wa.com>


In article <CE0yoF.vLr_at_hawnews.watson.ibm.com>,
Johan Hellstrom <wanderer_at_vnet.ibm.com> wrote:

> Today I compiled/linked Sample1.pc (2600 bytes) on an AIX 3.2
> system using Pro*C on Oracle 7.0.13.
>
> The resulting executable was 1.3 Mb large. A make of a locally
> developed program resulted in a similar size.
 Sounds familiar, I too use Pro*C on AIX 3.2
>
> Since no product can be developed with executable sizes even remotely
> close to those figures, I would like to know if there is any way of
> maybe sharing the libraries in order to get smaller executables?
>
Yes you can make an AIX shared library yourself! Simply figure out the list of ora libraries from linking sampleN.pc, then use ar to extract all .o files (and the osntab.o) to an empty directory, then use ar to put all .o files into *one* liboracle.a, then use AIX loader (ld) to convert this library into a SHARED AIX library. The last step is explained in info explorer; it involves making a list of the symbols that should be visible on the outside of the shared library. Very few symbols need to be visible, try linking your Pro*C program without any oracle libraries and your linker will tell you what it needs.
I've done this and have not seen any problems using this method, you may have to set LIBPATH in your env. so the shared lib can be located, - or you could just put it in /lib or /usr/lib, - check info-explorer.
> Any advice would be appreciated!
>
>Regards
>
>/Johan Hellstrom
>
Received on Tue Sep 28 1993 - 08:45:33 CET

Original text of this message