public inbox for binutils@sourceware.org
 help / color / mirror / Atom feed
* LD being resource hungry while trying to achieve maximal dead-code elimination
@ 2003-07-17  1:12 Marco van de Voort
  2003-07-17  1:57 ` Hans-Peter Nilsson
  0 siblings, 1 reply; 2+ messages in thread
From: Marco van de Voort @ 2003-07-17  1:12 UTC (permalink / raw)
  To: binutils


I'm using FPC (www.freepascal.org), which has a mode (called smartlinking)
that tries to achieve maximal (or at least several magnitudes more optimal)
dead-code elimination by creating archives that contain a compilation unit
per symbol.

While this works fine in general, LD's memory usage is a becoming a problem.

The memory usage is roughly 100-200 times the size of the generated binary,
is there any somewhat easy way (small mods and recompiling inclusive) to
decrease this?

P.s. if people argue that this method is a dirty hack, I fully agree.
Another way to achieve the same result would be appreciated. The hack is
probably introduced years ago, maybe there is a better way meanwhile.

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

* Re: LD being resource hungry while trying to achieve maximal dead-code elimination
  2003-07-17  1:12 LD being resource hungry while trying to achieve maximal dead-code elimination Marco van de Voort
@ 2003-07-17  1:57 ` Hans-Peter Nilsson
  0 siblings, 0 replies; 2+ messages in thread
From: Hans-Peter Nilsson @ 2003-07-17  1:57 UTC (permalink / raw)
  To: Marco van de Voort; +Cc: binutils

On Thu, 17 Jul 2003, Marco van de Voort wrote:

> I'm using FPC (www.freepascal.org), which has a mode (called smartlinking)
> that tries to achieve maximal (or at least several magnitudes more optimal)
> dead-code elimination by creating archives that contain a compilation unit
> per symbol.

> P.s. if people argue that this method is a dirty hack, I fully agree.
> Another way to achieve the same result would be appreciated. The hack is
> probably introduced years ago, maybe there is a better way meanwhile.

The equivalent of gcc -ffunction-sections -fdata-sections?
(But don't forget to also emit constants in separate sections,
unlike gcc.)

brgds, H-P

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

end of thread, other threads:[~2003-07-17  1:57 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2003-07-17  1:12 LD being resource hungry while trying to achieve maximal dead-code elimination Marco van de Voort
2003-07-17  1:57 ` Hans-Peter Nilsson

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).