Re: [dev] libdraw development

From: Hiltjo Posthuma <>
Date: Mon, 6 Sep 2010 20:16:51 +0200

On Sat, Sep 4, 2010 at 5:35 PM, pancake <> wrote:

> Function per file is because the stupid gnu linker does not statically
> compile functions. Only objects. Afaik. This way the resulting bin can be
> smaller.

gcc has -ffunction-sections and ld has -gc-sections.

From the gcc manual:

Place each function or data item into its own section in the output file if
the target supports arbitrary sections. The name of the function or the name
of the data item determines the section's name in the output file.

From the ld manual:

Enable garbage collection of unused input sections. It is ignored on targets
that do not support this option. The default behaviour (of not performing
this garbage collection) can be restored by specifying `--no-gc-sections' on
the command line.

Maybe this is what you seek ?

Kind regards,
Received on Mon Sep 06 2010 - 20:16:51 CEST

This archive was generated by hypermail 2.2.0 : Mon Sep 06 2010 - 20:24:02 CEST