[Search for users] [Overall Top Noters] [List of all Conferences] [Download this site]

Conference bulova::decw_jan-89_to_nov-90

Title:DECWINDOWS 26-JAN-89 to 29-NOV-90
Notice:See 1639.0 for VMS V5.3 kit; 2043.0 for 5.4 IFT kit
Moderator:STAR::VATNE
Created:Mon Oct 30 1989
Last Modified:Mon Dec 31 1990
Last Successful Update:Fri Jun 06 1997
Number of topics:3726
Total number of notes:19516

3357.0. "pascal calling fortran calling c calling xlib" by HAMSC3::UWEH () Wed Sep 19 1990 06:03

I have a question about the size of image files produced by the linker.

A customer programs in PASCAL and uses a third party developed program
package written in FORTRAN. This package has several interfaces to do graphic
output. One of this interface is written in C using XLIB. To link the shareable
images VAXCRTL and DECW$XLIBSHR with his programs he inserts these with 
LIBRARIAN in IMAGELIB.OLB.

Now, if he uses the C interface with XLIB instead of any other his .EXE
file will be about 10 times bigger than normal.

The developers experience is that using FORTRAN instead of PASCAL will result
in reasonable sizes of EXE files. He has never seen this effect, but also
never seen a customer using his package with PASCAL. He thinks it could have
to do something with the interface between PASCAL and other languages.

Any hints why sizes of executables can differ in such a degree ?

Uwe

T.RTitleUserPersonal
Name
DateLines
3357.1QUARK::LIONELFree advice is worth every centWed Sep 19 1990 09:3817
    First of all, the customer has produced an unsupported configuration
    by inserting VAXCRTL and DECW$XLIBSHR into IMAGELIB.   He may find that
    this causes all sorts of problems down the road, such as being unable
    to upgrade VMS or errors during linking.  They should be removed.
    Those images should be referenced by linker options file statements,
    if needed.
    
    Now to the question - the usual reason that an image increases in
    size dramatically is that it has exceeded the linker's maximum number
    of image sections, after which it turns off demand-zero compression.
    Look at the end of the link map to see how many image sections are
    used.  If it is over 90, you're in trouble.  My usual suggestion here
    is to use the linker options file COLLECT statement to collect all
    the read/write data PSECTs, including COMMONs, together.  This will
    reduce image size and improve image activation performance.
    
    				Steve
3357.2you can't do that--the shareable images will stop workingPSW::WINALSKICareful with that VAX, EugeneWed Sep 19 1990 14:369
I would hazard a guess that the programs are 10 times larger because global,
overlaid PSECTs (C external variables) that are supposed to be shared between
Xlib and the VAX C RTL and the non-shareable-image code are not being shared.
This is one of the consequences of putting VAXCRTL.EXE or any other shareable
image containing C external variables in IMAGELIB.OLB.  You currently cannot
put either VAXCRTL.EXE or DECW$XLIBSHR.EXE in IMAGELIB.  They will not work
properly if you do.

--PSW