linux-mips
[Top] [All Lists]

Re: [RFC] Add __initbss section

To: "Maciej W. Rozycki" <macro@linux-mips.org>
Subject: Re: [RFC] Add __initbss section
From: Franck Bui-Huu <vagabon.xyz@gmail.com>
Date: Sun, 04 Nov 2007 09:29:05 +0100
Cc: Ralf Baechle <ralf@linux-mips.org>, Geert Uytterhoeven <geert@linux-m68k.org>, linux-mips <linux-mips@linux-mips.org>
Dkim-signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=beta; h=domainkey-signature:received:received:message-id:date:from:user-agent:mime-version:to:cc:subject:references:in-reply-to:content-type:content-transfer-encoding; bh=uaygN2JDcMA9z53Vkfu/fThIq+UgfiWdVKAEhk1udf8=; b=pvT6fsXwrkR7QW8njbTYlImPNeyOcaF68qfdBzmHq9KZwYXPakKgyotHqDIM9rpKMXaRcqQeoFQyNy+NiZqHBuVyOdaPCuKN812Fwo7xsnzDZebTySsLRXMHaPL/MtgfSDHL1iMXIhRXRzttdIyrHr0/e+DA7gdQIWn6qvTxk2g=
Domainkey-signature: a=rsa-sha1; c=nofws; d=gmail.com; s=beta; h=received:message-id:date:from:user-agent:mime-version:to:cc:subject:references:in-reply-to:content-type:content-transfer-encoding; b=gaWT+o+wL++VSe60THnU+OQjmYenYEAcAKqEeEjg270epE5rN/tdAGzah+T1xg8ks8NGcJhQ2l9xbVSRNw2UxyfQqxCI+iZ9Fb48QtOc3ucuxjh8ZLwSXNn5oW9LKAKXCtySEZdijENtFYntw0BnHuBpgGY/3ZGQ1AyZzW+kJTI=
In-reply-to: <Pine.LNX.4.64N.0710191239490.13279@blysk.ds.pg.gda.pl>
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> <Pine.LNX.4.64N.0710151311350.16262@blysk.ds.pg.gda.pl> <4713C840.8080206@gmail.com> <Pine.LNX.4.64N.0710161123110.22596@blysk.ds.pg.gda.pl> <4717C1FB.4030602@gmail.com> <Pine.LNX.4.64N.0710191239490.13279@blysk.ds.pg.gda.pl>
Sender: linux-mips-bounce@linux-mips.org
User-agent: Thunderbird 2.0.0.5 (X11/20070719)
Maciej W. Rozycki wrote:
> On Thu, 18 Oct 2007, Franck Bui-Huu wrote:
>> After spending some fun time trying several different configurations
>> with gcc and ld, I noticed that gcc makes a section with @nobits
>> attribute if the section name starts with .bss.*
> 
>  Exactly how GCC sets section flags is mostly determined by 
> default_section_type_flags() in gcc/varasm.c; some flags are set elsewhere 
> too.  This is with HEAD of GCC.
> 

It seems that we can rely on this behaviour. I looked at gcc 4.1.2/3.2
sources and they made a section part of .bss if the section name starts
with ".bss.".

>> Another test I did is to put .init.bss (not .bss.init) section right
>> before .bss section in order to have only one segment to load. And it
>> makes magically ld do the right thing. I must admit that I don't
>> understand why, and the lack of documentation doesn't help...
> 
>  Hmm, isn't what `info ld' says enough?

Hmm, I'm must be blind but I missed that each time I read it. Could
you point out the section number please ?

OK, I think the best thing to do now is to respin the patchset and
submit it linux arch mailing list.

thanks,

                Franck

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