comp.lang.ada
 help / color / mirror / Atom feed
* Re: Executable File Size Differences
@ 1996-09-29  0:00 tmoran
  1996-09-29  0:00 ` Robert Dewar
  0 siblings, 1 reply; 16+ messages in thread
From: tmoran @ 1996-09-29  0:00 UTC (permalink / raw)



>The problem is an old one: the lack of "smart linkers" which
>would include only the necessary code from an Ada package, and
  The RR compilers I've been using on PCs for years have done this
(/t option) and I think ObjectAda will do it.  When I used Borland
C++ 3.0 I never noticed the linker capable of this - has that changed?
  I just tried a very simple Ada program with an ancient Janus 2.2.2
compiler targeted to DOS .com files:
procedure hello is
  world:exception;
begin
  raise world;
end hello;
produces hello.com of 5328 bytes and when run gives:
** Unhandled User Exception - HELLO.WORLD
On Line Number 4 In HELLO
I realize that's cheating - but adding Text_IO unsurprisingly added
to the executable size.  And real programs under Windows, as Robert
Dewar suggests, results in executables, both C and Ada, noticeably
larger than 5K. #.#




^ permalink raw reply	[flat|nested] 16+ messages in thread
* Re: Executable File Size Differences
@ 1996-09-28  0:00 Robert Dewar
  1996-09-28  0:00 ` Tony Picarello
  0 siblings, 1 reply; 16+ messages in thread
From: Robert Dewar @ 1996-09-28  0:00 UTC (permalink / raw)



Robert said

"I tried compiling a simple "Hello World" program with the Thomson Software's Act
ivAda for Windows
and Thomson's new "ObjectAda". The ActivAda version produces a executable file s
ize of about 288K.
ObjectAda produces an exe of about 788K. Microsoft C++ produces an exe of about
10K. Why are the
executables so substantially different? Are the Ada compilers linking in alot of
 excess baggage? I
have tried various compiler switches, but nothing seems to shrink the exe file s
izes.

Can anyone enlighten me here?"

(P.S. please keep your posts to 80 characters, really makes life easier!)

The GNAT executable under OS/2 is 57K, which is smaller but still larger
than the 10K you see from C. There are two reasons for this. First, it is
likely that the C is linking against a dynamically shared library which
is taking up room, but does not show up in the 10K. Second, GANT is
indeed dragging in quite a bit, including full exception support, full
support for controlled types, full support for tagged types. In a small
program this makes for some extra size, but of course this is a fixed size
increment, if you make a larger program, it does not get proportionally
bigger.

For example, I just wrote a complete preprocessor program for GNAT (toi be
included in some future release!) that provides conditional compilation
capability, and symbol substitution capability, including nested
conditoinals, with quite a bit of flexibility. This program also uses
Text_IO, but the executable is only 81K. It is a 1000 line program
with 534 non-blank non-comment lines, so it is about 100 times the length
of hello world in source lines, but certainly not 100 times the length
in the executable!

I would guess that you would see the same phenomenon with ObjectAda, i.e.
that there is a fair amount of fixed overhead, but it does not go up
with the size of the source file in linear proportion.





^ permalink raw reply	[flat|nested] 16+ messages in thread
* Executable File Size Differences
@ 1996-09-25  0:00 Robert P. Kuzmicki
  1996-09-25  0:00 ` Georgi Savov
                   ` (3 more replies)
  0 siblings, 4 replies; 16+ messages in thread
From: Robert P. Kuzmicki @ 1996-09-25  0:00 UTC (permalink / raw)



I tried compiling a simple "Hello World" program with the Thomson Software's ActivAda for Windows
and Thomson's new "ObjectAda". The ActivAda version produces a executable file size of about 288K.
ObjectAda produces an exe of about 788K. Microsoft C++ produces an exe of about 10K. Why are the
executables so substantially different? Are the Ada compilers linking in alot of excess baggage? I
have tried various compiler switches, but nothing seems to shrink the exe file sizes.

Can anyone enlighten me here?






^ permalink raw reply	[flat|nested] 16+ messages in thread

end of thread, other threads:[~1996-10-11  0:00 UTC | newest]

Thread overview: 16+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
1996-09-29  0:00 Executable File Size Differences tmoran
1996-09-29  0:00 ` Robert Dewar
  -- strict thread matches above, loose matches on Subject: below --
1996-09-28  0:00 Robert Dewar
1996-09-28  0:00 ` Tony Picarello
1996-09-25  0:00 Robert P. Kuzmicki
1996-09-25  0:00 ` Georgi Savov
1996-09-28  0:00   ` Stanley Allen
1996-09-28  0:00     ` Robert Dewar
1996-09-30  0:00     ` Richard A. O'Keefe
1996-10-01  0:00       ` Ken Cowan
1996-10-03  0:00         ` Stanley Allen
1996-10-02  0:00   ` Robert I. Eachus
1996-10-06  0:00     ` John Howard
1996-09-28  0:00 ` Simon FitzMaurice
1996-10-02  0:00 ` Jon S Anthony
1996-10-11  0:00 ` Robert I. Eachus

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox