comp.lang.ada
 help / color / mirror / Atom feed
From: Gautier write-only <gautier_niouzes@hotmail.com>
Subject: Re: Typical handling of packages through compilers
Date: Wed, 22 Jul 2009 05:57:34 -0700 (PDT)
Date: 2009-07-22T05:57:34-07:00	[thread overview]
Message-ID: <3ca6c026-9269-4228-be95-1b7d6adf6131@h11g2000yqb.googlegroups.com> (raw)
In-Reply-To: a2f32a27-1137-4f10-a2af-877c4e0d4707@a7g2000yqk.googlegroups.com

Yannick:

> I've noticed that the inclusion of a package, turns into the inclusion
> of all of its content, despite just a few part of it is really used
> (taking into account, internal dependencies).

It's the lack of a proper smart linking in the GNU linker. This
technique is in use since more than 20 years in other systems - e.g.:
Turbo Pascal and, later, Delphi. It seems also that Janus has it (or
at least an old version had it).

> Using seperate data and
> function sections and then the linker gc-section option, does not
> change anything (the executable is even a bit bigger using these
> options).

Try with -ffunction-sections only. With separate data sections I get a
gain on most units, but unexpectedly one package turns into an
enormous .o . The GNU docs warns about these options:
"Only use these options when there are significant benefits from doing
so. When you specify these options, the assembler and linker will
create larger object and executable files and will also be slower. You
will not be able to use gprof on all systems if you specify this
option and you may have problems with debugging if you specify both
this option and -g."

You also have the gnatelim tool (a very dumb workaround, but it
works).

HTH
_________________________________________________________
Gautier's Ada programming -- http://sf.net/users/gdemont/
NB: For a direct answer, e-mail address on the Web site!



  reply	other threads:[~2009-07-22 12:57 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2009-07-22 12:21 Typical handling of packages through compilers Hibou57 (Yannick Duchêne)
2009-07-22 12:57 ` Gautier write-only [this message]
2009-07-22 13:12   ` Hibou57 (Yannick Duchêne)
2009-07-22 20:06   ` tmoran
2009-07-22 21:27     ` Hibou57 (Yannick Duchêne)
2009-08-14 22:06     ` Randy Brukardt
2009-07-22 14:29 ` Adam Beneschan
2009-07-22 21:25   ` Hibou57 (Yannick Duchêne)
2009-07-22 21:55     ` Adam Beneschan
2009-07-22 23:15 ` Jeffrey Creem
replies disabled

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