------- Comment #3 from joseph at codesourcery dot com  2005-12-21 19:46 -------
Subject: Re:  zero-initialized constants are place in
 .bss

On Wed, 21 Dec 2005, pinskia at gcc dot gnu dot org wrote:

> Actually no, they are placed in the common section because of ANSI C rules.

There is no such requirement.

> This is not a bug.

ELF supports having a read-only equivalent of .bss (type SHT_NOBITS, 
attributes SHF_ALLOC without SHF_WRITE).  We could allocate such a section 
name for read-only zero-initialized data and use it on ELF systems.  That 
way the data is read-only but doesn't consume space in the executable 
(presuming the rest of the toolchain handles this case OK).


-- 


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=25522

Reply via email to