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