[PATCH] Fix PR middle-end/15486

Richard Henderson rth@redhat.com
Wed Dec 15 08:15:00 GMT 2004


On Wed, Dec 15, 2004 at 08:31:15AM +0100, Eric Botcazou wrote:
> I think it makes sense if -fdata-sections is primarily 
> seen as the compiler part of --gc-sections.

Um, yes.  And doesn't it follow from this that we should
be emitting .bss.foo, so that unreferenced bss variables
can be collected?

> The manual indeed mentions another benefit: enabling "optimizations
> to improve locality of reference in the instruction space" on the
> linker side, but I'm not really sure what it means exactly and whether
> it could apply to the .bss section.

Absolutely.

Think of .bss as .data initialized to zeros.  That's exactly what
it is.  If it makes sense to use .data.foo, then it makes sense to
use .bss.foo.


r~



More information about the Gcc-patches mailing list