linux-mips
[Top] [All Lists]

Re: [RFC] Add __initbss section

To: Franck Bui-Huu <vagabon.xyz@gmail.com>
Subject: Re: [RFC] Add __initbss section
From: "Maciej W. Rozycki" <macro@linux-mips.org>
Date: Mon, 15 Oct 2007 13:19:39 +0100 (BST)
Cc: Ralf Baechle <ralf@linux-mips.org>, Geert Uytterhoeven <geert@linux-m68k.org>, linux-mips <linux-mips@linux-mips.org>
In-reply-to: <4712738A.5000703@gmail.com>
Original-recipient: rfc822;linux-mips@linux-mips.org
References: <470DF25E.60009@gmail.com> <Pine.LNX.4.64N.0710111307180.16370@blysk.ds.pg.gda.pl> <4712738A.5000703@gmail.com>
Sender: linux-mips-bounce@linux-mips.org
On Sun, 14 Oct 2007, Franck Bui-Huu wrote:

> >  I guess for a bss-type section you want to use something like:
> > 
> >     .section .init.bss,"aw",@nobits
> > 
> 
> Sorry but I'm missing your point here. This indeed should be added
> for assembler code but I don't see how it's related with the kernel
> image size difference I was seeing.

 Well, otherwise the section is marked as containing data and therefore 
taking space in the image.  Compare the output of `readelf -S' and/or 
`objdump -h' with and without the directive above.

 What do you mean by "assembler code" in this context, BTW?  Everything is 
assembler code, be it handwritten or GCC-generated.  Have a look at how 
GCC sets flags for your section, by running `gcc -S' and examining the 
output.

  Maciej

<Prev in Thread] Current Thread [Next in Thread>