This is the mail archive of the gcc-patches@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: [PATCH] Fix PR middle-end/15486


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~


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]